4 * Copyright (c) 2010 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __CTSVC_DB_ACCESS_CONTROL_H__
21 #define __CTSVC_DB_ACCESS_CONTROL_H__
25 #define CTSVC_PRIVILEGE_CONTACT_READ "http://tizen.org/privilege/contact.read"
26 #define CTSVC_PRIVILEGE_CONTACT_WRITE "http://tizen.org/privilege/contact.write"
27 #define CTSVC_PRIVILEGE_CALLHISTORY_READ "http://tizen.org/privilege/callhistory.read"
28 #define CTSVC_PRIVILEGE_CALLHISTORY_WRITE "http://tizen.org/privilege/callhistory.write"
30 bool ctsvc_have_permission(pims_ipc_h ipc, int permission);
32 int ctsvc_have_file_read_permission(const char *path);
34 void ctsvc_set_client_access_info(pims_ipc_h ipc, const char *smack);
35 void ctsvc_unset_client_access_info(void);
36 void ctsvc_reset_all_client_access_info(void);
38 char* ctsvc_get_client_smack_label(void);
40 int ctsvc_get_write_permitted_addressbook_ids(int **addressbook_ids, int *count);
41 bool ctsvc_have_ab_write_permission(int addressbook_id, bool allow_readonly);
42 int ctsvc_is_owner(int addressbook_id);
45 #endif /* __CTSVC_DB_ACCESS_CONTROL_H__ */