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