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_try_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_MINUS_ONE (-1)
36 #define S_INDI_NOT_USED(var) ((var) = (var))
39 S_INDI_CELLULAR_UNKNOWN = -1,
40 S_INDI_CELLULAR_OFF = 0x00,
41 S_INDI_CELLULAR_CONNECTED = 0x01,
42 S_INDI_CELLULAR_MMS_CONNECTED = 0x02,
43 S_INDI_CELLULAR_USING = 0x03,
44 } s_indi_cellular_state;
47 S_INDI_TRANSFER_UNKNOWN = -1,
48 S_INDI_TRANSFER_NORMAL = 0x00,
49 S_INDI_TRANSFER_RX = 0x01,
50 S_INDI_TRANSFER_TX = 0x02,
51 S_INDI_TRANSFER_RXTX = 0x03,
52 } s_indi_transfer_state;
55 S_INDI_LCD_UNKNOWN = -1,
57 S_INDI_LCD_DIM = 0x02,
62 S_INDI_PS_CALL_OK = 0x00,
63 S_INDI_PS_CALL_CONNECT = 0x01,
64 S_INDI_PS_CALL_NO_CARRIER = 0x03,
65 } s_indi_ps_call_state;
67 typedef struct s_indi_cp_state_info_type_struct s_indi_cp_state_info_type;
69 s_indi_lcd_state lcd_state;
70 s_indi_cp_state_info_type *parent;
71 } s_indi_dormancy_info_type;
73 struct s_indi_cp_state_info_type_struct{
76 GHashTable *device_info; /* HashTable of s_indi_dev_state_info_type with key = dev_name */
77 s_indi_dormancy_info_type dormant_info;
78 s_indi_cellular_state ps_state;
79 s_indi_transfer_state cp_trans_state;
80 unsigned long long rx_total;
81 unsigned long long tx_total;
82 int no_rx_pckt; /* Last time since packed was received in seconds */
83 gboolean roaming_status;
85 gboolean curr_fdy_state_cp;
89 CoreObject *ps_context;
90 s_indi_cp_state_info_type *parent;
91 unsigned long prev_rx;
92 unsigned long prev_tx;
93 unsigned long curr_rx;
94 unsigned long curr_tx;
95 } s_indi_dev_state_info_type;