4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #ifndef __TCORE_CO_NETWORK_H__
22 #define __TCORE_CO_NETWORK_H__
24 #include <core_object.h>
29 enum tcore_network_service_domain_type {
30 TCORE_NETWORK_SERVICE_DOMAIN_TYPE_CIRCUIT,
31 TCORE_NETWORK_SERVICE_DOMAIN_TYPE_PACKET
34 enum tcore_network_name_type {
35 TCORE_NETWORK_NAME_TYPE_SHORT,
36 TCORE_NETWORK_NAME_TYPE_FULL,
37 TCORE_NETWORK_NAME_TYPE_SPN,
40 enum tcore_network_name_priority {
41 TCORE_NETWORK_NAME_PRIORITY_UNKNOWN,
42 TCORE_NETWORK_NAME_PRIORITY_NETWORK,
43 TCORE_NETWORK_NAME_PRIORITY_SPN,
44 TCORE_NETWORK_NAME_PRIORITY_ANY,
47 struct tcore_network_operator_info {
54 struct tcore_network_operations {
55 TReturn (*search)(CoreObject *o, UserRequest *ur);
56 TReturn (*set_plmn_selection_mode)(CoreObject *o, UserRequest *ur);
57 TReturn (*get_plmn_selection_mode)(CoreObject *o, UserRequest *ur);
58 TReturn (*set_service_domain)(CoreObject *o, UserRequest *ur);
59 TReturn (*get_service_domain)(CoreObject *o, UserRequest *ur);
60 TReturn (*set_band)(CoreObject *o, UserRequest *ur);
61 TReturn (*get_band)(CoreObject *o, UserRequest *ur);
62 TReturn (*set_preferred_plmn)(CoreObject *o, UserRequest *ur);
63 TReturn (*get_preferred_plmn)(CoreObject *o, UserRequest *ur);
64 TReturn (*set_order)(CoreObject *o, UserRequest *ur);
65 TReturn (*get_order)(CoreObject *o, UserRequest *ur);
66 TReturn (*set_power_on_attach)(CoreObject *o, UserRequest *ur);
67 TReturn (*get_power_on_attach)(CoreObject *o, UserRequest *ur);
68 TReturn (*set_cancel_manual_search)(CoreObject *o, UserRequest *ur);
69 TReturn (*get_serving_network)(CoreObject *o, UserRequest *ur);
70 TReturn (*set_mode)(CoreObject *o, UserRequest *ur);
71 TReturn (*get_mode)(CoreObject *o, UserRequest *ur);
75 CoreObject* tcore_network_new(TcorePlugin *plugin, const char *name,
76 struct tcore_network_operations *ops, TcoreHal *hal);
77 void tcore_network_free(CoreObject *co);
79 TReturn tcore_network_set_plmn(CoreObject *co, const char *plmn);
80 char* tcore_network_get_plmn(CoreObject *co);
82 TReturn tcore_network_set_network_name(CoreObject *co,
83 enum tcore_network_name_type type, const char *network_name);
84 char* tcore_network_get_network_name(CoreObject *co,
85 enum tcore_network_name_type type);
87 TReturn tcore_network_set_network_name_priority(CoreObject *co,
88 enum tcore_network_name_priority priority);
89 TReturn tcore_network_get_network_name_priority(CoreObject *co,
90 enum tcore_network_name_priority *priority);
92 TReturn tcore_network_set_roaming_state(CoreObject *co, gboolean state);
93 gboolean tcore_network_get_roaming_state(CoreObject *co);
95 TReturn tcore_network_set_service_status(CoreObject *co,
96 enum tcore_network_service_domain_type type,
97 enum telephony_network_service_domain_status status);
98 TReturn tcore_network_get_service_status(CoreObject *co,
99 enum tcore_network_service_domain_type type,
100 enum telephony_network_service_domain_status *result);
102 TReturn tcore_network_set_access_technology(CoreObject *co,
103 enum telephony_network_access_technology act);
104 TReturn tcore_network_get_access_technology(CoreObject *co,
105 enum telephony_network_access_technology *result);
107 TReturn tcore_network_set_lac(CoreObject *co, unsigned int lac);
108 TReturn tcore_network_get_lac(CoreObject *co, unsigned int *result);
110 TReturn tcore_network_set_rac(CoreObject *co, unsigned int rac);
111 TReturn tcore_network_get_rac(CoreObject *co, unsigned int *result);
113 TReturn tcore_network_set_cell_id(CoreObject *co, unsigned int cell_id);
114 TReturn tcore_network_get_cell_id(CoreObject *co, unsigned int *result);
116 TReturn tcore_network_set_service_type(CoreObject *co,
117 enum telephony_network_service_type service_type);
118 TReturn tcore_network_get_service_type(CoreObject *co,
119 enum telephony_network_service_type *result);
121 TReturn tcore_network_operator_info_add(CoreObject *co,
122 struct tcore_network_operator_info *noi);
124 struct tcore_network_operator_info*
125 tcore_network_operator_info_find(CoreObject *co,
126 const char *mcc, const char *mnc);