c37b56361ee3d4950aa1f382fe8a3636e8d512d5
[framework/telephony/libtcore.git] / include / co_phonebook.h
1 /*
2  * libtcore
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 #ifndef __TCORE_CO_PHONEBOOK_H__
22 #define __TCORE_CO_PHONEBOOK_H__
23
24 #include <core_object.h>
25
26 __BEGIN_DECLS
27
28 struct tcore_phonebook_operations {
29         /*WILL BE REMOVED - START*/
30         TReturn (*select)(CoreObject *o, UserRequest *ur);
31         /*WILL BE REMOVED - END*/
32         TReturn (*get_count)(CoreObject *o, UserRequest *ur);
33         TReturn (*get_info)(CoreObject *o, UserRequest *ur);
34         TReturn (*get_usim_info)(CoreObject *o, UserRequest *ur);
35         TReturn (*read_record)(CoreObject *o, UserRequest *ur);
36         TReturn (*update_record)(CoreObject *o, UserRequest *ur);
37         TReturn (*delete_record)(CoreObject *o, UserRequest *ur);
38 };
39
40 CoreObject* tcore_phonebook_new(TcorePlugin *p, const char *name, struct tcore_phonebook_operations *ops, TcoreHal *hal);
41 void        tcore_phonebook_free(CoreObject *n);
42
43 gboolean    tcore_phonebook_get_status(CoreObject *o);
44 gboolean    tcore_phonebook_set_status(CoreObject *o, gboolean b_init);
45
46 struct tel_phonebook_support_list* tcore_phonebook_get_support_list(CoreObject *o);
47 gboolean    tcore_phonebook_set_support_list(CoreObject *o, struct tel_phonebook_support_list *list);
48
49 enum tel_phonebook_type tcore_phonebook_get_selected_type(CoreObject *o);
50 gboolean tcore_phonebook_set_selected_type(CoreObject *o, enum tel_phonebook_type t);
51
52 __END_DECLS
53
54 #endif