4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
\r
6 * Contact: Hayoon Ko <hayoon.ko@samsung.com>
\r
8 * Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * you may not use this file except in compliance with the License.
\r
10 * You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing, software
\r
15 * distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * See the License for the specific language governing permissions and
\r
18 * limitations under the License.
\r
22 #ifndef __S_COMMON_H__
\r
23 #define __S_COMMON_H__
\r
27 #include <user_request.h>
\r
30 #define EVENT_SYS_NOTI_MODEM_POWER "system_power"
\r
31 #define EVENT_NOTI_MODEM_POWER "modem_power"
\r
32 #define EVENT_NOTI_MODEM_PHONE_STATE "modem_phone_state"
\r
33 #define EVENT_NOTI_MODEM_PIN_CTRL "ps_pin_control"
\r
35 #define EVENT_NOTI_CALL_STATUS "call_status"
\r
36 #define EVENT_NOTI_CALL_INCOMING "call_incoming"
\r
37 #define EVENT_NOTI_CALL_WAITING "call_waiting"
\r
38 #define EVENT_NOTI_CALL_SOUND_WBAMR_REPORT "call_sound_wbamr_report"
\r
39 #define EVENT_NOTI_CALL_SOUND_TWO_MIC "call_sound_two_mic"
\r
40 #define EVENT_NOTI_CALL_SOUND_DHA "call_sound_dha"
\r
42 #define EVENT_NOTI_SS_INFO "ss_info"
\r
43 #define EVENT_NOTI_SS_USSD "ss_ussd"
\r
45 #define EVENT_NOTI_PS_CALL_STATUS "ps_call_status"
\r
46 #define EVENT_NOTI_PS_DATA_COUNTER "ps_data_counter"
\r
47 #define EVENT_NOTI_PS_IPCONFIGURATION "ps_ipconfiguration"
\r
48 #define EVENT_NOTI_PS_HSDPA_STATUS "ps_hsdpa_status"
\r
49 #define EVENT_NOTI_PS_ATTACH_DETACH "ps_attach_detach"
\r
50 #define EVENT_NOTI_PS_EXTERNAL_CALL "ps_external_call"
\r
52 #define EVENT_NOTI_SAP_STATUS "sap_status"
\r
53 #define EVENT_NOTI_SAP_DISCONNECT "sap_disconnect"
\r
55 #define EVENT_NOTI_SIM_PIN_STATUS "sim_pin_status"
\r
57 #define EVENT_NOTI_SAT_ENVELOPE_RESP "sat_envelope_response"
\r
58 #define EVENT_NOTI_SAT_REFRESH_STATUS "sat_refresh_status"
\r
59 #define EVENT_NOTI_SAT_PROACTIVE_COMMAND "sat_proactive_command"
\r
60 #define EVENT_NOTI_SAT_CONTROL_RESULT "sat_control_result"
\r
62 #define EVENT_NOTI_NETWORK_REGISTRATION "network_regist"
\r
63 #define EVENT_NOTI_NETWORK_ICON_INFO "network_icon_info"
\r
64 #define EVENT_NOTI_NETWORK_TIME_INFO "network_time_info"
\r
65 #define EVENT_NOTI_NETWORK_IDENTITY "network_identity"
\r
67 #define EVENT_NOTI_SMS_INCOM_MSG "sms_incom_msg"
\r
68 #define EVENT_NOTI_SMS_SEND_ACK "sms_send_ack"
\r
69 #define EVENT_NOTI_SMS_MEMORY_STATUS "sms_memory_status"
\r
70 #define EVENT_NOTI_SMS_CB_INCOM_MSG "sms_cb_incom_msg"
\r
71 #define EVENT_NOTI_SMS_DELETE_MSG_CNF "sms_delete_msg_cnf"
\r
72 #define EVENT_NOTI_SMS_WRITE_MSG_CNF "sms_write_msg_cnf"
\r
73 #define EVENT_NOTI_SMS_DELIVERY_RPT_CNF "sms_deliver_rpt_cnf"
\r
74 #define EVENT_NOTI_SMS_DEVICE_READY "sms_device_ready"
\r
76 #define EVENT_NOTI_PHONEBOOK_STATUS "phonebook_status"
\r
77 #define EVENT_NOTI_PHONEBOOK_FIRST_INDEX "phonebook_first_index"
\r
79 #define EVENT_NOTI_GPS_ASSIST_DATA "gps_assist_data"
\r
80 #define EVENT_IND_GPS_MEASURE_POSITION "gps_measure_position"
\r
81 #define EVENT_NOTI_RESET_ASSIST_DATA "gps_reset_assist_data"
\r
88 struct global_data {
\r
89 unsigned int msg_auto_id_current;
\r
90 unsigned int msg_auto_id_start;
\r
91 unsigned int msg_auto_id_end;
\r
96 struct work_queue_data {
\r
101 #define UTIL_ID(hdr) ((hdr).main_cmd << 8 | (hdr).sub_cmd)
\r
102 #define UTIL_IDP(hdr) ((hdr)->main_cmd << 8 | (hdr)->sub_cmd)
\r
104 void hook_hex_dump(enum direction_e d, int size, const void *data);
\r
105 unsigned int util_assign_message_sequence_id(TcorePlugin *p);
\r
106 gboolean util_add_waiting_job(GQueue *queue, unsigned int id, UserRequest *ur);
\r
107 UserRequest* util_pop_waiting_job(GQueue *queue, unsigned int id);
\r
108 void util_hex_dump(char *pad, int size, const void *data);
\r
109 unsigned char util_hexCharToInt(char c);
\r
110 char* util_hexStringToBytes(char * s);
\r