Release version 0.5.10
[platform/core/appfw/librua.git] / include / rua_stat.h
1 /*
2  * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file        rua_stat.h
19  * @brief       RUA STATUS API declaration header file.
20  * @author      Hyunho Kang (hhstark.kang@samsung.com)
21  * @version     0.1
22  * @history     0.1: RUA STAT API Declarations, structure declaration
23  */
24
25 #ifndef __RUA_STAT_H__
26 #define __RUA_STAT_H__
27
28 #include <sys/types.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /**
35  * @brief       Update rua status
36  * @param[in]   caller, tag, uid
37  * @return      0 on success, otherwise a nagative error value
38  * @retval      0 on successful
39  * @retval      -1 on failed
40  */
41 int rua_stat_update_for_uid(char *caller, char *tag, uid_t uid);
42
43 /**
44  * @brief       Get rua status tag list
45  * @param[in]   caller, callback, user data
46  * @return      0 on success, otherwise a nagative error value
47  * @retval      0 on successful
48  * @retval      -1 on failed
49  */
50 int rua_stat_get_stat_tags(char *caller,
51                 int (*rua_stat_tag_iter_fn)(const char *rua_stat_tag, void *data), void *data);
52 int rua_stat_get_stat_tags_for_uid(char *caller,
53                 int (*rua_stat_tag_iter_fn)(const char *rua_stat_tag, void *data),
54                 void *data, uid_t uid);
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif /*__RUA_STAT_H__*/