Code sync from tizen_2.4
[platform/core/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         TReturn (*get_count)(CoreObject *o, UserRequest *ur);
30         TReturn (*get_info)(CoreObject *o, UserRequest *ur);
31         TReturn (*get_usim_info)(CoreObject *o, UserRequest *ur);
32         TReturn (*read_record)(CoreObject *o, UserRequest *ur);
33         TReturn (*update_record)(CoreObject *o, UserRequest *ur);
34         TReturn (*delete_record)(CoreObject *o, UserRequest *ur);
35 };
36
37 CoreObject *tcore_phonebook_new(TcorePlugin *p, const char *name, struct tcore_phonebook_operations *ops, TcoreHal *hal);
38 void tcore_phonebook_free(CoreObject *n);
39
40 void tcore_phonebook_set_ops(CoreObject *o, struct tcore_phonebook_operations *ops, enum tcore_ops_type ops_type);
41
42 gboolean tcore_phonebook_get_status(CoreObject *o);
43 gboolean tcore_phonebook_set_status(CoreObject *o, gboolean b_init);
44
45 struct tel_phonebook_support_list* tcore_phonebook_get_support_list(CoreObject *o);
46 gboolean tcore_phonebook_set_support_list(CoreObject *o, struct tel_phonebook_support_list *list);
47
48 struct tel_phonebook_field_support_list* tcore_phonebook_get_field_support_list(CoreObject *o);
49 gboolean tcore_phonebook_set_field_support_list(CoreObject *o, struct tel_phonebook_field_support_list *list);
50
51 enum tel_phonebook_type tcore_phonebook_get_selected_type(CoreObject *o);
52 gboolean tcore_phonebook_set_selected_type(CoreObject *o, enum tel_phonebook_type t);
53
54 __END_DECLS
55
56 #endif /* __TCORE_CO_PHONEBOOK_H__ */