Parent: [13c55b] (diff)

Child: [6d51ea] (diff)

Download this file

pxattr_8h-source.html    88 lines (87 with data), 15.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>pxattr: pxattr.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>pxattr.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _pxattr_h_included_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _pxattr_h_included_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">/* @(#$Id: pxattr.h,v 1.5 2009-01-20 13:48:34 dockes Exp $ (C) 2009 J.F.Dockes</span>
<a name="l00005"></a>00005 <span class="comment">Copyright (c) 2009 Jean-Francois Dockes</span>
<a name="l00006"></a>00006 <span class="comment"></span>
<a name="l00007"></a>00007 <span class="comment">Permission is hereby granted, free of charge, to any person</span>
<a name="l00008"></a>00008 <span class="comment">obtaining a copy of this software and associated documentation</span>
<a name="l00009"></a>00009 <span class="comment">files (the "Software"), to deal in the Software without</span>
<a name="l00010"></a>00010 <span class="comment">restriction, including without limitation the rights to use,</span>
<a name="l00011"></a>00011 <span class="comment">copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<a name="l00012"></a>00012 <span class="comment">copies of the Software, and to permit persons to whom the</span>
<a name="l00013"></a>00013 <span class="comment">Software is furnished to do so, subject to the following</span>
<a name="l00014"></a>00014 <span class="comment">conditions:</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">The above copyright notice and this permission notice shall be</span>
<a name="l00017"></a>00017 <span class="comment">included in all copies or substantial portions of the Software.</span>
<a name="l00018"></a>00018 <span class="comment"></span>
<a name="l00019"></a>00019 <span class="comment">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
<a name="l00020"></a>00020 <span class="comment">EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES</span>
<a name="l00021"></a>00021 <span class="comment">OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
<a name="l00022"></a>00022 <span class="comment">NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT</span>
<a name="l00023"></a>00023 <span class="comment">HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,</span>
<a name="l00024"></a>00024 <span class="comment">WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span>
<a name="l00025"></a>00025 <span class="comment">FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR</span>
<a name="l00026"></a>00026 <span class="comment">OTHER DEALINGS IN THE SOFTWARE.</span>
<a name="l00027"></a>00027 <span class="comment">*/</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00030"></a>00030 <span class="keyword">using</span> std::string;
<a name="l00031"></a>00031 <span class="keyword">using</span> std::vector;
<a name="l00032"></a>00032
<a name="l00065"></a><a class="code" href="namespacepxattr.html">00065</a> <span class="keyword">namespace </span>pxattr {
<a name="l00067"></a><a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe">00067</a> <span class="keyword">enum</span> <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> {
<a name="l00069"></a><a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3">00069</a> <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>
<a name="l00070"></a>00070 };
<a name="l00071"></a>00071
<a name="l00073"></a><a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057">00073</a> <span class="keyword">enum</span> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> {PXATTR_NONE=0,
<a name="l00075"></a><a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057838c34be5cf3e65fb197079dd07a90df">00075</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057838c34be5cf3e65fb197079dd07a90df" title="Act on link instead of following it.">PXATTR_NOFOLLOW</a> = 1,
<a name="l00077"></a><a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057c07bacf856d30b9a1690844f2922d7c4">00077</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057c07bacf856d30b9a1690844f2922d7c4" title="Fail if existing.">PXATTR_CREATE</a>=2,
<a name="l00079"></a><a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057523c6cf55b7740a23138cffdabf361cd">00079</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057523c6cf55b7740a23138cffdabf361cd" title="Fail if new.">PXATTR_REPLACE</a>=4
<a name="l00080"></a>00080 };
<a name="l00081"></a>00081
<a name="l00085"></a>00085 <span class="keywordtype">bool</span> <span class="keyword">get</span>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; path, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keywordtype">string</span>* value,
<a name="l00086"></a>00086 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00090"></a>00090 <span class="keywordtype">bool</span> <span class="keyword">get</span>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keywordtype">string</span>* value,
<a name="l00091"></a>00091 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00095"></a>00095 <span class="keywordtype">bool</span> <span class="keyword">set</span>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; path, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; value,
<a name="l00096"></a>00096 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00100"></a>00100 <span class="keywordtype">bool</span> <span class="keyword">set</span>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; value,
<a name="l00101"></a>00101 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00105"></a>00105 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#6b01dcfb8d96b683086da3224d59f54a" title="Delete the named attribute from path.">del</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; path, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,
<a name="l00106"></a>00106 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00110"></a>00110 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#6b01dcfb8d96b683086da3224d59f54a" title="Delete the named attribute from path.">del</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,
<a name="l00111"></a>00111 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00115"></a>00115 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#766ce3b2c1ee4baef676782285cdd046" title="List attribute names from path.">list</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; path, vector&lt;string&gt;* names,
<a name="l00116"></a>00116 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00120"></a>00120 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#766ce3b2c1ee4baef676782285cdd046" title="List attribute names from path.">list</a>(<span class="keywordtype">int</span> fd, vector&lt;string&gt;* names,
<a name="l00121"></a>00121 <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> <a class="code" href="namespacepxattr.html#88c43c8e60bffbc7d2978a316c26c057" title="Flags can modify the behaviour of some methods.">flags</a> = PXATTR_NONE, <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom = <a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fecea7941688fff81a2178dd73fdaebda3" title="User name space.">PXATTR_USER</a>);
<a name="l00122"></a>00122
<a name="l00127"></a>00127 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#5de2ca786678c028f924aa36c68ae3d5" title="Compute actual/system attribute name from external name (ie: myattr-&amp;gt;user.myattr)...">sysname</a>(<a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; pname, <span class="keywordtype">string</span>* sname);
<a name="l00132"></a>00132 <span class="keywordtype">bool</span> <a class="code" href="namespacepxattr.html#e2e3adcdd451c56f6ecf10ce032af46c" title="Compute external name from actual/system name (ie: user.myattr-&amp;gt;myattr).">pxname</a>(<a class="code" href="namespacepxattr.html#bf2cfc33fa527183f256c153473103fe" title="nspace might be used in the future if we support multiple namespaces.">nspace</a> dom, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; sname, <span class="keywordtype">string</span>* pname);
<a name="l00133"></a>00133 }
<a name="l00134"></a>00134
<a name="l00135"></a>00135
<a name="l00136"></a>00136 <span class="preprocessor">#endif </span><span class="comment">/* _pxattr_h_included_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 20 15:42:34 2009 for pxattr by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>