4 * Copyright (c) 2014 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.
24 #define s_indi_assert(cond) g_assert(cond)
25 #define s_indi_assert_not_reached() g_assert_not_reached()
26 #define s_indi_malloc0(sz) g_malloc0(sz)
27 #define s_indi_free_func g_free
28 #define s_indi_free(p) s_indi_free_func(p)
29 #define s_indi_strdup(str) g_strdup(str)
30 #define s_indi_str_has_suffix(str, pre) g_str_has_suffix(str, pre)
32 #define S_INDI_ZERO (0)
33 #define S_INDI_ONE (1)
34 #define S_INDI_FIVE (5)
35 #define S_INDI_SIPC_ITER_START S_INDI_ONE
36 #define S_INDI_SIPC_ITER_END (255)
37 #define S_INDI_MINUS_ONE (-1)
38 #define S_INDI_NOT_USED(var) ((var) = (var))
39 #define S_INDI_SIPC_MSG_ID(hdr) ((hdr).main_cmd << 8 | (hdr).sub_cmd)
42 S_INDI_CELLULAR_UNKNOWN = -1,
43 S_INDI_CELLULAR_OFF = 0x00,
44 S_INDI_CELLULAR_CONNECTED = 0x01,
45 S_INDI_CELLULAR_MMS_CONNECTED = 0x02,
46 S_INDI_CELLULAR_USING = 0x03,
47 } s_indi_cellular_state;
50 S_INDI_TRANSFER_UNKNOWN = -1,
51 S_INDI_TRANSFER_NORMAL = 0x00,
52 S_INDI_TRANSFER_RX = 0x01,
53 S_INDI_TRANSFER_TX = 0x02,
54 S_INDI_TRANSFER_RXTX = 0x03,
55 } s_indi_transfer_state;
58 S_INDI_LCD_UNKNOWN = -1,
60 S_INDI_LCD_DIM = 0x02,
65 S_INDI_PS_CALL_OK = 0x00,
66 S_INDI_PS_CALL_CONNECT = 0x01,
67 S_INDI_PS_CALL_NO_CARRIER = 0x03,
68 } s_indi_ps_call_state;
71 unsigned int id_current;
72 unsigned int id_start;
76 typedef struct s_indi_cp_state_info_type_struct s_indi_cp_state_info_type;
79 gboolean b_vconf_checker;
80 s_indi_lcd_state lcd_state;
85 gboolean is_dormant_set;
86 s_indi_cp_state_info_type *parent;
87 } s_indi_dormancy_info_type;
89 struct s_indi_cp_state_info_type_struct{
92 GHashTable *device_info; /* HashTable of s_indi_dev_state_info_type with key = dev_name */
93 s_indi_dormancy_info_type dormant_info;
94 s_indi_cellular_state ps_state;
95 s_indi_transfer_state cp_trans_state;
96 unsigned long long rx_total;
97 unsigned long long tx_total;
98 int no_rx_pckt; /* Last time since packed was received in seconds */
99 gboolean roaming_status;
101 gboolean curr_fdy_state_cp;
105 CoreObject *ps_context;
106 s_indi_cp_state_info_type *parent;
107 unsigned long prev_rx;
108 unsigned long prev_tx;
109 unsigned long curr_rx;
110 unsigned long curr_tx;
111 } s_indi_dev_state_info_type;