Fix building and minor improvements
[platform/core/system/tizen-platform-wrapper.git] / src / isadmin.h
1 /*
2  * Copyright (C) 2013 Intel Corporation.
3  * 
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Authors:
19  *   Stephen Clymans <stephen.clymans@open.eurogiciel.org>
20  */
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24  
25 #ifndef TIZEN_PLATFORM_WRAPPER_ISADMIN_H
26 #define TIZEN_PLATFORM_WRAPPER_ISADMIN_H
27
28 /*
29  * DISCLAIMER :
30  *  This header and its associated source file are present to maintain a 
31  * temporary solution. We need to know if an user have the privilege for
32  * a particular action.
33  * 
34  * At the end, this feature will be managed by Cynara
35  * 
36  */
37
38 /*
39  * Return 0 if the given uid is not in the admin group.
40  * Return 1 if the given uid is in the admin group.
41  * 
42  * If you pass the -1 value to this function it will take the current uid given
43  * by the POSIX function getuid();
44 */
45 int _is_admin_static_(uid_t uid);
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #endif /* TIZEN_PLATFORM_WRAPPER_ISADMIN_H  */
52