2 * tel-plugin-socket-communicator
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.
28 #include <glib-object.h>
35 #include <communicator.h>
38 #include <user_request.h>
41 #include "generated-code.h"
44 TReturn ret = TCORE_RETURN_SUCCESS;
47 on_sms_send_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
50 const gchar *tpdu_data,
54 struct treq_sms_send_umts_msg sendUmtsMsg;
55 struct custom_data *ctx = user_data;
56 UserRequest *ur = NULL;
59 guchar *decoded_sca = NULL;
60 guchar *decoded_tpdu = NULL;
62 memset(&sendUmtsMsg, 0 , sizeof(struct treq_sms_send_umts_msg));
64 decoded_sca = g_base64_decode(sca, &length);
65 memcpy(&(sendUmtsMsg.msgDataPackage.sca[0]), decoded_sca, SMS_SMSP_ADDRESS_LEN);
67 sendUmtsMsg.msgDataPackage.msgLength = tpdu_length;
68 dbg("tpdu_length = 0x%x", tpdu_length);
70 decoded_tpdu = g_base64_decode(tpdu_data, &length);
71 memcpy(&(sendUmtsMsg.msgDataPackage.tpduData[0]), decoded_tpdu, SMS_SMDATA_SIZE_MAX + 1);
72 sendUmtsMsg.more = moreMsg;
74 ur = MAKE_UR(ctx, sms, invocation);
75 tcore_user_request_set_data(ur, sizeof(struct treq_sms_send_umts_msg), &sendUmtsMsg);
76 tcore_user_request_set_command(ur, TREQ_SMS_SEND_UMTS_MSG);
84 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
85 if (ret != TCORE_RETURN_SUCCESS) {
86 // api_err = TAPI_API_OPERATION_FAILED;
87 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
96 on_sms_send_cdma_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
99 const gchar *tpdu_data,
104 cdmaMsg.more = sipc_util_marshal_object_get_int(in_obj, "More");
105 cdmaMsg.cdmaMsgInfo.ParamMask = sipc_util_marshal_object_get_int(in_obj, "ParamMask");
106 cdmaMsg.cdmaMsgInfo.MsgType = sipc_util_marshal_object_get_int(in_obj, "MsgType");
108 switch(cdmaMsg.cdmaMsgInfo.MsgType)
110 case SMS_MESSAGETYPE_SUBMIT: {
111 gchar *dstAddr_szAddress;
112 gchar *dstSubAddr_szAddress;
114 gchar *callBackNumer_szAddress;
117 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.Digit = sipc_util_marshal_object_get_int(in_obj, "DstAddr.Digit");
118 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.NumberMode = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberMode");
119 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.NumberType = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberType");
120 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.NumberPlan = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberPlan");
121 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstAddr.szAddrLength");
122 dstAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstAddr.szAddress");
123 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstAddr.szAddress[0]), dstAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
125 Origination subaddress
126 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstSubAddr.SubType = sipc_util_marshal_object_get_int(in_obj, "DstSubAddr.SubType");
127 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstSubAddr.Odd = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.Odd");
128 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstSubAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.szAddrLength");
129 dstSubAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstSubAddr.szAddress");
130 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DstSubAddr.szAddress[0]), dstSubAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
132 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.TeleService = sipc_util_marshal_object_get_int(in_obj, "TeleService");
133 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.bBearerReplySeqRequest = sipc_util_marshal_object_get_int(in_obj, "bBearerReplySeqRequest");
134 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ReplySeqNumber = sipc_util_marshal_object_get_char(in_obj, "ReplySeqNumber");
135 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.MsgId = sipc_util_marshal_object_get_int(in_obj, "MsgId");
136 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.MsgEncoding = sipc_util_marshal_object_get_int(in_obj, "MsgEncoding");
137 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.MsgLength = sipc_util_marshal_object_get_int(in_obj, "MsgLength");
138 szData = sipc_util_marshal_object_get_string(in_obj, "szData");
139 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.szData[0]), szData, SMS_MAXLENGTH_SMS_MO_USER_DATA);
141 Validity period - Absolute
142 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.year = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.year");
143 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.month = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.month");
144 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.day = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.day");
145 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.hours = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.hours");
146 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.minutes = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.minutes");
147 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodAbs.seconds = sipc_util_marshal_object_get_int(in_obj, "ValidityPeriodAbs.seconds");
149 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.ValidityPeriodRel = sipc_util_marshal_object_get_char(in_obj, "ValidityPeriodRel");
151 Deferred delivery time - Absolute (not supported)
152 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.year = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.year");
153 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.month = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.month");
154 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.day = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.day");
155 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.hours = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.hours");
156 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.minutes = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.minutes");
157 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeAbs.seconds = sipc_util_marshal_object_get_int(in_obj, "DeferredDelTimeAbs.seconds");
159 Deferred delivery time - Relative (not supported)
160 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.DeferredDelTimeRel = sipc_util_marshal_object_get_char(in_obj, "DeferredDelTimeRel");
162 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.Priority = sipc_util_marshal_object_get_int(in_obj, "Priority");
163 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.Privacy = sipc_util_marshal_object_get_int(in_obj, "Privacy");
164 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.bUserAckRequest = sipc_util_marshal_object_get_int(in_obj, "bUserAckRequest");
165 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.bDeliveryAckRequest = sipc_util_marshal_object_get_int(in_obj, "bDeliveryAckRequest");
166 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.AlertPriority= sipc_util_marshal_object_get_int(in_obj, "AlertPriority");
167 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.MsgLang= sipc_util_marshal_object_get_int(in_obj, "MsgLang");
169 Callback number address
170 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.Digit = sipc_util_marshal_object_get_int(in_obj, "CallBackNumer.Digit");
171 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.NumberMode = sipc_util_marshal_object_get_int(in_obj, "CallBackNumer.NumberMode");
172 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.NumberType = sipc_util_marshal_object_get_int(in_obj, "CallBackNumer.NumberType");
173 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.NumberPlan = sipc_util_marshal_object_get_int(in_obj, "CallBackNumer.NumberPlan");
174 cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "CallBackNumer.szAddrLength");
175 callBackNumer_szAddress = sipc_util_marshal_object_get_string(in_obj, "CallBackNumer.szAddress");
176 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outSubmit.CallBackNumber.szAddress[0]), callBackNumer_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
181 case SMS_MESSAGETYPE_CANCEL: {
182 gchar *dstAddr_szAddress;
183 gchar *dstSubAddr_szAddress;
186 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.Digit = sipc_util_marshal_object_get_int(in_obj, "DstAddr.Digit");
187 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.NumberMode = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberMode");
188 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.NumberType = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberType");
189 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.NumberPlan = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberPlan");
190 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstAddr.szAddrLength");
191 dstAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstAddr.szAddress");
192 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstAddr.szAddress[0]), dstAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
194 Origination subaddress
195 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstSubAddr.SubType = sipc_util_marshal_object_get_int(in_obj, "DstSubAddr.SubType");
196 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstSubAddr.Odd = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.Odd");
197 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstSubAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.szAddrLength");
198 dstSubAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstSubAddr.szAddress");
199 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outCancel.DstSubAddr.szAddress[0]), dstSubAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
201 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.TeleService = sipc_util_marshal_object_get_int(in_obj, "TeleService");
202 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.bBearerReplySeqRequest = sipc_util_marshal_object_get_int(in_obj, "bBearerReplySeqRequest");
203 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.ReplySeqNumber = sipc_util_marshal_object_get_char(in_obj, "ReplySeqNumber");
204 cdmaMsg.cdmaMsgInfo.MsgData.outCancel.MsgId = sipc_util_marshal_object_get_int(in_obj, "MsgId");
209 case SMS_MESSAGETYPE_USER_ACK: {
210 gchar *dstAddr_szAddress;
211 gchar *dstSubAddr_szAddress;
215 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.Digit = sipc_util_marshal_object_get_int(in_obj, "DstAddr.Digit");
216 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.NumberMode = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberMode");
217 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.NumberType = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberType");
218 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.NumberPlan = sipc_util_marshal_object_get_int(in_obj, "DstAddr.NumberPlan");
219 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstAddr.szAddrLength");
220 dstAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstAddr.szAddress");
221 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstAddr.szAddress[0]), dstAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
223 Origination subaddress
224 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstSubAddr.SubType = sipc_util_marshal_object_get_int(in_obj, "DstSubAddr.SubType");
225 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstSubAddr.Odd = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.Odd");
226 cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstSubAddr.szAddrLength = sipc_util_marshal_object_get_char(in_obj, "DstSubAddr.szAddrLength");
227 dstSubAddr_szAddress = sipc_util_marshal_object_get_string(in_obj, "DstSubAddr.szAddress");
228 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outAck.DstSubAddr.szAddress[0]), dstSubAddr_szAddress, SMS_MAXLENGTH_SMS_ADDRESS);
230 cdmaMsg.cdmaMsgInfo.MsgData.outAck.TeleService = sipc_util_marshal_object_get_int(in_obj, "TeleService");
231 cdmaMsg.cdmaMsgInfo.MsgData.outAck.bBearerReplySeqRequest = sipc_util_marshal_object_get_int(in_obj, "bBearerReplySeqRequest");
232 cdmaMsg.cdmaMsgInfo.MsgData.outAck.ReplySeqNumber = sipc_util_marshal_object_get_char(in_obj, "ReplySeqNumber");
233 cdmaMsg.cdmaMsgInfo.MsgData.outAck.MsgId = sipc_util_marshal_object_get_int(in_obj, "MsgId");
234 cdmaMsg.cdmaMsgInfo.MsgData.outAck.MsgEncoding = sipc_util_marshal_object_get_int(in_obj, "MsgEncoding");
235 cdmaMsg.cdmaMsgInfo.MsgData.outAck.MsgLength = sipc_util_marshal_object_get_int(in_obj, "MsgLength");
236 szData = sipc_util_marshal_object_get_string(in_obj, "szData");
237 memcpy(&(cdmaMsg.cdmaMsgInfo.MsgData.outAck.szData[0]), szData, SMS_MAXLENGTH_SMS_MO_USER_DATA);
238 cdmaMsg.cdmaMsgInfo.MsgData.outAck.UserResponseCode = sipc_util_marshal_object_get_char(in_obj, "UserResponseCode");
246 tcore_user_request_set_data(ur, sizeof(struct treq_sms_send_cdma_msg), &cdmaMsg);
247 tcore_user_request_set_command(ur, TREQ_SMS_SEND_CDMA_MSG);
249 ret = tcore_communicator_dispatch_request(comm, ur);
250 if (ret != TCORE_RETURN_SUCCESS) {
251 // api_err = TAPI_API_OPERATION_FAILED;
252 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
262 on_sms_read_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
266 struct treq_sms_read_msg readMsg = {0,};
267 struct custom_data *ctx = user_data;
268 UserRequest *ur = NULL;
270 readMsg.index = arg_index;
272 ur = MAKE_UR(ctx, sms, invocation);
273 tcore_user_request_set_data(ur, sizeof(struct treq_sms_read_msg), &readMsg);
274 tcore_user_request_set_command(ur, TREQ_SMS_READ_MSG);
276 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
277 if (ret != TCORE_RETURN_SUCCESS) {
278 // api_err = TAPI_API_OPERATION_FAILED;
279 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
286 on_sms_save_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
288 const gchar * arg_sca,
289 gint arg_tpdu_length,
290 const gchar * arg_tpdu_data,
293 struct treq_sms_save_msg saveMsg = {0,};
294 struct custom_data *ctx = user_data;
295 UserRequest *ur = NULL;
298 guchar *decoded_sca = NULL;
299 guchar *decoded_tpdu = NULL;
301 saveMsg.msgStatus = arg_msg_status;
303 decoded_sca = g_base64_decode(arg_sca, &length);
304 memcpy(&(saveMsg.msgDataPackage.sca[0]), decoded_sca, SMS_SMSP_ADDRESS_LEN);
306 saveMsg.msgDataPackage.msgLength = arg_tpdu_length;
308 decoded_tpdu = g_base64_decode(arg_tpdu_data, &length);
309 memcpy(&(saveMsg.msgDataPackage.tpduData[0]), decoded_tpdu, SMS_SMDATA_SIZE_MAX + 1);
311 ur = MAKE_UR(ctx, sms, invocation);
312 tcore_user_request_set_data(ur, sizeof(struct treq_sms_save_msg), &saveMsg);
313 tcore_user_request_set_command(ur, TREQ_SMS_SAVE_MSG);
319 g_free(decoded_tpdu);
321 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
322 if (ret != TCORE_RETURN_SUCCESS) {
323 // api_err = TAPI_API_OPERATION_FAILED;
324 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
331 on_sms_delete_msg(TelephonySms *sms, GDBusMethodInvocation *invocation,
335 struct treq_sms_delete_msg deleteMsg = {0,};
336 struct custom_data *ctx = user_data;
337 UserRequest *ur = NULL;
339 deleteMsg.index = arg_index;
341 ur = MAKE_UR(ctx, sms, invocation);
342 tcore_user_request_set_data(ur, sizeof(struct treq_sms_delete_msg), &deleteMsg);
343 tcore_user_request_set_command(ur, TREQ_SMS_DELETE_MSG);
345 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
346 if (ret != TCORE_RETURN_SUCCESS) {
347 // api_err = TAPI_API_OPERATION_FAILED;
348 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
355 on_sms_get_msg_count(TelephonySms *sms, GDBusMethodInvocation *invocation,
358 struct treq_sms_get_msg_count getMsgCnt;
359 struct custom_data *ctx = user_data;
360 UserRequest *ur = NULL;
362 ur = MAKE_UR(ctx, sms, invocation);
363 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_msg_count), &getMsgCnt);
364 tcore_user_request_set_command(ur, TREQ_SMS_GET_COUNT);
366 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
367 if (ret != TCORE_RETURN_SUCCESS) {
368 // api_err = TAPI_API_OPERATION_FAILED;
369 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
376 on_sms_get_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
380 struct treq_sms_get_sca getSca = {0,};
381 struct custom_data *ctx = user_data;
382 UserRequest *ur = NULL;
384 getSca.index = arg_index;
386 ur = MAKE_UR(ctx, sms, invocation);
387 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_sca), &getSca);
388 tcore_user_request_set_command(ur, TREQ_SMS_GET_SCA);
390 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
391 if (ret != TCORE_RETURN_SUCCESS) {
392 // api_err = TAPI_API_OPERATION_FAILED;
393 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
401 on_sms_set_sca(TelephonySms *sms, GDBusMethodInvocation *invocation,
405 gint arg_dialNumberLength,
406 const gchar *arg_dialNumber,
409 struct treq_sms_set_sca setSca;
410 struct custom_data *ctx = user_data;
411 UserRequest *ur = NULL;
413 memset(&setSca, 0, sizeof(struct treq_sms_set_sca));
415 setSca.index = arg_index;
416 setSca.scaInfo.dialNumLen = arg_dialNumberLength;
417 setSca.scaInfo.typeOfNum = arg_ton;
418 setSca.scaInfo.numPlanId = arg_npi;
420 if ((setSca.scaInfo.dialNumLen <= 0) || (setSca.scaInfo.dialNumLen > (SMS_MAX_SMS_SERVICE_CENTER_ADDR + 1)))
422 err("[tcore_SMS] TAPI_API_INVALID_INPUT !!!");
425 else if(setSca.index != 0)
427 err("[tcore_SMS] Index except 0 is supported");
428 // api_err = TAPI_API_NOT_SUPPORTED;
434 guchar *decoded_sca = NULL;
436 decoded_sca = g_base64_decode(arg_dialNumber, &length);
437 memcpy(&(setSca.scaInfo.diallingNum[0]), decoded_sca, SMS_SMSP_ADDRESS_LEN + 1);
439 ur = MAKE_UR(ctx, sms, invocation);
440 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_sca), &setSca);
441 tcore_user_request_set_command(ur, TREQ_SMS_SET_SCA);
446 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
447 if (ret != TCORE_RETURN_SUCCESS) {
448 //api_err = TAPI_API_OPERATION_FAILED;
449 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
458 on_sms_get_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
461 struct treq_sms_get_cb_config getCbConfig;
462 struct custom_data *ctx = user_data;
463 UserRequest *ur = NULL;
465 ur = MAKE_UR(ctx, sms, invocation);
466 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_cb_config), &getCbConfig);
467 tcore_user_request_set_command(ur, TREQ_SMS_GET_CB_CONFIG);
469 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
470 if (ret != TCORE_RETURN_SUCCESS) {
471 //api_err = TAPI_API_OPERATION_FAILED;
472 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
480 on_sms_set_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
481 gboolean arg_cbEnable,
483 gint arg_msgIdMaxCount,
485 const gchar *arg_msgId,
488 struct treq_sms_set_cb_config setCbConfig = {0,};
489 struct custom_data *ctx = user_data;
490 UserRequest *ur = NULL;
493 guchar *decoded_msgId = NULL;
495 setCbConfig.bCBEnabled = arg_cbEnable;
496 setCbConfig.selectedId = arg_slectedId;
497 setCbConfig.msgIdMaxCount = arg_msgIdMaxCount;
498 setCbConfig.msgIdCount = arg_msgIdCount;
500 decoded_msgId = g_base64_decode(arg_msgId, &length);
501 memcpy(&(setCbConfig.msgIDs[0]), decoded_msgId, SMS_GSM_SMS_CBMI_LIST_SIZE_MAX);
503 ur = MAKE_UR(ctx, sms, invocation);
504 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_cb_config), &setCbConfig);
505 tcore_user_request_set_command(ur, TREQ_SMS_SET_CB_CONFIG);
508 g_free(decoded_msgId);
510 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
511 if (ret != TCORE_RETURN_SUCCESS) {
512 //api_err = TAPI_API_OPERATION_FAILED;
513 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
521 on_sms_set_mem_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
522 gint arg_memoryStatus,
525 struct treq_sms_set_mem_status memStatus = {0,};
526 struct custom_data *ctx = user_data;
527 UserRequest *ur = NULL;
529 memStatus.memory_status = arg_memoryStatus;
531 ur = MAKE_UR(ctx, sms, invocation);
532 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_mem_status), &memStatus);
533 tcore_user_request_set_command(ur, TREQ_SMS_SET_MEM_STATUS);
535 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
536 if (ret != TCORE_RETURN_SUCCESS) {
537 //api_err = TAPI_API_OPERATION_FAILED;
538 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
546 on_sms_get_pref_bearer(TelephonySms *sms, GDBusMethodInvocation *invocation,
549 struct treq_sms_get_pref_bearer getPrefBearer;
550 struct custom_data *ctx = user_data;
551 UserRequest *ur = NULL;
553 ur = MAKE_UR(ctx, sms, invocation);
554 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_pref_bearer), &getPrefBearer);
555 tcore_user_request_set_command(ur, TREQ_SMS_GET_PREF_BEARER);
557 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
558 if (ret != TCORE_RETURN_SUCCESS) {
559 //api_err = TAPI_API_OPERATION_FAILED;
560 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
567 on_sms_set_pref_bearer(TelephonySms *sms, GDBusMethodInvocation *invocation,
571 struct treq_sms_set_pref_bearer setPrefBearer = {0,};
572 struct custom_data *ctx = user_data;
573 UserRequest *ur = NULL;
575 setPrefBearer.svc = arg_bearerType;
577 ur = MAKE_UR(ctx, sms, invocation);
578 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_pref_bearer), &setPrefBearer);
579 tcore_user_request_set_command(ur, TREQ_SMS_SET_PREF_BEARER);
581 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
582 if (ret != TCORE_RETURN_SUCCESS) {
583 //api_err = TAPI_API_OPERATION_FAILED;
584 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
592 on_sms_set_delivery_report(TelephonySms *sms, GDBusMethodInvocation *invocation,
593 const gchar *arg_sca,
594 gint arg_tpdu_length,
595 const gchar *arg_tpdu_data,
599 struct treq_sms_set_delivery_report deliveryReport;
600 struct custom_data *ctx = user_data;
601 UserRequest *ur = NULL;
604 guchar *decoded_sca = NULL;
605 guchar *decoded_tpdu = NULL;
607 memset(&deliveryReport, 0, sizeof(struct treq_sms_set_delivery_report));
609 decoded_sca = g_base64_decode(arg_sca, &length);
610 memcpy(&(deliveryReport.dataInfo.sca[0]), decoded_sca, SMS_SMSP_ADDRESS_LEN);
612 deliveryReport.dataInfo.msgLength = arg_tpdu_length;
614 decoded_tpdu = g_base64_decode(arg_tpdu_data, &length);
615 memcpy(&(deliveryReport.dataInfo.tpduData[0]), decoded_tpdu, SMS_SMDATA_SIZE_MAX + 1);
617 deliveryReport.rspType = arg_rpCause;
619 ur = MAKE_UR(ctx, sms, invocation);
620 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_delivery_report), &deliveryReport);
621 tcore_user_request_set_command(ur, TREQ_SMS_SET_DELIVERY_REPORT);
627 g_free(decoded_tpdu);
629 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
630 if (ret != TCORE_RETURN_SUCCESS) {
631 //api_err = TAPI_API_OPERATION_FAILED;
632 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
640 on_sms_set_msg_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
645 struct treq_sms_set_msg_status msgStatus = {0,};
646 struct custom_data *ctx = user_data;
647 UserRequest *ur = NULL;
649 msgStatus.index = arg_index;
650 msgStatus.msgStatus = arg_msgStatus;
652 ur = MAKE_UR(ctx, sms, invocation);
653 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_msg_status), &msgStatus);
654 tcore_user_request_set_command(ur, TREQ_SMS_SET_MSG_STATUS);
656 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
657 if (ret != TCORE_RETURN_SUCCESS) {
658 //api_err = TAPI_API_OPERATION_FAILED;
659 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
667 on_sms_get_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
671 struct treq_sms_get_params getParams = {0,};
672 struct custom_data *ctx = user_data;
673 UserRequest *ur = NULL;
675 getParams.index = arg_index;
677 ur = MAKE_UR(ctx, sms, invocation);
678 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_params), &getParams);
679 tcore_user_request_set_command(ur, TREQ_SMS_GET_PARAMS);
681 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
682 if (ret != TCORE_RETURN_SUCCESS) {
683 //api_err = TAPI_API_OPERATION_FAILED;
684 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
692 on_sms_set_sms_params(TelephonySms *sms, GDBusMethodInvocation *invocation,
693 gint arg_recordIndex,
696 const gchar *arg_alphaId,
697 gint arg_paramIndicator,
698 gint arg_destAddr_DialNumLen,
699 gint arg_destAddr_Ton,
700 gint arg_destAddr_Npi,
701 const gchar *arg_destAddr_DiallingNum,
702 gint arg_svcCntrAddr_DialNumLen,
703 gint arg_SvcCntrAddr_Ton,
704 gint arg_svcCntrAddr_Npi,
705 const gchar *arg_svcCntrAddr_DialNum,
707 gint arg_dataCodingScheme,
708 gint arg_validityPeriod,
711 struct treq_sms_set_params setParams;
712 struct custom_data *ctx = user_data;
713 UserRequest *ur = NULL;
716 guchar *decoded_alphaId = NULL;
717 guchar *decoded_destDialNum = NULL;
718 guchar *decoded_scaDialNum = NULL;
720 memset(&setParams, 0, sizeof(struct treq_sms_set_params));
722 setParams.params.recordIndex = arg_recordIndex;
723 setParams.params.recordLen = arg_recordLen;
724 setParams.params.alphaIdLen = arg_alphaIdLen;
725 decoded_alphaId = g_base64_decode(arg_alphaId, &length);
726 memcpy(&(setParams.params.szAlphaId[0]), decoded_alphaId, SMS_SMSP_ALPHA_ID_LEN_MAX + 1);
727 setParams.params.paramIndicator = arg_paramIndicator;
729 setParams.params.tpDestAddr.dialNumLen = arg_destAddr_DialNumLen;
730 setParams.params.tpDestAddr.typeOfNum = arg_destAddr_Ton;
731 setParams.params.tpDestAddr.numPlanId = arg_destAddr_Npi;
732 decoded_destDialNum = g_base64_decode(arg_destAddr_DiallingNum, &length);
733 memcpy(&(setParams.params.tpDestAddr.diallingNum[0]), decoded_destDialNum, SMS_SMSP_ADDRESS_LEN + 1);
735 setParams.params.tpSvcCntrAddr.dialNumLen = arg_svcCntrAddr_DialNumLen;
736 setParams.params.tpSvcCntrAddr.typeOfNum = arg_SvcCntrAddr_Ton;
737 setParams.params.tpSvcCntrAddr.numPlanId = arg_svcCntrAddr_Npi;
738 decoded_scaDialNum = g_base64_decode(arg_svcCntrAddr_DialNum, &length);
739 memcpy(&(setParams.params.tpSvcCntrAddr.diallingNum[0]), decoded_scaDialNum, SMS_SMSP_ADDRESS_LEN + 1);
741 setParams.params.tpProtocolId = arg_protocolId;
742 setParams.params.tpDataCodingScheme = arg_dataCodingScheme;
743 setParams.params.tpValidityPeriod = arg_validityPeriod;
745 ur = MAKE_UR(ctx, sms, invocation);
746 tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_params), &setParams);
747 tcore_user_request_set_command(ur, TREQ_SMS_SET_PARAMS);
750 g_free(decoded_alphaId);
752 if(decoded_destDialNum)
753 g_free(decoded_destDialNum);
755 if(decoded_scaDialNum)
756 g_free(decoded_scaDialNum);
758 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
759 if (ret != TCORE_RETURN_SUCCESS) {
760 //api_err = TAPI_API_OPERATION_FAILED;
761 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
769 on_sms_get_sms_param_cnt(TelephonySms *sms, GDBusMethodInvocation *invocation,
772 struct treq_sms_get_paramcnt getParamCnt;
773 struct custom_data *ctx = user_data;
774 UserRequest *ur = NULL;
776 ur = MAKE_UR(ctx, sms, invocation);
777 tcore_user_request_set_data(ur, sizeof(struct treq_sms_get_paramcnt), &getParamCnt);
778 tcore_user_request_set_command(ur, TREQ_SMS_GET_PARAMCNT);
780 ret = tcore_communicator_dispatch_request(ctx->comm, ur);
781 if (ret != TCORE_RETURN_SUCCESS) {
782 //api_err = TAPI_API_OPERATION_FAILED;
783 err("[tcore_SMS] communicator_dispatch_request is fail [0x%x] !!!", ret);
791 on_sms_get_sms_ready_status(TelephonySms *sms, GDBusMethodInvocation *invocation,
794 struct custom_data *ctx = user_data;
795 GSList *co_list = NULL;
796 CoreObject *co_sms = NULL;
797 TcorePlugin *plugin = NULL;
799 dbg("Func Entrance");
801 plugin = tcore_server_find_plugin(ctx->server, TCORE_PLUGIN_DEFAULT);
802 co_list = tcore_plugin_get_core_objects_bytype(plugin, CORE_OBJECT_TYPE_SMS);
804 dbg("error- co_list is NULL");
808 co_sms = (CoreObject *)co_list->data;
809 g_slist_free(co_list);
812 dbg("error- co_sms is NULL");
816 telephony_sms_complete_get_sms_ready_status(sms, invocation, tcore_sms_get_ready_status(co_sms));
821 gboolean dbus_plugin_setup_sms_interface(TelephonyObjectSkeleton *object, struct custom_data *ctx)
825 sms = telephony_sms_skeleton_new();
826 telephony_object_skeleton_set_sms(object, sms);
829 g_signal_connect(sms, "handle-send-msg", G_CALLBACK (on_sms_send_msg), ctx);
830 g_signal_connect(sms, "handle-read-msg", G_CALLBACK (on_sms_read_msg), ctx);
831 g_signal_connect(sms, "handle-save-msg", G_CALLBACK (on_sms_save_msg), ctx);
832 g_signal_connect(sms, "handle-delete-msg", G_CALLBACK (on_sms_delete_msg), ctx);
833 g_signal_connect(sms, "handle-get-msg-count", G_CALLBACK (on_sms_get_msg_count), ctx);
834 g_signal_connect(sms, "handle-get-sca", G_CALLBACK (on_sms_get_sca), ctx);
835 g_signal_connect(sms, "handle-set-sca", G_CALLBACK (on_sms_set_sca), ctx);
836 g_signal_connect(sms, "handle-get-cb-config", G_CALLBACK (on_sms_get_cb_config), ctx);
837 g_signal_connect(sms, "handle-set-cb-config", G_CALLBACK (on_sms_set_cb_config), ctx);
838 g_signal_connect(sms, "handle-set-mem-status", G_CALLBACK (on_sms_set_mem_status), ctx);
839 g_signal_connect(sms, "handle-get-pref-bearer", G_CALLBACK (on_sms_get_pref_bearer), ctx);
840 g_signal_connect(sms, "handle-set-pref-bearer", G_CALLBACK (on_sms_set_pref_bearer), ctx);
841 g_signal_connect(sms, "handle-set-delivery-report", G_CALLBACK (on_sms_set_delivery_report), ctx);
842 g_signal_connect(sms, "handle-set-msg-status", G_CALLBACK (on_sms_set_msg_status), ctx);
843 g_signal_connect(sms, "handle-get-sms-params", G_CALLBACK (on_sms_get_sms_params), ctx);
844 g_signal_connect(sms, "handle-set-sms-params", G_CALLBACK (on_sms_set_sms_params), ctx);
845 g_signal_connect(sms, "handle-get-sms-param-cnt", G_CALLBACK (on_sms_get_sms_param_cnt), ctx);
846 g_signal_connect(sms, "handle-get-sms-ready-status", G_CALLBACK (on_sms_get_sms_ready_status), ctx);
851 gboolean dbus_plugin_sms_response(struct custom_data *ctx, UserRequest *ur, struct dbus_request_info *dbus_info, enum tcore_response_command command, unsigned int data_len, const void *data)
855 char *modem_name = NULL;
856 TcorePlugin *p = NULL;
858 modem_name = tcore_user_request_get_modem_name(ur);
862 p = tcore_server_find_plugin(ctx->server, modem_name);
867 co_list = tcore_plugin_get_core_objects_bytype(p, CORE_OBJECT_TYPE_SMS);
872 co_sms = (CoreObject *)co_list->data;
873 g_slist_free(co_list);
880 case TRESP_SMS_SEND_UMTS_MSG: {
881 const struct tresp_sms_send_umts_msg *resp = data;
884 dbg("receive TRESP_SMS_SEND_UMTS_MSG");
885 dbg("resp->result = 0x%x", resp->result);
887 telephony_sms_complete_send_msg(dbus_info->interface_object, dbus_info->invocation, resp->result);
892 case TRESP_SMS_SEND_CDMA_MSG: {
893 const struct tresp_sms_send_cdma_msg *resp = data;
895 dbg("receive TRESP_SMS_SEND_CDMA_MSG");
896 dbg("resp->result = 0x%x", resp->result);
899 resp->causeCode.ReplySeqNumber
900 resp->causeCode.ErrClass
901 resp->causeCode.Cause
906 case TRESP_SMS_READ_MSG: {
907 const struct tresp_sms_read_msg *resp = data;
911 dbg("receive TRESP_SMS_READ_MSG");
912 dbg("resp->result = 0x%x", resp->result);
914 sca = g_base64_encode((const guchar *)&(resp->dataInfo.smsData.sca[0]), SMS_SMSP_ADDRESS_LEN);
916 dbg("g_base64_encode: Failed to Enocde the SCA.");
920 tpdu = g_base64_encode((const guchar *)&(resp->dataInfo.smsData.tpduData[0]), SMS_SMDATA_SIZE_MAX + 1);
922 dbg("g_base64_encode: Failed to Enocde the SCA.");
926 telephony_sms_complete_read_msg(dbus_info->interface_object, dbus_info->invocation,
928 resp->dataInfo.msgStatus,
930 resp->dataInfo.smsData.msgLength,
942 case TRESP_SMS_SAVE_MSG: {
943 const struct tresp_sms_save_msg *resp = data;
945 dbg("receive TRESP_SMS_SAVE_MSG");
946 dbg("resp->result = 0x%x", resp->result);
948 telephony_sms_complete_save_msg (dbus_info->interface_object, dbus_info->invocation,
954 case TRESP_SMS_DELETE_MSG: {
955 const struct tresp_sms_delete_msg *resp = data;
957 dbg("receive TRESP_SMS_DELETE_MSG");
958 dbg("resp->result = 0x%x", resp->result);
960 telephony_sms_complete_delete_msg(dbus_info->interface_object, dbus_info->invocation,
966 case TRESP_SMS_GET_STORED_MSG_COUNT: {
967 const struct tresp_sms_get_storedMsgCnt *resp = data;
968 gchar *msgCnt = NULL;
970 dbg("receive TRESP_SMS_GET_STORED_MSG_COUNT");
971 dbg("resp->result = 0x%x", resp->result);
973 msgCnt = g_base64_encode((const guchar *)&(resp->storedMsgCnt.indexList[0]), SMS_GSM_SMS_MSG_NUM_MAX + 1);
974 if (msgCnt == NULL) {
975 dbg("g_base64_encode: Failed to Enocde storedMsgCnt.indexList");
979 telephony_sms_complete_get_msg_count(dbus_info->interface_object, dbus_info->invocation,
981 resp->storedMsgCnt.totalCount,
982 resp->storedMsgCnt.usedCount,
991 case TRESP_SMS_GET_SCA: {
992 const struct tresp_sms_get_sca *resp = data;
995 dbg("receive TRESP_SMS_GET_SCA");
996 dbg("resp->result = 0x%x", resp->result);
998 sca = g_base64_encode((const guchar *)&(resp->scaAddress.diallingNum[0]), SMS_SMSP_ADDRESS_LEN + 1);
1000 dbg("g_base64_encode: Failed to Enocde scaAddress.diallingNum");
1004 telephony_sms_complete_get_sca(dbus_info->interface_object, dbus_info->invocation,
1006 resp->scaAddress.typeOfNum,
1007 resp->scaAddress.numPlanId,
1008 resp->scaAddress.dialNumLen,
1017 case TRESP_SMS_SET_SCA: {
1018 const struct tresp_sms_set_sca *resp = data;
1020 dbg("receive TRESP_SMS_SET_SCA");
1021 dbg("resp->result = 0x%x", resp->result);
1023 telephony_sms_complete_set_sca(dbus_info->interface_object, dbus_info->invocation,
1029 case TRESP_SMS_GET_CB_CONFIG: {
1030 const struct tresp_sms_get_cb_config *resp = data;
1031 gchar *msgIDs = NULL;
1033 dbg("receive TRESP_SMS_GET_CB_CONFIG");
1034 dbg("resp->result = 0x%x", resp->result);
1036 msgIDs = g_base64_encode((const guchar *)&(resp->cbConfig.msgIDs[0]), SMS_GSM_SMS_CBMI_LIST_SIZE_MAX);
1037 if (msgIDs == NULL) {
1038 dbg("g_base64_encode: Failed to Enocde cbConfig.msgIDs");
1042 telephony_sms_complete_get_cb_config(dbus_info->interface_object, dbus_info->invocation,
1044 resp->cbConfig.bCBEnabled,
1045 resp->cbConfig.selectedId,
1046 resp->cbConfig.msgIdMaxCount,
1047 resp->cbConfig.msgIdCount,
1056 case TRESP_SMS_SET_CB_CONFIG: {
1057 const struct tresp_sms_set_cb_config *resp = data;
1059 dbg("receive TRESP_SMS_SET_CB_CONFIG");
1060 dbg("resp->result = 0x%x", resp->result);
1062 telephony_sms_complete_set_cb_config(dbus_info->interface_object, dbus_info->invocation,
1068 case TRESP_SMS_SET_MEM_STATUS: {
1069 const struct tresp_sms_set_mem_status *resp = data;
1071 dbg("receive TRESP_SMS_SET_MEM_STATUS");
1072 dbg("resp->result = 0x%x", resp->result);
1074 telephony_sms_complete_set_mem_status(dbus_info->interface_object, dbus_info->invocation,
1079 case TRESP_SMS_GET_PREF_BEARER: {
1080 const struct tresp_sms_get_pref_bearer *resp = data;
1082 dbg("receive TRESP_SMS_GET_PREF_BEARER");
1083 dbg("resp->result = 0x%x", resp->result);
1085 telephony_sms_complete_get_pref_bearer(dbus_info->interface_object, dbus_info->invocation,
1091 case TRESP_SMS_SET_PREF_BEARER: {
1092 const struct tresp_sms_set_pref_bearer *resp = data;
1094 dbg("receive TRESP_SMS_SET_PREF_BEARER");
1095 dbg("resp->result = 0x%x", resp->result);
1097 telephony_sms_complete_set_pref_bearer(dbus_info->interface_object, dbus_info->invocation,
1103 case TRESP_SMS_SET_DELIVERY_REPORT: {
1104 const struct tresp_sms_set_delivery_report *resp = data;
1106 dbg("receive TRESP_SMS_SET_DELIVERY_REPORT");
1107 dbg("resp->result = 0x%x", resp->result);
1109 telephony_sms_complete_set_delivery_report(dbus_info->interface_object, dbus_info->invocation,
1115 case TRESP_SMS_SET_MSG_STATUS: {
1116 const struct tresp_sms_set_mem_status *resp = data;
1118 dbg("receive TRESP_SMS_SET_MSG_STATUS");
1119 dbg("resp->result = 0x%x", resp->result);
1121 telephony_sms_complete_set_msg_status(dbus_info->interface_object, dbus_info->invocation,
1127 case TRESP_SMS_GET_PARAMS: {
1128 const struct tresp_sms_get_params *resp = data;
1129 gchar *alphaId = NULL;
1130 gchar *destDialNum = NULL;
1131 gchar *scaDialNum = NULL;
1133 dbg("receive TRESP_SMS_GET_PARAMS");
1134 dbg("resp->result = 0x%x", resp->result);
1136 alphaId = g_base64_encode((const guchar *)&(resp->paramsInfo.szAlphaId[0]), SMS_SMSP_ALPHA_ID_LEN_MAX + 1);
1137 if (alphaId == NULL) {
1138 dbg("g_base64_encode: Failed to Enocde paramsInfo.szAlphaId");
1142 destDialNum = g_base64_encode((const guchar *)&(resp->paramsInfo.tpDestAddr.diallingNum[0]), SMS_SMSP_ADDRESS_LEN + 1);
1143 if (alphaId == NULL) {
1144 dbg("g_base64_encode: Failed to Enocde paramsInfo.tpDestAddr.diallingNum");
1148 scaDialNum = g_base64_encode((const guchar *)&(resp->paramsInfo.tpSvcCntrAddr.diallingNum[0]), SMS_SMSP_ADDRESS_LEN + 1);
1149 if (alphaId == NULL) {
1150 dbg("g_base64_encode: Failed to Enocde paramsInfo.tpSvcCntrAddr.diallingNum");
1154 telephony_sms_complete_get_sms_params(dbus_info->interface_object, dbus_info->invocation,
1156 resp->paramsInfo.recordIndex,
1157 resp->paramsInfo.recordLen,
1158 resp->paramsInfo.alphaIdLen,
1160 resp->paramsInfo.paramIndicator,
1161 resp->paramsInfo.tpDestAddr.dialNumLen,
1162 resp->paramsInfo.tpDestAddr.typeOfNum,
1163 resp->paramsInfo.tpDestAddr.numPlanId,
1165 resp->paramsInfo.tpSvcCntrAddr.dialNumLen,
1166 resp->paramsInfo.tpSvcCntrAddr.typeOfNum,
1167 resp->paramsInfo.tpSvcCntrAddr.numPlanId,
1169 resp->paramsInfo.tpProtocolId,
1170 resp->paramsInfo.tpDataCodingScheme,
1171 resp->paramsInfo.tpValidityPeriod);
1177 g_free(destDialNum);
1185 case TRESP_SMS_SET_PARAMS:{
1186 const struct tresp_sms_set_params *resp = data;
1188 dbg("receive TRESP_SMS_SET_PARAMS");
1189 dbg("resp->result = 0x%x", resp->result);
1191 telephony_sms_complete_set_sms_params(dbus_info->interface_object, dbus_info->invocation,
1197 case TRESP_SMS_GET_PARAMCNT: {
1198 const struct tresp_sms_get_paramcnt *resp = data;
1200 dbg("receive TRESP_SMS_GET_PARAMCNT");
1201 dbg("resp->result = 0x%x", resp->result);
1203 telephony_sms_complete_get_sms_param_cnt(dbus_info->interface_object, dbus_info->invocation,
1217 gboolean dbus_plugin_sms_notification(struct custom_data *ctx, const char *plugin_name, TelephonyObjectSkeleton *object, enum tcore_notification_command command, unsigned int data_len, const void *data)
1223 dbg("object is NULL");
1227 sms = telephony_object_peek_sms(TELEPHONY_OBJECT(object));
1228 dbg("sms = %p", sms);
1230 dbg("[tcore_SMS]notification !!! (command = 0x%x, data_len = %d)", command, data_len);
1233 case TNOTI_SMS_INCOM_MSG: {
1234 const struct tnoti_sms_umts_msg *noti = data;
1239 sca = g_base64_encode((const guchar *)&(noti->msgInfo.sca[0]), SMS_SMSP_ADDRESS_LEN);
1241 dbg("g_base64_encode: Failed to Enocde msgInfo.sca");
1245 tpdu = g_base64_encode((const guchar *)&(noti->msgInfo.tpduData[0]), SMS_SMDATA_SIZE_MAX + 1);
1247 dbg("g_base64_encode: Failed to Enocde msgInfo.tpduData");
1251 telephony_sms_emit_incomming_msg(sms,
1253 noti->msgInfo.msgLength,
1265 case TNOTI_SMS_CB_INCOM_MSG: {
1266 const struct tnoti_sms_cellBroadcast_msg *noti = data;
1267 gchar *msgData = NULL;
1269 msgData = g_base64_encode((const guchar *)&(noti->cbMsg.msgData[0]), SMS_SMSP_ADDRESS_LEN);
1270 if (msgData == NULL) {
1271 dbg("g_base64_encode: Failed to Enocde cbMsg.msgData");
1275 telephony_sms_emit_incomming_cb_msg(sms,
1276 noti->cbMsg.cbMsgType,
1286 case TNOTI_SMS_INCOM_EX_MSG: {
1288 noti->cdmaMsg.ParamMask), SIPC_MARSHAL_DATA_INT_TYPE);
1289 noti->cdmaMsg.MsgType), SIPC_MARSHAL_DATA_INT_TYPE);
1291 switch(noti->cdmaMsg.MsgType)
1293 case SMS_MESSAGETYPE_DELIVER:
1294 /* Origination address */
1295 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.Digit), SIPC_MARSHAL_DATA_INT_TYPE);
1296 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.NumberMode), SIPC_MARSHAL_DATA_INT_TYPE);
1297 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.NumberType), SIPC_MARSHAL_DATA_INT_TYPE);
1298 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.NumberPlan), SIPC_MARSHAL_DATA_INT_TYPE);
1299 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1300 noti->cdmaMsg.MsgData.inDeliver.OrigAddr.szAddress[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1302 /* Origination subaddress */
1303 noti->cdmaMsg.MsgData.inDeliver.OrigSubAddr.SubType), SIPC_MARSHAL_DATA_INT_TYPE);
1304 noti->cdmaMsg.MsgData.inDeliver.OrigSubAddr.Odd), SIPC_MARSHAL_DATA_CHAR_TYPE);
1305 noti->cdmaMsg.MsgData.inDeliver.OrigSubAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1306 noti->cdmaMsg.MsgData.inDeliver.OrigSubAddr.szAddress[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1308 noti->cdmaMsg.MsgData.inDeliver.TeleService), SIPC_MARSHAL_DATA_INT_TYPE);
1309 noti->cdmaMsg.MsgData.inDeliver.bBearerReplySeqRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1310 noti->cdmaMsg.MsgData.inDeliver.ReplySeqNumber), SIPC_MARSHAL_DATA_CHAR_TYPE);
1311 noti->cdmaMsg.MsgData.inDeliver.MsgId), SIPC_MARSHAL_DATA_INT_TYPE);
1312 noti->cdmaMsg.MsgData.inDeliver.MsgEncoding), SIPC_MARSHAL_DATA_INT_TYPE);
1313 noti->cdmaMsg.MsgData.inDeliver.MsgLength), SIPC_MARSHAL_DATA_INT_TYPE);
1314 noti->cdmaMsg.MsgData.inDeliver.szData[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1316 /* Message center time stamp */
1317 void *)&(noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.year), SIPC_MARSHAL_DATA_INT_TYPE);
1318 noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.month), SIPC_MARSHAL_DATA_INT_TYPE);
1319 noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.day), SIPC_MARSHAL_DATA_INT_TYPE);
1320 noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1321 noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1322 noti->cdmaMsg.MsgData.inDeliver.MessageCenterTimeStamp.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1324 /* Validity period - Absolute */
1325 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.year), SIPC_MARSHAL_DATA_INT_TYPE);
1326 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.month), SIPC_MARSHAL_DATA_INT_TYPE);
1327 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.day), SIPC_MARSHAL_DATA_INT_TYPE);
1328 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1329 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1330 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodAbs.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1332 noti->cdmaMsg.MsgData.inDeliver.ValidityPeriodRel), SIPC_MARSHAL_DATA_CHAR_TYPE);
1334 /* Deferred delivery time - Absolute (not supported) */
1335 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.year), SIPC_MARSHAL_DATA_INT_TYPE);
1336 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.month), SIPC_MARSHAL_DATA_INT_TYPE);
1337 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.day), SIPC_MARSHAL_DATA_INT_TYPE);
1338 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1339 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1340 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeAbs.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1342 /* Deferred delivery time - Relative (not supported) */
1343 noti->cdmaMsg.MsgData.inDeliver.DeferredDelTimeRel), SIPC_MARSHAL_DATA_CHAR_TYPE);
1345 noti->cdmaMsg.MsgData.inDeliver.Priority), SIPC_MARSHAL_DATA_INT_TYPE);
1346 noti->cdmaMsg.MsgData.inDeliver.Privacy), SIPC_MARSHAL_DATA_INT_TYPE);
1347 noti->cdmaMsg.MsgData.inDeliver.NumMsg), SIPC_MARSHAL_DATA_CHAR_TYPE);
1348 noti->cdmaMsg.MsgData.inDeliver.bUserAckRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1349 noti->cdmaMsg.MsgData.inDeliver.bDeliveryAckRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1350 noti->cdmaMsg.MsgData.inDeliver.AlertPriority), SIPC_MARSHAL_DATA_INT_TYPE);
1351 noti->cdmaMsg.MsgData.inDeliver.MsgLang), SIPC_MARSHAL_DATA_INT_TYPE);
1353 /* Callback number address */
1354 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.Digit), SIPC_MARSHAL_DATA_INT_TYPE);
1355 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.NumberMode), SIPC_MARSHAL_DATA_INT_TYPE);
1356 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.NumberType), SIPC_MARSHAL_DATA_INT_TYPE);
1357 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.NumberPlan), SIPC_MARSHAL_DATA_INT_TYPE);
1358 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1359 noti->cdmaMsg.MsgData.inDeliver.CallBackNumer.szAddress[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1361 noti->cdmaMsg.MsgData.inDeliver.Display), SIPC_MARSHAL_DATA_INT_TYPE);
1365 case SMS_MESSAGETYPE_DELIVERY_ACK:
1366 /* Origination address */
1367 noti->cdmaMsg.MsgData.inAck.OrigAddr.Digit), SIPC_MARSHAL_DATA_INT_TYPE);
1368 noti->cdmaMsg.MsgData.inAck.OrigAddr.NumberMode), SIPC_MARSHAL_DATA_INT_TYPE);
1369 noti->cdmaMsg.MsgData.inAck.OrigAddr.NumberType), SIPC_MARSHAL_DATA_INT_TYPE);
1370 noti->cdmaMsg.MsgData.inAck.OrigAddr.NumberPlan), SIPC_MARSHAL_DATA_INT_TYPE);
1371 noti->cdmaMsg.MsgData.inAck.OrigAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1372 noti->cdmaMsg.MsgData.inAck.OrigAddr.szAddress[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1374 /* Origination subaddress */
1375 noti->cdmaMsg.MsgData.inAck.OrigSubAddr.SubType), SIPC_MARSHAL_DATA_INT_TYPE);
1376 noti->cdmaMsg.MsgData.inAck.OrigSubAddr.Odd), SIPC_MARSHAL_DATA_CHAR_TYPE);
1377 noti->cdmaMsg.MsgData.inAck.OrigSubAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1378 noti->cdmaMsg.MsgData.inAck.OrigSubAddr.szAddress), SIPC_MARSHAL_DATA_CHAR_TYPE);
1380 noti->cdmaMsg.MsgData.inAck.TeleService), SIPC_MARSHAL_DATA_INT_TYPE);
1381 noti->cdmaMsg.MsgData.inAck.bBearerReplySeqRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1382 noti->cdmaMsg.MsgData.inAck.ReplySeqNumber), SIPC_MARSHAL_DATA_CHAR_TYPE);
1383 noti->cdmaMsg.MsgData.inAck.MsgId), SIPC_MARSHAL_DATA_INT_TYPE);
1384 noti->cdmaMsg.MsgData.inAck.MsgEncoding), SIPC_MARSHAL_DATA_INT_TYPE);
1385 noti->cdmaMsg.MsgData.inAck.MsgLength), SIPC_MARSHAL_DATA_INT_TYPE);
1386 noti->cdmaMsg.MsgData.inAck.szData[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1388 noti->cdmaMsg.MsgData.inAck.UserResponseCode), SIPC_MARSHAL_DATA_CHAR_TYPE);
1390 /* Message center time stamp */
1391 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.year), SIPC_MARSHAL_DATA_INT_TYPE);
1392 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.month), SIPC_MARSHAL_DATA_INT_TYPE);
1393 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.day), SIPC_MARSHAL_DATA_INT_TYPE);
1394 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1395 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1396 noti->cdmaMsg.MsgData.inAck.MessageCenterTimeStamp.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1400 case SMS_MESSAGETYPE_USER_ACK:
1401 /* Origination address */
1402 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.Digit), SIPC_MARSHAL_DATA_INT_TYPE);
1403 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.NumberMode), SIPC_MARSHAL_DATA_INT_TYPE);
1404 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.NumberType), SIPC_MARSHAL_DATA_INT_TYPE);
1405 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.NumberPlan), SIPC_MARSHAL_DATA_INT_TYPE);
1406 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1407 noti->cdmaMsg.MsgData.inDeliverAck.OrigAddr.szAddress[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1409 /* Origination subaddress */
1410 noti->cdmaMsg.MsgData.inDeliverAck.OrigSubAddr.SubType), SIPC_MARSHAL_DATA_INT_TYPE);
1411 noti->cdmaMsg.MsgData.inDeliverAck.OrigSubAddr.Odd), SIPC_MARSHAL_DATA_CHAR_TYPE);
1412 noti->cdmaMsg.MsgData.inDeliverAck.OrigSubAddr.szAddrLength), SIPC_MARSHAL_DATA_CHAR_TYPE);
1413 noti->cdmaMsg.MsgData.inDeliverAck.OrigSubAddr.szAddress), SIPC_MARSHAL_DATA_CHAR_TYPE);
1415 noti->cdmaMsg.MsgData.inDeliverAck.TeleService), SIPC_MARSHAL_DATA_INT_TYPE);
1416 noti->cdmaMsg.MsgData.inDeliverAck.bBearerReplySeqRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1417 noti->cdmaMsg.MsgData.inDeliverAck.ReplySeqNumber), SIPC_MARSHAL_DATA_CHAR_TYPE);
1418 noti->cdmaMsg.MsgData.inDeliverAck.MsgId), SIPC_MARSHAL_DATA_INT_TYPE);
1419 noti->cdmaMsg.MsgData.inDeliverAck.MsgEncoding), SIPC_MARSHAL_DATA_INT_TYPE);
1420 noti->cdmaMsg.MsgData.inDeliverAck.MsgLength), SIPC_MARSHAL_DATA_INT_TYPE);
1421 noti->cdmaMsg.MsgData.inDeliverAck.szData[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1423 /* Message center time stamp */
1424 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.year), SIPC_MARSHAL_DATA_INT_TYPE);
1425 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.month), SIPC_MARSHAL_DATA_INT_TYPE);
1426 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.day), SIPC_MARSHAL_DATA_INT_TYPE);
1427 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1428 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1429 noti->cdmaMsg.MsgData.inDeliverAck.MessageCenterTimeStamp.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1439 case TNOTI_SMS_CB_INCOM_EX_MSG: {
1441 noti->cdmaMsg.MsgData.inBc.ServiceCategory), SIPC_MARSHAL_DATA_INT_TYPE);
1443 noti->cdmaMsg.MsgData.inBc.MsgId), SIPC_MARSHAL_DATA_INT_TYPE);
1444 noti->cdmaMsg.MsgData.inBc.bBearerReplySeqRequest), SIPC_MARSHAL_DATA_INT_TYPE);
1445 noti->cdmaMsg.MsgData.inBc.ReplySeqNumber), SIPC_MARSHAL_DATA_CHAR_TYPE);
1446 noti->cdmaMsg.MsgData.inBc.MsgEncoding), SIPC_MARSHAL_DATA_INT_TYPE);
1447 noti->cdmaMsg.MsgData.inBc.MsgLength), SIPC_MARSHAL_DATA_INT_TYPE);
1448 noti->cdmaMsg.MsgData.inBc.szData[0]), SIPC_MARSHAL_DATA_STRING_TYPE);
1450 /* Message center time stamp */
1451 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.year), SIPC_MARSHAL_DATA_INT_TYPE);
1452 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.month), SIPC_MARSHAL_DATA_INT_TYPE);
1453 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.day), SIPC_MARSHAL_DATA_INT_TYPE);
1454 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1455 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1456 noti->cdmaMsg.MsgData.inBc.MessageCenterTimeStamp.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1458 /* Validity period - Absolute */
1459 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.year), SIPC_MARSHAL_DATA_INT_TYPE);
1460 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.month), SIPC_MARSHAL_DATA_INT_TYPE);
1461 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.day), SIPC_MARSHAL_DATA_INT_TYPE);
1462 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.hours), SIPC_MARSHAL_DATA_INT_TYPE);
1463 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.minutes), SIPC_MARSHAL_DATA_INT_TYPE);
1464 noti->cdmaMsg.MsgData.inBc.ValidityPeriodAbs.seconds), SIPC_MARSHAL_DATA_INT_TYPE);
1466 noti->cdmaMsg.MsgData.inBc.ValidityPeriodRel), SIPC_MARSHAL_DATA_CHAR_TYPE);
1468 noti->cdmaMsg.MsgData.inBc.Priority), SIPC_MARSHAL_DATA_INT_TYPE);
1469 noti->cdmaMsg.MsgData.inBc.AlertPriority), SIPC_MARSHAL_DATA_INT_TYPE);
1470 noti->cdmaMsg.MsgData.inBc.MsgLang), SIPC_MARSHAL_DATA_INT_TYPE);
1471 noti->cdmaMsg.MsgData.inBc.Display), SIPC_MARSHAL_DATA_INT_TYPE);
1477 case TNOTI_SMS_MEMORY_STATUS: {
1478 const struct tnoti_sms_memory_status *noti = data;
1480 telephony_sms_emit_memory_status(sms, noti->status);
1485 case TNOTI_SMS_DEVICE_READY: {
1486 const struct tnoti_sms_ready_status *noti = data;
1488 telephony_sms_emit_sms_ready(sms, noti->status);
1494 dbg("unknown notification");