3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
34 #include "MsgException.h"
35 #include "MsgGconfWrapper.h"
36 #include "SmsPluginParamCodec.h"
37 #include "SmsPluginSetting.h"
42 #ifndef _TAPI_NETTEXT_H_
43 #include "ITapiNetText.h"
49 /*==================================================================================================
50 IMPLEMENTATION OF SmsPluginSetting - Member Functions
51 ==================================================================================================*/
52 SmsPluginSetting* SmsPluginSetting::pInstance = NULL;
55 SmsPluginSetting::SmsPluginSetting()
57 // Initialize member variables
58 memset(&smscData, 0x00, sizeof(MSG_SMSC_DATA_S));
59 memset(&cbOpt, 0x00, sizeof(MSG_CBMSG_OPT_S));
67 SmsPluginSetting::~SmsPluginSetting()
74 SmsPluginSetting* SmsPluginSetting::instance()
77 pInstance = new SmsPluginSetting();
83 void SmsPluginSetting::initConfigData(MSG_SIM_STATUS_T SimStatus)
87 MSG_ERROR_T err = MSG_SUCCESS;
93 paramCnt = getParamCount();
95 MSG_DEBUG("Parameter Count [%d]", paramCnt);
97 MSG_SMSC_DATA_S tmpSmscData = {};
98 MSG_SMSC_LIST_S tmpSmscList = {};
100 for (int index = 0; index < paramCnt; index++)
102 if (getParam(index, &tmpSmscData) == false)
108 memcpy(&(tmpSmscList.smscData[index]), &tmpSmscData, sizeof(MSG_SMSC_DATA_S));
110 MSG_DEBUG("pid[%d]", tmpSmscList.smscData[index].pid);
111 MSG_DEBUG("val_period[%d]", tmpSmscList.smscData[index].valPeriod);
112 MSG_DEBUG("name[%s]", tmpSmscList.smscData[index].name);
114 MSG_DEBUG("ton[%d]", tmpSmscList.smscData[index].smscAddr.ton);
115 MSG_DEBUG("npi[%d]", tmpSmscList.smscData[index].smscAddr.npi);
116 MSG_DEBUG("address[%s]", tmpSmscList.smscData[index].smscAddr.address);
119 tmpSmscList.totalCnt = (paramCnt - failCnt);
120 tmpSmscList.selected = selectedParam;
124 err = addSMSCList(&tmpSmscList);
126 if (err == MSG_SUCCESS)
128 MSG_DEBUG("######## Add SMSC List Success !!! #######");
132 MSG_DEBUG("######## Add SMSC List Fail !!! return : %d #######", err);
137 if (SimStatus == MSG_SIM_STATUS_CHANGED)
139 MSG_DEBUG("simStatus == MSG_SIM_STATUS_CHANGED");
141 MSG_CBMSG_OPT_S cbMsgOpt = {};
143 if (getCbConfig(&cbMsgOpt) == true)
145 err = addCbOpt(&cbMsgOpt);
147 if (err == MSG_SUCCESS)
149 MSG_DEBUG("######## Add CB Option Success !!! #######");
153 MSG_DEBUG("######## Add CB Option Fail !!! return : %d #######", err);
157 else if (SimStatus == MSG_SIM_STATUS_NORMAL)
159 MSG_DEBUG("simStatus == MSG_SIM_STATUS_NORMAL");
161 // Set CB Data into SIM in case of same SIM
162 MSG_SETTING_S cbSetting;
163 cbSetting.type = MSG_CBMSG_OPT;
165 getCbOpt(&cbSetting);
167 setCbConfig(&(cbSetting.option.cbMsgOpt));
174 void SmsPluginSetting::setConfigData(const MSG_SETTING_S *pSetting)
176 MSG_DEBUG("Setting Type : [%d]", pSetting->type);
178 switch (pSetting->type)
181 setParamList(&pSetting->option.smscList);
185 setCbConfig(&pSetting->option.cbMsgOpt);
189 THROW(MsgException::SMS_PLG_ERROR, "The Setting type is not supported. [%d]", pSetting->type);
195 void SmsPluginSetting::getConfigData(MSG_SETTING_S *pSetting)
197 MSG_DEBUG("Setting Type : [%d]", pSetting->type);
199 switch (pSetting->type)
202 getParamList(&pSetting->option.smscList);
206 getCbConfig(&pSetting->option.cbMsgOpt);
210 THROW(MsgException::SMS_PLG_ERROR, "The Setting type is not supported. [%d]", pSetting->type);
216 MSG_ERROR_T SmsPluginSetting::addSMSCList(MSG_SMSC_LIST_S *pSmscList)
218 MSG_ERROR_T err = MSG_SUCCESS;
220 MSG_DEBUG("total_count[%d]", pSmscList->totalCnt);
221 MSG_DEBUG("selected index[%d]", pSmscList->selected);
223 for (int i = 0; i < pSmscList->totalCnt; i++)
225 MSG_DEBUG("pid[%d]", pSmscList->smscData[i].pid);
226 MSG_DEBUG("val_period[%d]", pSmscList->smscData[i].valPeriod);
227 MSG_DEBUG("name[%s]", pSmscList->smscData[i].name);
229 MSG_DEBUG("ton[%d]", pSmscList->smscData[i].smscAddr.ton);
230 MSG_DEBUG("npi[%d]", pSmscList->smscData[i].smscAddr.npi);
231 MSG_DEBUG("address[%s]", pSmscList->smscData[i].smscAddr.address);
236 if (MsgSettingSetInt(SMSC_TOTAL_COUNT, pSmscList->totalCnt) != MSG_SUCCESS)
238 MSG_DEBUG("Error to set config data [%s]", SMSC_TOTAL_COUNT);
239 return MSG_ERR_SET_SETTING;
242 if (MsgSettingSetInt(SMSC_SELECTED, pSmscList->selected) != MSG_SUCCESS)
244 MSG_DEBUG("Error to set config data [%s]", SMSC_SELECTED);
245 return MSG_ERR_SET_SETTING;
248 for (int i = 0; i < pSmscList->totalCnt; i++)
250 memset(keyName, 0x00, sizeof(keyName));
251 sprintf(keyName, "%s/%d", SMSC_PID, i);
253 if ((err = MsgSettingSetInt(keyName, (int)pSmscList->smscData[i].pid)) != MSG_SUCCESS)
256 memset(keyName, 0x00, sizeof(keyName));
257 sprintf(keyName, "%s/%d", SMSC_VAL_PERIOD, i);
259 if ((err = MsgSettingSetInt(keyName, (int)pSmscList->smscData[i].valPeriod)) != MSG_SUCCESS)
262 memset(keyName, 0x00, sizeof(keyName));
263 sprintf(keyName, "%s/%d", SMSC_NAME, i);
265 if ((err = MsgSettingSetString(keyName, pSmscList->smscData[i].name)) != MSG_SUCCESS)
268 memset(keyName, 0x00, sizeof(keyName));
269 sprintf(keyName, "%s/%d", SMSC_TON, i);
271 if (pSmscList->smscData[i].smscAddr.address[0] == '+')
272 pSmscList->smscData[i].smscAddr.ton = MSG_TON_INTERNATIONAL;
274 pSmscList->smscData[i].smscAddr.ton = MSG_TON_NATIONAL;
276 if ((err = MsgSettingSetInt(keyName, (int)pSmscList->smscData[i].smscAddr.ton)) != MSG_SUCCESS)
279 memset(keyName, 0x00, sizeof(keyName));
280 sprintf(keyName, "%s/%d", SMSC_NPI, i);
282 pSmscList->smscData[i].smscAddr.npi = MSG_NPI_ISDN; // app cannot set this value
284 if ((err = MsgSettingSetInt(keyName, (int)pSmscList->smscData[i].smscAddr.npi)) != MSG_SUCCESS)
287 memset(keyName, 0x00, sizeof(keyName));
288 sprintf(keyName, "%s/%d", SMSC_ADDRESS, i);
290 if ((err = MsgSettingSetString(keyName, pSmscList->smscData[i].smscAddr.address)) != MSG_SUCCESS)
294 if (err != MSG_SUCCESS)
296 MSG_DEBUG("Error to set config data [%s]", keyName);
303 MSG_ERROR_T SmsPluginSetting::addCbOpt(MSG_CBMSG_OPT_S *pCbOpt)
305 MSG_ERROR_T err = MSG_SUCCESS;
307 MSG_DEBUG("Receive [%d], All Channel [%d], Max SIM Count [%d]", pCbOpt->bReceive, pCbOpt->bAllChannel, pCbOpt->maxSimCnt);
309 MSG_DEBUG("Channel Count [%d]", pCbOpt->channelData.channelCnt);
311 for (int i = 0; i < pCbOpt->channelData.channelCnt; i++)
313 MSG_DEBUG("Channel ID [%d]", pCbOpt->channelData.channelInfo[i].id);
316 // Set Setting Data into Vconf
317 if (MsgSettingSetBool(CB_RECEIVE, pCbOpt->bReceive) != MSG_SUCCESS)
319 MSG_DEBUG("Error to set config data [%s]", CB_RECEIVE);
320 return MSG_ERR_SET_SETTING;
323 if (MsgSettingSetBool(CB_ALL_CHANNEL, pCbOpt->bAllChannel) != MSG_SUCCESS)
325 MSG_DEBUG("Error to set config data [%s]", CB_ALL_CHANNEL);
326 return MSG_ERR_SET_SETTING;
329 if (MsgSettingSetInt(CB_MAX_SIM_COUNT, pCbOpt->maxSimCnt) != MSG_SUCCESS)
331 MSG_DEBUG("Error to set config data [%s]", CB_MAX_SIM_COUNT);
332 return MSG_ERR_SET_SETTING;
335 if (MsgSettingSetInt(CB_CHANNEL_COUNT, pCbOpt->channelData.channelCnt) != MSG_SUCCESS)
337 MSG_DEBUG("Error to set config data [%s]", CB_CHANNEL_COUNT);
338 return MSG_ERR_SET_SETTING;
343 for (int i = 0; i < pCbOpt->channelData.channelCnt; i++)
345 memset(keyName, 0x00, sizeof(keyName));
346 sprintf(keyName, "%s/%d", CB_CHANNEL_ACTIVATE, i);
348 if ((err = MsgSettingSetBool(keyName, pCbOpt->channelData.channelInfo[i].bActivate)) != MSG_SUCCESS)
351 memset(keyName, 0x00, sizeof(keyName));
352 sprintf(keyName, "%s/%d", CB_CHANNEL_ID, i);
354 if ((err = MsgSettingSetInt(keyName, pCbOpt->channelData.channelInfo[i].id)) != MSG_SUCCESS)
357 memset(keyName, 0x00, sizeof(keyName));
358 sprintf(keyName, "%s/%d", CB_CHANNEL_NAME, i);
360 if ((err = MsgSettingSetString(keyName, pCbOpt->channelData.channelInfo[i].name)) != MSG_SUCCESS)
368 void SmsPluginSetting::getCbOpt(MSG_SETTING_S *pSetting)
371 char *tmpValue = NULL;
373 memset(&(pSetting->option.cbMsgOpt), 0x00, sizeof(MSG_CBMSG_OPT_S));
375 MsgSettingGetBool(CB_RECEIVE, &pSetting->option.cbMsgOpt.bReceive);
377 MsgSettingGetBool(CB_ALL_CHANNEL, &pSetting->option.cbMsgOpt.bAllChannel);
379 pSetting->option.cbMsgOpt.maxSimCnt = MsgSettingGetInt(CB_MAX_SIM_COUNT);
381 pSetting->option.cbMsgOpt.channelData.channelCnt = MsgSettingGetInt(CB_CHANNEL_COUNT);
383 for (int i = 0; i < pSetting->option.cbMsgOpt.channelData.channelCnt; i++)
385 memset(keyName, 0x00, sizeof(keyName));
386 sprintf(keyName, "%s/%d", CB_CHANNEL_ACTIVATE, i);
388 MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.channelData.channelInfo[i].bActivate);
390 memset(keyName, 0x00, sizeof(keyName));
391 sprintf(keyName, "%s/%d", CB_CHANNEL_ID, i);
393 pSetting->option.cbMsgOpt.channelData.channelInfo[i].id = MsgSettingGetInt(keyName);
395 memset(keyName, 0x00, sizeof(keyName));
396 sprintf(keyName, "%s/%d", CB_CHANNEL_NAME, i);
398 tmpValue = MsgSettingGetString(keyName);
400 if (tmpValue != NULL)
402 strncpy(pSetting->option.cbMsgOpt.channelData.channelInfo[i].name, tmpValue, CB_CHANNEL_NAME_MAX);
408 for (int i = MSG_CBLANG_TYPE_ALL; i < MSG_CBLANG_TYPE_MAX; i++)
410 memset(keyName, 0x00, sizeof(keyName));
411 sprintf(keyName, "%s/%d", CB_LANGUAGE, i);
413 MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]);
419 void SmsPluginSetting::setParamList(const MSG_SMSC_LIST_S *pSMSCList)
423 TelSmsParams_t smsParam = {0};
425 int ret = TAPI_API_SUCCESS;
428 for (int index = 0; index < pSMSCList->totalCnt; index++)
430 /*Setting the SMSP Record index value*/
431 smsParam.RecordIndex = (unsigned char)index;
433 /*Setting the SMSP Record Length value = 28 + alphaId_len*/
434 smsParam.RecordLen = 28 + strlen(pSMSCList->smscData[index].name);
436 /*Setting the SMSP Alpha ID value*/
437 smsParam.AlphaIdLen = strlen(pSMSCList->smscData[index].name);
438 MSG_DEBUG("AlphaIdLen = %ld", smsParam.AlphaIdLen);
440 if (smsParam.AlphaIdLen > 0 && smsParam.AlphaIdLen <= SMSC_NAME_MAX)
442 memcpy(smsParam.szAlphaId, pSMSCList->smscData[index].name, smsParam.AlphaIdLen);
443 smsParam.szAlphaId[smsParam.AlphaIdLen] = '\0';
444 MSG_DEBUG("szAlphaId = %s", smsParam.szAlphaId);
447 smsParam.ParamIndicator = 0x00;
449 if (strlen(pSMSCList->smscData[index].smscAddr.address) > 0)
451 smsParam.ParamIndicator |= 0x02 ; //enable 2nd Bit
452 MSG_DEBUG("ParamIndicator = [%02x]", smsParam.ParamIndicator);
454 if (pSMSCList->smscData[index].smscAddr.address[0] == '+')
455 smsParam.TpSvcCntrAddr.Ton = TAPI_SIM_TON_INTERNATIONAL;
457 smsParam.TpSvcCntrAddr.Ton = TAPI_SIM_TON_NATIONAL;
459 smsParam.TpSvcCntrAddr.Npi = TAPI_SIM_NPI_ISDN_TEL; // app cannot set this value
461 MSG_DEBUG("SMSC TON = [%d] NPI = [%d]", smsParam.TpSvcCntrAddr.Ton, smsParam.TpSvcCntrAddr.Npi);
463 MSG_DEBUG("address = %s", pSMSCList->smscData[index].smscAddr.address);
465 smsParam.TpSvcCntrAddr.DialNumLen = SmsPluginParamCodec::encodeSMSC(pSMSCList->smscData[index].smscAddr.address, smsParam.TpSvcCntrAddr.szDiallingNum);
469 MSG_DEBUG("SMSC Addr is not present");
472 /*Setting the PID value*/
473 smsParam.ParamIndicator |= 0x04 ; //enable 3nd Bit
474 MSG_DEBUG("ParamIndicator = [%02x]", smsParam.ParamIndicator);
476 smsParam.TpProtocolId = (unsigned short)convertPid(pSMSCList->smscData[index].pid);
478 /*Setting the ValidityPeriod value*/
479 smsParam.ParamIndicator |= 0x10 ; //enable 5nd Bit
480 MSG_DEBUG("ParamIndicator = [%02x]", smsParam.ParamIndicator);
482 smsParam.TpValidityPeriod = (unsigned short)pSMSCList->smscData[index].valPeriod;
484 smsParam.ParamIndicator = ~(smsParam.ParamIndicator);
485 MSG_DEBUG("ParamIndicator = [%02x]", smsParam.ParamIndicator);
487 ret = tel_set_sms_parameters((const TelSmsParams_t*)&smsParam, &reqId);
489 if (ret != TAPI_API_SUCCESS)
490 THROW(MsgException::SMS_PLG_ERROR, "tel_set_sms_parameters() Error. [%d]", ret);
492 if (!getResultFromSim())
493 THROW(MsgException::SMS_PLG_ERROR, "tel_set_sms_parameters() Result Error.");
500 void SmsPluginSetting::getParamList(MSG_SMSC_LIST_S *pSMSCList)
506 paramCnt = getParamCount();
508 MSG_DEBUG("Parameter Count [%d]", paramCnt);
510 int ret = TAPI_API_SUCCESS;
513 MSG_SMSC_DATA_S tmpSmscData = {};
515 for (int index = 0; index < paramCnt; index++)
517 ret = tel_get_sms_parameters(index, &reqId);
519 if (ret == TAPI_API_SUCCESS)
521 MSG_DEBUG("######## tel_get_sms_parameters() Success !!! #######");
525 THROW(MsgException::SMS_PLG_ERROR, "######## tel_get_sms_parameters() Fail !!! return : %d #######", ret);
528 if (getParamEvent(&tmpSmscData) == true)
530 MSG_DEBUG("######## Get Parameter was Successful !!! #######");
534 THROW(MsgException::SMS_PLG_ERROR, "######## Get Parameter was Failed !!! #######");
537 memcpy(&(pSMSCList->smscData[index]), &tmpSmscData, sizeof(MSG_SMSC_DATA_S));
539 MSG_DEBUG("pid[%d]", pSMSCList->smscData[index].pid);
540 MSG_DEBUG("val_period[%d]", pSMSCList->smscData[index].valPeriod);
541 MSG_DEBUG("name[%s]", pSMSCList->smscData[index].name);
543 MSG_DEBUG("ton[%d]", pSMSCList->smscData[index].smscAddr.ton);
544 MSG_DEBUG("npi[%d]", pSMSCList->smscData[index].smscAddr.npi);
545 MSG_DEBUG("address[%s]", pSMSCList->smscData[index].smscAddr.address);
548 pSMSCList->totalCnt = paramCnt;
549 pSMSCList->selected = selectedParam;
551 MSG_DEBUG("total_count[%d]", pSMSCList->totalCnt);
557 int SmsPluginSetting::getParamCount()
561 int ret = TAPI_API_SUCCESS;
563 ret = tel_get_sms_parameter_count(&reqId);
565 if (ret == TAPI_API_SUCCESS)
567 MSG_DEBUG("######## tel_get_sms_parameter_count() Success !!! #######");
571 THROW(MsgException::SMS_PLG_ERROR, "tel_get_sms_parameter_count() Error. [%d]", ret);
574 return getParamCntEvent();
578 bool SmsPluginSetting::getParam(int Index, MSG_SMSC_DATA_S *pSmscData)
582 int ret = TAPI_API_SUCCESS;
584 ret = tel_get_sms_parameters(Index, &reqId);
586 if (ret == TAPI_API_SUCCESS)
588 MSG_DEBUG("######## tel_get_sms_parameters() Success !!! #######");
592 MSG_DEBUG("######## tel_get_sms_parameters() Fail !!! return : %d #######", ret);
596 if (getParamEvent(pSmscData) == true)
598 MSG_DEBUG("######## Get Parameter was Successful !!! #######");
602 MSG_DEBUG("######## Get Parameter was Failed !!! #######");
610 bool SmsPluginSetting::setCbConfig(const MSG_CBMSG_OPT_S *pCbOpt)
614 int ret = TAPI_API_SUCCESS;
616 TelSmsCbConfig_t cbConfig = {};
618 cbConfig.bCBEnabled = (int)pCbOpt->bReceive;
620 if (pCbOpt->bAllChannel == true)
621 cbConfig.SelectedId = 0x01;
623 cbConfig.SelectedId = 0x02;
625 cbConfig.MsgIdCount = pCbOpt->channelData.channelCnt;
627 for (int i = 0; i < cbConfig.MsgIdCount; i++)
629 cbConfig.MsgIDs[i] = (unsigned short)pCbOpt->channelData.channelInfo[i].id;
632 ret = tel_set_sms_cb_config(&cbConfig, &reqId);
634 if (ret == TAPI_API_SUCCESS)
636 MSG_DEBUG("######## tel_set_sms_cb_config() Success !!! #######");
640 MSG_DEBUG("######## tel_set_sms_cb_config() Fail !!! return : %d #######", ret);
644 if (getResultFromSim() == true)
646 MSG_DEBUG("######## Set Cb Config was Successful !!! #######");
650 MSG_DEBUG("######## Set Cb Config was Failed !!! #######");
658 bool SmsPluginSetting::getCbConfig(MSG_CBMSG_OPT_S *pCbOpt)
662 int ret = TAPI_API_SUCCESS;
664 ret = tel_get_sms_cb_config(&reqId);
666 if (ret == TAPI_API_SUCCESS)
668 MSG_DEBUG("######## tel_get_sms_cb_config() Success !!! #######");
672 MSG_DEBUG("######## tel_get_sms_cb_config() Fail !!! return : %d #######", ret);
676 if (getCbConfigEvent(pCbOpt) == true)
678 MSG_DEBUG("######## Get Cb Config was Successful !!! #######");
682 MSG_DEBUG("######## Get Cb Config was Failed !!! #######");
690 void SmsPluginSetting::setParamCntEvent(int ParamCnt)
702 int SmsPluginSetting::getParamCntEvent()
708 ret = cv.timedwait(mx.pMutex(), 10);
712 if (ret == ETIMEDOUT)
714 MSG_DEBUG("WARNING: TAPI callback TIME-OUT");
722 void SmsPluginSetting::setParamEvent(const MSG_SMSC_DATA_S *pSmscData, int RecordIdx, bool bSuccess)
726 bTapiResult = bSuccess;
728 memset(&smscData, 0x00, sizeof(MSG_SMSC_DATA_S));
730 if (bTapiResult == true)
732 MSG_DEBUG("Success to get parameter data");
734 selectedParam = RecordIdx;
736 memcpy(&smscData, pSmscData, sizeof(MSG_SMSC_DATA_S));
745 bool SmsPluginSetting::getParamEvent(MSG_SMSC_DATA_S *pSmscData)
753 ret = cv.timedwait(mx.pMutex(), 10);
757 if (ret == ETIMEDOUT)
759 MSG_DEBUG("WARNING: TAPI callback TIME-OUT");
763 memset(pSmscData, 0x00, sizeof(MSG_SMSC_DATA_S));
765 if (bTapiResult == true)
767 memcpy(pSmscData, &smscData, sizeof(MSG_SMSC_DATA_S));
774 void SmsPluginSetting::setCbConfigEvent(const MSG_CBMSG_OPT_S *pCbOpt, bool bSuccess)
778 bTapiResult = bSuccess;
780 memset(&cbOpt, 0x00, sizeof(MSG_CBMSG_OPT_S));
782 if (bTapiResult == true)
784 MSG_DEBUG("Success to get cb config data");
786 memcpy(&cbOpt, pCbOpt, sizeof(MSG_CBMSG_OPT_S));
795 bool SmsPluginSetting::getCbConfigEvent(MSG_CBMSG_OPT_S *pCbOpt)
803 ret = cv.timedwait(mx.pMutex(), 10);
807 if (ret == ETIMEDOUT)
809 MSG_DEBUG("WARNING: TAPI callback TIME-OUT");
813 memset(pCbOpt, 0x00, sizeof(MSG_CBMSG_OPT_S));
815 if (bTapiResult == true)
817 memcpy(pCbOpt, &cbOpt, sizeof(MSG_CBMSG_OPT_S));
824 void SmsPluginSetting::setResultFromSim(bool bResult)
828 bTapiResult = bResult;
836 bool SmsPluginSetting::getResultFromSim()
842 ret = cv.timedwait(mx.pMutex(), 10);
846 if (ret == ETIMEDOUT)
848 MSG_DEBUG("WARNING: TAPI callback TIME-OUT");
856 SMS_PID_T SmsPluginSetting::convertPid(MSG_SMS_PID_T pid)
863 retPid = SMS_PID_NORMAL;
866 retPid = SMS_PID_VOICE;
869 retPid = SMS_PID_TELEX;
872 retPid = SMS_PID_x400;
875 retPid = SMS_PID_ERMES;
878 retPid = SMS_PID_EMAIL;
881 retPid = SMS_PID_NORMAL;