Add function to check if appid exists
[platform/core/appfw/badge.git] / include / badge_setting_service.h
1 /*
2  * Copyright (c) 2016 - 2017 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 #ifndef __BADGE_SETTING_SERVICE_H__
19 #define __BADGE_SETTING_SERVICE_H__
20
21 #include <stdbool.h>
22 #include <sys/types.h>
23 #include "badge_error.h"
24 #include "badge_setting.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /*  __cplusplus */
29
30 /**
31  * @file badge_setting_service.h
32  * @brief This file contains the badge APIs.
33  */
34
35 /**
36  * @addtogroup BADGE_MODULE
37  * @{
38  */
39
40 int badge_db_get_setting_by_appid(const char *appid, badge_setting_h *setting, uid_t uid);
41 int badge_db_get_allow_to_display_by_appid(char *appid, int *allow_to_display, uid_t uid);
42 int badge_setting_insert_package_for_uid(const char *pkgname, uid_t uid);
43 int badge_setting_delete_package_for_uid(const char *pkgname, uid_t uid);
44 int badge_setting_refresh_setting_table(uid_t uid);
45 int badge_db_update_setting(char *pkgname, char *appid, int allow_to_display, uid_t uid);
46 int badge_setting_is_existed_appid(const char *appid, bool *is_existed, uid_t uid);
47
48 /**
49  * @}
50  */
51
52 #ifdef __cplusplus
53 }
54 #endif /* __cplusplus */
55
56 #endif /* __BADGE_SETTING_SERVICE_H__ */
57