pxattr
1.0
Main Page
Namespaces
Files
File List
pxattr.h
1
#ifndef _pxattr_h_included_
2
#define _pxattr_h_included_
3
4
/* @(#$Id: pxattr.h,v 1.5 2009-01-20 13:48:34 dockes Exp $ (C) 2009 J.F.Dockes
5
Copyright (c) 2009 Jean-Francois Dockes
6
7
Permission is hereby granted, free of charge, to any person
8
obtaining a copy of this software and associated documentation
9
files (the "Software"), to deal in the Software without
10
restriction, including without limitation the rights to use,
11
copy, modify, merge, publish, distribute, sublicense, and/or sell
12
copies of the Software, and to permit persons to whom the
13
Software is furnished to do so, subject to the following
14
conditions:
15
16
The above copyright notice and this permission notice shall be
17
included in all copies or substantial portions of the Software.
18
19
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
OTHER DEALINGS IN THE SOFTWARE.
27
*/
28
#include <string>
29
#include <vector>
30
using
std::string;
31
using
std::vector;
32
65
namespace
pxattr {
67
enum
nspace
{
69
PXATTR_USER
70
};
71
73
enum
flags
{PXATTR_NONE=0,
75
PXATTR_NOFOLLOW
= 1,
77
PXATTR_CREATE
=2,
79
PXATTR_REPLACE
=4
80
};
81
85
bool
get
(
const
string
& path,
const
string
& name,
string
* value,
86
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
90
bool
get
(
int
fd,
const
string
& name,
string
* value,
91
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
95
bool
set
(
const
string
& path,
const
string
& name,
const
string
& value,
96
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
100
bool
set
(
int
fd,
const
string
& name,
const
string
& value,
101
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
105
bool
del
(
const
string
& path,
const
string
& name,
106
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
110
bool
del
(
int
fd,
const
string
& name,
111
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
115
bool
list
(
const
string
& path, vector<string>* names,
116
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
120
bool
list
(
int
fd, vector<string>* names,
121
flags
flags
= PXATTR_NONE,
nspace
dom =
PXATTR_USER
);
122
127
bool
sysname
(
nspace
dom,
const
string
& pname,
string
* sname);
132
bool
pxname
(
nspace
dom,
const
string
& sname,
string
* pname);
133
}
134
135
136
#endif
/* _pxattr_h_included_ */
Generated on Sat Feb 2 2013 19:18:55 for pxattr by
1.8.1.2