4 * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
5 * Copyright (c) 2013 Intel Corporation. All rights reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #ifndef __CO_PHONEBOOK_H__
21 #define __CO_PHONEBOOK_H__
23 #include "core_object.h"
24 #include <tel_phonebook.h>
25 #include <tel_return.h>
32 TelReturn (*get_info)(CoreObject *co, TelPbType pb_type, TcoreObjectResponseCallback cb, void *cb_data);
33 TelReturn (*read_record)(CoreObject *co, const TelPbRecordInfo *record, TcoreObjectResponseCallback cb, void *cb_data);
34 TelReturn (*update_record)(CoreObject *co, const TelPbUpdateRecord *req_data, TcoreObjectResponseCallback cb, void *cb_data);
35 TelReturn (*delete_record)(CoreObject *co, const TelPbRecordInfo *record, TcoreObjectResponseCallback cb, void *cb_data);
38 CoreObject *tcore_phonebook_new(TcorePlugin *p, TcorePbOps *ops, TcoreHal *hal);
39 void tcore_phonebook_free(CoreObject *co);
41 gboolean tcore_phonebook_set_ops(CoreObject *co, TcorePbOps *ops);
42 void tcore_phonebook_override_ops(CoreObject *co, TcorePbOps *phonebook_ops);
44 gboolean tcore_phonebook_get_status(CoreObject *co, gboolean *init_status);
45 gboolean tcore_phonebook_set_status(CoreObject *co, gboolean init_status);
47 gboolean tcore_phonebook_get_support_list(CoreObject *co, TelPbList **pb_list);
48 gboolean tcore_phonebook_set_support_list(CoreObject *co, TelPbList *pb_list);
50 gboolean tcore_phonebook_get_selected_type(CoreObject *co, TelPbType *pb_type);
51 gboolean tcore_phonebook_set_selected_type(CoreObject *co, TelPbType pb_type);
57 #endif /*__CO_PHONEBOOK_H__*/