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.
32 #include "MsgPluginManager.h"
33 #include "MsgSettingHandler.h"
34 #include "MsgGconfWrapper.h"
37 #define DEF_BUF_LEN 128
40 /*==================================================================================================
41 FUNCTION IMPLEMENTATION
42 ==================================================================================================*/
43 MSG_ERROR_T MsgInitSimConfig(MSG_SIM_STATUS_T SimStatus)
45 MSG_DEBUG("Start to initialize SIM Configuration");
47 MSG_ERROR_T err = MSG_SUCCESS;
49 if (SimStatus != MSG_SIM_STATUS_NOT_FOUND)
51 MSG_MAIN_TYPE_T mainType = MSG_SMS_TYPE;
52 MsgPlugin* plg = MsgPluginManager::instance()->getPlugin(mainType);
56 MSG_DEBUG("No plugin for %d type", mainType);
57 return MSG_ERR_INVALID_PLUGIN_HANDLE;
61 MSG_DEBUG(" ** SIM is available - status : [%d] ** ", SimStatus);
63 err = plg->initConfigData(SimStatus);
70 MSG_ERROR_T MsgSetConfigData(const MSG_SETTING_S *pSetting)
72 MSG_ERROR_T err = MSG_SUCCESS;
74 MSG_DEBUG("Setting Type : %d", pSetting->type);
76 switch (pSetting->type)
78 case MSG_GENERAL_OPT :
79 err = MsgSetGeneralOpt(pSetting);
81 case MSG_SMS_SENDOPT :
82 err = MsgSetSMSSendOpt(pSetting);
85 err = MsgSetSMSCList(pSetting, true);
87 case MSG_MMS_SENDOPT :
88 err = MsgSetMMSSendOpt(pSetting);
90 case MSG_MMS_RECVOPT :
91 err = MsgSetMMSRecvOpt(pSetting);
93 case MSG_MMS_STYLEOPT :
94 err = MsgSetMMSStyleOpt(pSetting);
96 case MSG_PUSHMSG_OPT :
97 err = MsgSetPushMsgOpt(pSetting);
100 err = MsgSetCBMsgOpt(pSetting, true);
102 case MSG_VOICEMAIL_OPT :
103 err = MsgSetVoiceMailOpt(pSetting);
105 case MSG_MSGSIZE_OPT:
106 err = MsgSetMsgSizeOpt(pSetting);
115 MSG_ERROR_T MsgGetConfigData(MSG_SETTING_S *pSetting)
117 switch (pSetting->type)
119 case MSG_GENERAL_OPT :
120 MsgGetGeneralOpt(pSetting);
122 case MSG_SMS_SENDOPT :
123 MsgGetSMSSendOpt(pSetting);
126 MsgGetSMSCList(pSetting);
128 case MSG_MMS_SENDOPT :
129 MsgGetMMSSendOpt(pSetting);
131 case MSG_MMS_RECVOPT :
132 MsgGetMMSRecvOpt(pSetting);
134 case MSG_MMS_STYLEOPT :
135 MsgGetMMSStyleOpt(pSetting);
137 case MSG_PUSHMSG_OPT :
138 MsgGetPushMsgOpt(pSetting);
141 MsgGetCBMsgOpt(pSetting);
143 case MSG_VOICEMAIL_OPT :
144 MsgGetVoiceMailOpt(pSetting);
146 case MSG_MSGSIZE_OPT :
147 MsgGetMsgSizeOpt(pSetting);
158 MSG_ERROR_T MsgSetGeneralOpt(const MSG_SETTING_S *pSetting)
160 MSG_GENERAL_OPT_S generalOpt;
163 memcpy(&generalOpt, &(pSetting->option.generalOpt), sizeof(MSG_GENERAL_OPT_S));
165 MsgSettingGetBool(MSG_KEEP_COPY, &bValue);
166 if (bValue != generalOpt.bKeepCopy) {
167 if (MsgSettingSetBool(MSG_KEEP_COPY, generalOpt.bKeepCopy) != MSG_SUCCESS) {
168 MSG_DEBUG("Error to set config data [%s]", MSG_KEEP_COPY);
169 return MSG_ERR_SET_SETTING;
173 MsgSettingGetBool(MSG_AUTO_ERASE, &bValue);
174 if (bValue != generalOpt.bAutoErase) {
175 if (MsgSettingSetBool(MSG_AUTO_ERASE, generalOpt.bAutoErase) != MSG_SUCCESS) {
176 MSG_DEBUG("Error to set config data [%s]", MSG_AUTO_ERASE);
177 return MSG_ERR_SET_SETTING;
185 MSG_ERROR_T MsgSetSMSSendOpt(const MSG_SETTING_S *pSetting)
187 MSG_SMS_SENDOPT_S sendOpt;
191 memcpy(&sendOpt, &(pSetting->option.smsSendOpt), sizeof(MSG_SMS_SENDOPT_S));
193 iValue = MsgSettingGetInt(SMS_SEND_DCS);
194 if (iValue != (int)sendOpt.dcs) {
195 if (MsgSettingSetInt(SMS_SEND_DCS, (int)sendOpt.dcs) != MSG_SUCCESS) {
196 MSG_DEBUG("Error to set config data [%s]", SMS_SEND_DCS);
197 return MSG_ERR_SET_SETTING;
201 iValue = MsgSettingGetInt(SMS_SEND_NETWORK_MODE);
202 if (iValue != (int)sendOpt.netMode) {
203 if (MsgSettingSetInt(SMS_SEND_NETWORK_MODE, (int)sendOpt.netMode) != MSG_SUCCESS) {
204 MSG_DEBUG("Error to set config data [%s]", SMS_SEND_NETWORK_MODE);
205 return MSG_ERR_SET_SETTING;
209 MsgSettingGetBool(SMS_SEND_REPLY_PATH, &bValue);
210 if (bValue != sendOpt.bReplyPath) {
211 if (MsgSettingSetBool(SMS_SEND_REPLY_PATH, sendOpt.bReplyPath) != MSG_SUCCESS) {
212 MSG_DEBUG("Error to set config data [%s]", SMS_SEND_REPLY_PATH);
213 return MSG_ERR_SET_SETTING;
217 MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &bValue);
218 if (bValue != sendOpt.bDeliveryReport) {
219 if (MsgSettingSetBool(SMS_SEND_DELIVERY_REPORT, sendOpt.bDeliveryReport) != MSG_SUCCESS) {
220 MSG_DEBUG("Error to set config data [%s]", SMS_SEND_DELIVERY_REPORT);
221 return MSG_ERR_SET_SETTING;
225 iValue = MsgSettingGetInt(SMS_SEND_SAVE_STORAGE);
226 if (iValue != (int)sendOpt.saveStorage) {
227 if (MsgSettingSetInt(SMS_SEND_SAVE_STORAGE, (int)sendOpt.saveStorage) != MSG_SUCCESS) {
228 MSG_DEBUG("Error to set config data [%s]", SMS_SEND_SAVE_STORAGE);
229 return MSG_ERR_SET_SETTING;
237 MSG_ERROR_T MsgSetSMSCList(const MSG_SETTING_S *pSetting, bool bSetSim)
239 MSG_ERROR_T err = MSG_SUCCESS;
241 for (int index = 0; index < pSetting->option.smscList.totalCnt; index++)
243 if(strlen(pSetting->option.smscList.smscData[index].smscAddr.address) > SMSC_ADDR_MAX)
245 MSG_DEBUG("SMSC address is too long [%d]", strlen(pSetting->option.smscList.smscData[index].smscAddr.address));
246 return MSG_ERR_SET_SIM_SET;
252 err = MsgSetConfigInSim(pSetting);
254 if (err != MSG_SUCCESS)
256 MSG_DEBUG("Error to set config data in sim [%d]", err);
257 return MSG_ERR_SET_SIM_SET;
261 MSG_SMSC_LIST_S smscList;
263 memcpy(&smscList, &(pSetting->option.smscList), sizeof(MSG_SMSC_LIST_S));
265 char keyName[DEF_BUF_LEN] = {0, };
267 // No selected SMSC Info. in SIM.
270 if (MsgSettingSetInt(SMSC_SELECTED, smscList.selected) != MSG_SUCCESS)
272 MSG_DEBUG("Error to set config data [%s]", SMSC_SELECTED);
273 return MSG_ERR_SET_SETTING;
277 if (MsgSettingSetInt(SMSC_TOTAL_COUNT, smscList.totalCnt) != MSG_SUCCESS)
279 MSG_DEBUG("Error to set config data [%s]", SMSC_TOTAL_COUNT);
280 return MSG_ERR_SET_SETTING;
283 for (int i = 0; i < smscList.totalCnt; i++)
285 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_PID, i);
287 if ((err = MsgSettingSetInt(keyName, (int)smscList.smscData[i].pid)) != MSG_SUCCESS)
290 memset(keyName, 0x00, sizeof(keyName));
291 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_VAL_PERIOD, i);
293 if ((err = MsgSettingSetInt(keyName, (int)smscList.smscData[i].valPeriod)) != MSG_SUCCESS)
296 memset(keyName, 0x00, sizeof(keyName));
297 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_NAME, i);
299 if ((err = MsgSettingSetString(keyName, smscList.smscData[i].name)) != MSG_SUCCESS)
302 memset(keyName, 0x00, sizeof(keyName));
303 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_TON, i);
305 if (smscList.smscData[i].smscAddr.address[0] == '+')
306 smscList.smscData[i].smscAddr.ton = MSG_TON_INTERNATIONAL;
308 smscList.smscData[i].smscAddr.ton = MSG_TON_NATIONAL;
310 if ((err = MsgSettingSetInt(keyName, (int)smscList.smscData[i].smscAddr.ton)) != MSG_SUCCESS)
313 memset(keyName, 0x00, sizeof(keyName));
314 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_NPI, i);
316 smscList.smscData[i].smscAddr.npi = MSG_NPI_ISDN; // app cannot set this value
318 if ((err = MsgSettingSetInt(keyName, (int)smscList.smscData[i].smscAddr.npi)) != MSG_SUCCESS)
321 memset(keyName, 0x00, sizeof(keyName));
322 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_ADDRESS, i);
324 if ((err = MsgSettingSetString(keyName, smscList.smscData[i].smscAddr.address)) != MSG_SUCCESS)
328 if (err != MSG_SUCCESS)
330 MSG_DEBUG("Error to set config data [%s]", keyName);
337 MSG_ERROR_T MsgSetMMSSendOpt(const MSG_SETTING_S *pSetting)
339 MSG_MMS_SENDOPT_S sendOpt;
343 memcpy(&sendOpt, &(pSetting->option.mmsSendOpt), sizeof(MSG_MMS_SENDOPT_S));
345 iValue = MsgSettingGetInt(MMS_SEND_MSG_CLASS);
346 if (iValue != (int)sendOpt.msgClass) {
347 if (MsgSettingSetInt(MMS_SEND_MSG_CLASS, (int)sendOpt.msgClass) != MSG_SUCCESS) {
348 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_MSG_CLASS);
349 return MSG_ERR_SET_SETTING;
353 iValue = MsgSettingGetInt(MMS_SEND_PRIORITY);
354 if (iValue != (int)sendOpt.priority) {
355 if (MsgSettingSetInt(MMS_SEND_PRIORITY, (int)sendOpt.priority) != MSG_SUCCESS) {
356 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_PRIORITY);
357 return MSG_ERR_SET_SETTING;
361 iValue = MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
362 if (iValue != (int)sendOpt.expiryTime) {
363 if (MsgSettingSetInt(MMS_SEND_EXPIRY_TIME, (int)sendOpt.expiryTime) != MSG_SUCCESS) {
364 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_EXPIRY_TIME);
365 return MSG_ERR_SET_SETTING;
369 iValue = MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
370 if (iValue != (int)sendOpt.deliveryTime) {
371 if (MsgSettingSetInt(MMS_SEND_DELIVERY_TIME, (int)sendOpt.deliveryTime) != MSG_SUCCESS) {
372 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_DELIVERY_TIME);
373 return MSG_ERR_SET_SETTING;
377 iValue = MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY);
378 if (iValue != (int)sendOpt.customDeliveryTime) {
379 if (MsgSettingSetInt(MMS_SEND_CUSTOM_DELIVERY, sendOpt.customDeliveryTime) != MSG_SUCCESS) {
380 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_CUSTOM_DELIVERY);
381 return MSG_ERR_SET_SETTING;
385 MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &bValue);
386 if (bValue != sendOpt.bSenderVisibility) {
387 if (MsgSettingSetBool(MMS_SEND_SENDER_VISIBILITY, sendOpt.bSenderVisibility) != MSG_SUCCESS) {
388 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_SENDER_VISIBILITY);
389 return MSG_ERR_SET_SETTING;
393 MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &bValue);
394 if (bValue != sendOpt.bDeliveryReport) {
395 if (MsgSettingSetBool(MMS_SEND_DELIVERY_REPORT, sendOpt.bDeliveryReport) != MSG_SUCCESS) {
396 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_DELIVERY_REPORT);
397 return MSG_ERR_SET_SETTING;
401 MsgSettingGetBool(MMS_SEND_READ_REPLY, &bValue);
402 if (bValue != sendOpt.bReadReply) {
403 if (MsgSettingSetBool(MMS_SEND_READ_REPLY, sendOpt.bReadReply) != MSG_SUCCESS) {
404 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_READ_REPLY);
405 return MSG_ERR_SET_SETTING;
409 MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &bValue);
410 if (bValue != sendOpt.bBodyReplying) {
411 if (MsgSettingSetBool(MMS_SEND_BODY_REPLYING, sendOpt.bBodyReplying) != MSG_SUCCESS) {
412 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_BODY_REPLYING);
413 return MSG_ERR_SET_SETTING;
417 MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &bValue);
418 if (bValue != sendOpt.bHideRecipients) {
419 if (MsgSettingSetBool(MMS_SEND_HIDE_RECIPIENTS, sendOpt.bHideRecipients) != MSG_SUCCESS)
421 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_HIDE_RECIPIENTS);
422 return MSG_ERR_SET_SETTING;
426 iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING);
427 if (iValue != sendOpt.replyCharging) {
428 if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING, sendOpt.replyCharging) != MSG_SUCCESS) {
429 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING);
430 return MSG_ERR_SET_SETTING;
434 iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE);
435 if (iValue != (int)sendOpt.replyChargingDeadline) {
436 if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING_DEADLINE, sendOpt.replyChargingDeadline) != MSG_SUCCESS) {
437 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING_DEADLINE);
438 return MSG_ERR_SET_SETTING;
442 iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE);
443 if (iValue != (int)sendOpt.replyChargingSize) {
444 if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING_SIZE, sendOpt.replyChargingSize) != MSG_SUCCESS) {
445 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING_SIZE);
446 return MSG_ERR_SET_SETTING;
450 iValue = MsgSettingGetInt(MMS_SEND_CREATION_MODE);
451 if (iValue != sendOpt.creationMode) {
452 if (MsgSettingSetInt(MMS_SEND_CREATION_MODE, sendOpt.creationMode) != MSG_SUCCESS) {
453 MSG_DEBUG("Error to set config data [%s]", MMS_SEND_CREATION_MODE);
454 return MSG_ERR_SET_SETTING;
462 MSG_ERROR_T MsgSetMMSRecvOpt(const MSG_SETTING_S *pSetting)
464 MSG_MMS_RECVOPT_S recvOpt;
468 memcpy(&recvOpt, &(pSetting->option.mmsRecvOpt), sizeof(MSG_MMS_RECVOPT_S));
470 iValue = MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
471 if (iValue != (int)recvOpt.homeNetwork) {
472 if (MsgSettingSetInt(MMS_RECV_HOME_NETWORK, (int)recvOpt.homeNetwork) != MSG_SUCCESS) {
473 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_HOME_NETWORK);
474 return MSG_ERR_SET_SETTING;
478 iValue = MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
479 if (iValue != (int)recvOpt.abroadNetwok) {
480 if (MsgSettingSetInt(MMS_RECV_ABROAD_NETWORK, (int)recvOpt.abroadNetwok) != MSG_SUCCESS) {
481 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_ABROAD_NETWORK);
482 return MSG_ERR_SET_SETTING;
486 MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &bValue);
487 if (bValue != recvOpt.readReceipt) {
488 if (MsgSettingSetBool(MMS_RECV_READ_RECEIPT, recvOpt.readReceipt) != MSG_SUCCESS) {
489 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_READ_RECEIPT);
490 return MSG_ERR_SET_SETTING;
494 MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &bValue);
495 if (bValue != recvOpt.bDeliveryReceipt) {
496 if (MsgSettingSetBool(MMS_RECV_DELIVERY_RECEIPT, recvOpt.bDeliveryReceipt) != MSG_SUCCESS) {
497 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_DELIVERY_RECEIPT);
498 return MSG_ERR_SET_SETTING;
502 MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &bValue);
503 if (bValue != recvOpt.bRejectUnknown) {
504 if (MsgSettingSetBool(MMS_RECV_REJECT_UNKNOWN, recvOpt.bRejectUnknown) != MSG_SUCCESS) {
505 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_REJECT_UNKNOWN);
506 return MSG_ERR_SET_SETTING;
510 MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &bValue);
511 if (bValue != recvOpt.bRejectAdvertisement) {
512 if (MsgSettingSetBool(MMS_RECV_REJECT_ADVERTISE, recvOpt.bRejectAdvertisement) != MSG_SUCCESS) {
513 MSG_DEBUG("Error to set config data [%s]", MMS_RECV_REJECT_ADVERTISE);
514 return MSG_ERR_SET_SETTING;
522 MSG_ERROR_T MsgSetMMSStyleOpt(const MSG_SETTING_S *pSetting)
524 MSG_MMS_STYLEOPT_S styleOpt;
528 memcpy(&styleOpt, &(pSetting->option.mmsStyleOpt), sizeof(MSG_MMS_STYLEOPT_S));
530 iValue = MsgSettingGetInt(MMS_STYLE_FONT_SIZE);
531 if (iValue != (int)styleOpt.fontSize) {
532 if (MsgSettingSetInt(MMS_STYLE_FONT_SIZE, styleOpt.fontSize) != MSG_SUCCESS) {
533 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_SIZE);
534 return MSG_ERR_SET_SETTING;
538 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &bValue);
539 if (bValue != styleOpt.bFontStyleBold) {
540 if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_BOLD, styleOpt.bFontStyleBold) != MSG_SUCCESS) {
541 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_BOLD);
542 return MSG_ERR_SET_SETTING;
546 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &bValue);
547 if (bValue != styleOpt.bFontStyleItalic) {
548 if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_ITALIC, styleOpt.bFontStyleItalic) != MSG_SUCCESS) {
549 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_ITALIC);
550 return MSG_ERR_SET_SETTING;
554 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &bValue);
555 if (bValue != styleOpt.bFontStyleUnderline) {
556 if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, styleOpt.bFontStyleUnderline) != MSG_SUCCESS) {
557 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_UNDERLINE);
558 return MSG_ERR_SET_SETTING;
562 iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED);
563 if (iValue != (int)styleOpt.fontColorRed) {
564 if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_RED, styleOpt.fontColorRed) != MSG_SUCCESS) {
565 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_RED);
566 return MSG_ERR_SET_SETTING;
570 iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN);
571 if (iValue != (int)styleOpt.fontColorGreen) {
572 if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_GREEN, styleOpt.fontColorGreen) != MSG_SUCCESS) {
573 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_GREEN);
574 return MSG_ERR_SET_SETTING;
578 iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE);
579 if (iValue != (int)styleOpt.fontColorBlue) {
580 if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_BLUE, styleOpt.fontColorBlue) != MSG_SUCCESS) {
581 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_BLUE);
582 return MSG_ERR_SET_SETTING;
586 iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE);
587 if (iValue != (int)styleOpt.fontColorHue) {
588 if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_HUE, styleOpt.fontColorHue) != MSG_SUCCESS) {
589 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_HUE);
590 return MSG_ERR_SET_SETTING;
594 iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED);
595 if (iValue != (int)styleOpt.bgColorRed) {
596 if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_RED, styleOpt.bgColorRed) != MSG_SUCCESS) {
597 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_RED);
598 return MSG_ERR_SET_SETTING;
602 iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN);
603 if (iValue != (int)styleOpt.bgColorGreen) {
604 if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_GREEN, styleOpt.bgColorGreen) != MSG_SUCCESS) {
605 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_GREEN);
606 return MSG_ERR_SET_SETTING;
610 iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE);
611 if (iValue != (int)styleOpt.bgColorBlue) {
612 if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_BLUE, styleOpt.bgColorBlue) != MSG_SUCCESS) {
613 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_BLUE);
614 return MSG_ERR_SET_SETTING;
618 iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE);
619 if (iValue != (int)styleOpt.bgColorHue) {
620 if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_HUE, styleOpt.bgColorHue) != MSG_SUCCESS) {
621 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_HUE);
622 return MSG_ERR_SET_SETTING;
626 iValue = MsgSettingGetInt(MMS_STYLE_PAGE_DUR);
627 if (iValue != (int)styleOpt.pageDur) {
628 if (MsgSettingSetInt(MMS_STYLE_PAGE_DUR, styleOpt.pageDur) != MSG_SUCCESS) {
629 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_DUR);
630 return MSG_ERR_SET_SETTING;
634 iValue = MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR);
635 if (iValue != (int)styleOpt.pageCustomDur) {
636 if (MsgSettingSetInt(MMS_STYLE_PAGE_CUSTOM_DUR, styleOpt.pageCustomDur) != MSG_SUCCESS) {
637 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_CUSTOM_DUR);
638 return MSG_ERR_SET_SETTING;
642 iValue = MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL);
643 if (iValue != (int)styleOpt.pageDurManual) {
644 if (MsgSettingSetInt(MMS_STYLE_PAGE_DUR_MANUAL, styleOpt.pageDurManual) != MSG_SUCCESS) {
645 MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_DUR_MANUAL);
646 return MSG_ERR_SET_SETTING;
653 MSG_ERROR_T MsgSetPushMsgOpt(const MSG_SETTING_S *pSetting)
655 MSG_PUSHMSG_OPT_S pushOpt;
659 memcpy(&pushOpt, &(pSetting->option.pushMsgOpt), sizeof(MSG_PUSHMSG_OPT_S));
661 MsgSettingGetBool(PUSH_RECV_OPTION, &bValue);
662 if (bValue != pushOpt.bReceive) {
663 if (MsgSettingSetBool(PUSH_RECV_OPTION, pushOpt.bReceive) != MSG_SUCCESS) {
664 MSG_DEBUG("Error to set config data [%s]", PUSH_RECV_OPTION);
665 return MSG_ERR_SET_SETTING;
669 iValue = MsgSettingGetInt(PUSH_SERVICE_TYPE);
670 if (iValue != (int)pushOpt.serviceType) {
671 if (MsgSettingSetInt(PUSH_SERVICE_TYPE, (int)pushOpt.serviceType) != MSG_SUCCESS) {
672 MSG_DEBUG("Error to set config data [%s]", PUSH_SERVICE_TYPE);
673 return MSG_ERR_SET_SETTING;
681 MSG_ERROR_T MsgSetCBMsgOpt(const MSG_SETTING_S *pSetting, bool bSetSim)
683 MSG_ERROR_T err = MSG_SUCCESS;
685 MSG_CBMSG_OPT_S cbOpt;
689 memcpy(&cbOpt, &(pSetting->option.cbMsgOpt), sizeof(MSG_CBMSG_OPT_S));
693 cbOpt.maxSimCnt = MsgSettingGetInt(CB_MAX_SIM_COUNT);
695 if (cbOpt.channelData.channelCnt > cbOpt.maxSimCnt)
697 MSG_DEBUG("Channel Count is over Max SIM Count [%d]", cbOpt.channelData.channelCnt);
698 return MSG_ERR_SET_SIM_SET;
701 if (MsgSetConfigInSim(pSetting) != MSG_SUCCESS)
703 MSG_DEBUG("Error to set config data in sim [%d]", err);
704 return MSG_ERR_SET_SIM_SET;
708 MsgSettingGetBool(CB_RECEIVE, &bValue);
709 if (bValue != cbOpt.bReceive) {
710 if (MsgSettingSetBool(CB_RECEIVE, cbOpt.bReceive) != MSG_SUCCESS) {
711 MSG_DEBUG("Error to set config data [%s]", CB_RECEIVE);
712 return MSG_ERR_SET_SETTING;
716 MsgSettingGetBool(CB_ALL_CHANNEL, &bValue);
717 if (bValue != cbOpt.bAllChannel) {
718 if (MsgSettingSetBool(CB_ALL_CHANNEL, cbOpt.bAllChannel) != MSG_SUCCESS) {
719 MSG_DEBUG("Error to set config data [%s]", CB_ALL_CHANNEL);
720 return MSG_ERR_SET_SETTING;
724 iValue = MsgSettingGetInt(CB_MAX_SIM_COUNT);
725 if (iValue != cbOpt.maxSimCnt) {
726 if (MsgSettingSetInt(CB_MAX_SIM_COUNT, cbOpt.maxSimCnt) != MSG_SUCCESS) {
727 MSG_DEBUG("Error to set config data [%s]", CB_MAX_SIM_COUNT);
728 return MSG_ERR_SET_SETTING;
732 iValue = MsgSettingGetInt(CB_CHANNEL_COUNT);
733 if (iValue != cbOpt.channelData.channelCnt) {
734 if (MsgSettingSetInt(CB_CHANNEL_COUNT, cbOpt.channelData.channelCnt) != MSG_SUCCESS) {
735 MSG_DEBUG("Error to set config data [%s]", CB_CHANNEL_COUNT);
736 return MSG_ERR_SET_SETTING;
740 char keyName[DEF_BUF_LEN] = {0, };
742 for (int i = 0; i < cbOpt.channelData.channelCnt; i++)
744 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_ACTIVATE, i);
746 if ((err = MsgSettingSetBool(keyName, cbOpt.channelData.channelInfo[i].bActivate)) != MSG_SUCCESS)
749 memset(keyName, 0x00, sizeof(keyName));
750 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_ID, i);
752 if ((err = MsgSettingSetInt(keyName, cbOpt.channelData.channelInfo[i].id)) != MSG_SUCCESS)
755 memset(keyName, 0x00, sizeof(keyName));
756 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_NAME, i);
758 if ((err = MsgSettingSetString(keyName, cbOpt.channelData.channelInfo[i].name)) != MSG_SUCCESS)
764 for (int i = MSG_CBLANG_TYPE_ALL; i < MSG_CBLANG_TYPE_MAX; i++)
766 memset(keyName, 0x00, sizeof(keyName));
767 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_LANGUAGE, i);
769 if (MsgSettingSetBool(keyName, cbOpt.bLanguage[i]) != MSG_SUCCESS)
771 MSG_DEBUG("Error to set config data [%s]", keyName);
772 return MSG_ERR_SET_SETTING;
781 MSG_ERROR_T MsgSetVoiceMailOpt(const MSG_SETTING_S *pSetting)
783 MSG_VOICEMAIL_OPT_S voiceMailOpt;
786 memcpy(&voiceMailOpt, &(pSetting->option.voiceMailOpt), sizeof(MSG_VOICEMAIL_OPT_S));
788 pValue = MsgSettingGetString(VOICEMAIL_NUMBER);
789 if (pValue != NULL && strcmp(pValue, voiceMailOpt.mailNumber) == 0) {
790 /* Value is same with previous one. Therefore, we don't need to save it. */
792 if (MsgSettingSetString(VOICEMAIL_NUMBER, voiceMailOpt.mailNumber) != MSG_SUCCESS) {
793 MSG_DEBUG("Error to set config data [%s]", VOICEMAIL_NUMBER);
795 if (pValue != NULL) {
800 return MSG_ERR_SET_SETTING;
804 if (pValue != NULL) {
813 MSG_ERROR_T MsgSetMsgSizeOpt(const MSG_SETTING_S *pSetting)
815 MSG_MSGSIZE_OPT_S msgSizeOpt;
818 memcpy(&msgSizeOpt, &(pSetting->option.msgSizeOpt), sizeof(MSG_MSGSIZE_OPT_S));
820 iValue = MsgSettingGetInt(MSGSIZE_OPTION);
821 if (iValue != msgSizeOpt.nMsgSize) {
822 if (MsgSettingSetInt(MSGSIZE_OPTION, msgSizeOpt.nMsgSize) != MSG_SUCCESS) {
823 MSG_DEBUG("Error to set config data [%s]", MSGSIZE_OPTION);
824 return MSG_ERR_SET_SETTING;
832 void MsgGetGeneralOpt(MSG_SETTING_S *pSetting)
834 memset(&(pSetting->option.generalOpt), 0x00, sizeof(MSG_GENERAL_OPT_S));
836 MsgSettingGetBool(MSG_KEEP_COPY, &pSetting->option.generalOpt.bKeepCopy);
840 void MsgGetSMSSendOpt(MSG_SETTING_S *pSetting)
842 memset(&(pSetting->option.smsSendOpt), 0x00, sizeof(MSG_SMS_SENDOPT_S));
844 pSetting->option.smsSendOpt.dcs = (MSG_ENCODE_TYPE_T)MsgSettingGetInt(SMS_SEND_DCS);
846 pSetting->option.smsSendOpt.netMode = (MSG_SMS_NETWORK_MODE_T)MsgSettingGetInt(SMS_SEND_NETWORK_MODE);
848 MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSetting->option.smsSendOpt.bReplyPath);
850 MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSetting->option.smsSendOpt.bDeliveryReport);
852 pSetting->option.smsSendOpt.saveStorage = (MSG_SMS_SAVE_STORAGE_T)MsgSettingGetInt(SMS_SEND_SAVE_STORAGE);
856 void MsgGetSMSCList(MSG_SETTING_S *pSetting)
858 char keyName[DEF_BUF_LEN] = {0, };
859 char *tmpValue = NULL;
861 memset(&(pSetting->option.smscList), 0x00, sizeof(MSG_SMSC_LIST_S));
863 pSetting->option.smscList.selected = MsgSettingGetInt(SMSC_SELECTED);
865 pSetting->option.smscList.totalCnt = MsgSettingGetInt(SMSC_TOTAL_COUNT);
867 for (int i = 0; i < pSetting->option.smscList.totalCnt; i++)
869 memset(keyName, 0x00, sizeof(keyName));
870 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_PID, i);
872 pSetting->option.smscList.smscData[i].pid = (MSG_SMS_PID_T)MsgSettingGetInt(keyName);
874 memset(keyName, 0x00, sizeof(keyName));
875 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_VAL_PERIOD, i);
877 pSetting->option.smscList.smscData[i].valPeriod = (MSG_VAL_PERIOD_T)MsgSettingGetInt(keyName);
879 memset(keyName, 0x00, sizeof(keyName));
880 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_NAME, i);
882 memset(pSetting->option.smscList.smscData[i].name, 0x00, SMSC_NAME_MAX+1);
884 tmpValue = MsgSettingGetString(keyName);
885 if (tmpValue != NULL) {
886 strncpy(pSetting->option.smscList.smscData[i].name, tmpValue, SMSC_NAME_MAX);
891 memset(keyName, 0x00, sizeof(keyName));
892 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_TON, i);
894 pSetting->option.smscList.smscData[i].smscAddr.ton = (MSG_SMS_TON_T)MsgSettingGetInt(keyName);
896 memset(keyName, 0x00, sizeof(keyName));
897 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_NPI, i);
899 pSetting->option.smscList.smscData[i].smscAddr.npi = (MSG_SMS_NPI_T)MsgSettingGetInt(keyName);
901 memset(keyName, 0x00, sizeof(keyName));
902 snprintf(keyName, DEF_BUF_LEN, "%s/%d", SMSC_ADDRESS, i);
904 memset(pSetting->option.smscList.smscData[i].smscAddr.address, 0x00, sizeof(pSetting->option.smscList.smscData[i].smscAddr.address));
906 tmpValue = MsgSettingGetString(keyName);
907 if (tmpValue != NULL) {
908 strncpy(pSetting->option.smscList.smscData[i].smscAddr.address, tmpValue, SMSC_ADDR_MAX);
916 void MsgGetMMSSendOpt(MSG_SETTING_S *pSetting)
918 memset(&(pSetting->option.mmsSendOpt), 0x00, sizeof(MSG_MMS_SENDOPT_S));
920 pSetting->option.mmsSendOpt.msgClass = (MSG_MMS_MSG_CLASS_TYPE_T)MsgSettingGetInt(MMS_SEND_MSG_CLASS);
922 pSetting->option.mmsSendOpt.priority = (MSG_PRIORITY_TYPE_T)MsgSettingGetInt(MMS_SEND_PRIORITY);
924 pSetting->option.mmsSendOpt.expiryTime = (MSG_MMS_EXPIRY_TIME_T)MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
926 pSetting->option.mmsSendOpt.deliveryTime = (MSG_MMS_DELIVERY_TIME_T)MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
928 pSetting->option.mmsSendOpt.customDeliveryTime = MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY);
930 MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &pSetting->option.mmsSendOpt.bSenderVisibility);
932 MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &pSetting->option.mmsSendOpt.bDeliveryReport);
934 MsgSettingGetBool(MMS_SEND_READ_REPLY, &pSetting->option.mmsSendOpt.bReadReply);
936 MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &pSetting->option.mmsSendOpt.bBodyReplying);
938 MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &pSetting->option.mmsSendOpt.bHideRecipients);
940 pSetting->option.mmsSendOpt.replyCharging = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING);
942 pSetting->option.mmsSendOpt.replyChargingDeadline = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE);
944 pSetting->option.mmsSendOpt.replyChargingSize = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE);
946 pSetting->option.mmsSendOpt.creationMode = MsgSettingGetInt(MMS_SEND_CREATION_MODE);
950 void MsgGetMMSRecvOpt(MSG_SETTING_S *pSetting)
952 memset(&(pSetting->option.mmsRecvOpt), 0x00, sizeof(MSG_MMS_RECVOPT_S));
954 pSetting->option.mmsRecvOpt.homeNetwork = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
956 pSetting->option.mmsRecvOpt.abroadNetwok = (MSG_MMS_ABROAD_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
958 MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &pSetting->option.mmsRecvOpt.readReceipt);
960 MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &pSetting->option.mmsRecvOpt.bDeliveryReceipt);
962 MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &pSetting->option.mmsRecvOpt.bRejectUnknown);
964 MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &pSetting->option.mmsRecvOpt.bRejectAdvertisement);
968 void MsgGetMMSStyleOpt(MSG_SETTING_S *pSetting)
970 memset(&(pSetting->option.mmsStyleOpt), 0x00, sizeof(MSG_MMS_STYLEOPT_S));
972 pSetting->option.mmsStyleOpt.fontSize = MsgSettingGetInt(MMS_STYLE_FONT_SIZE);
974 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &pSetting->option.mmsStyleOpt.bFontStyleBold);
976 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &pSetting->option.mmsStyleOpt.bFontStyleItalic);
978 MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &pSetting->option.mmsStyleOpt.bFontStyleUnderline);
980 pSetting->option.mmsStyleOpt.fontColorRed = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED);
982 pSetting->option.mmsStyleOpt.fontColorGreen = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN);
984 pSetting->option.mmsStyleOpt.fontColorBlue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE);
986 pSetting->option.mmsStyleOpt.fontColorHue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE);
988 pSetting->option.mmsStyleOpt.bgColorRed = MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED);
990 pSetting->option.mmsStyleOpt.bgColorGreen = MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN);
992 pSetting->option.mmsStyleOpt.bgColorBlue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE);
994 pSetting->option.mmsStyleOpt.bgColorHue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE);
996 pSetting->option.mmsStyleOpt.pageDur = MsgSettingGetInt(MMS_STYLE_PAGE_DUR);
998 pSetting->option.mmsStyleOpt.pageCustomDur = MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR);
1000 pSetting->option.mmsStyleOpt.pageDurManual = MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL);
1004 void MsgGetPushMsgOpt(MSG_SETTING_S *pSetting)
1006 memset(&(pSetting->option.pushMsgOpt), 0x00, sizeof(MSG_PUSHMSG_OPT_S));
1008 MsgSettingGetBool(PUSH_RECV_OPTION, &pSetting->option.pushMsgOpt.bReceive);
1010 pSetting->option.pushMsgOpt.serviceType = (MSG_PUSH_SERVICE_TYPE_T)MsgSettingGetInt(PUSH_SERVICE_TYPE);
1014 void MsgGetCBMsgOpt(MSG_SETTING_S *pSetting)
1016 char keyName[DEF_BUF_LEN] = {0, };
1017 char *tmpValue = NULL;
1019 memset(&(pSetting->option.cbMsgOpt), 0x00, sizeof(MSG_CBMSG_OPT_S));
1021 MsgSettingGetBool(CB_RECEIVE, &pSetting->option.cbMsgOpt.bReceive);
1023 MsgSettingGetBool(CB_ALL_CHANNEL, &pSetting->option.cbMsgOpt.bAllChannel);
1025 pSetting->option.cbMsgOpt.maxSimCnt = MsgSettingGetInt(CB_MAX_SIM_COUNT);
1027 pSetting->option.cbMsgOpt.channelData.channelCnt = MsgSettingGetInt(CB_CHANNEL_COUNT);
1029 for (int i = 0; i < pSetting->option.cbMsgOpt.channelData.channelCnt; i++)
1031 memset(keyName, 0x00, sizeof(keyName));
1032 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_ACTIVATE, i);
1034 MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.channelData.channelInfo[i].bActivate);
1036 memset(keyName, 0x00, sizeof(keyName));
1037 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_ID, i);
1039 pSetting->option.cbMsgOpt.channelData.channelInfo[i].id = MsgSettingGetInt(keyName);
1041 memset(keyName, 0x00, sizeof(keyName));
1042 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_CHANNEL_NAME, i);
1044 tmpValue = MsgSettingGetString(keyName);
1045 if (tmpValue != NULL) {
1046 strncpy(pSetting->option.cbMsgOpt.channelData.channelInfo[i].name, tmpValue, CB_CHANNEL_NAME_MAX);
1052 for (int i = MSG_CBLANG_TYPE_ALL; i < MSG_CBLANG_TYPE_MAX; i++)
1054 memset(keyName, 0x00, sizeof(keyName));
1055 snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_LANGUAGE, i);
1057 MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]);
1062 void MsgGetVoiceMailOpt(MSG_SETTING_S *pSetting)
1064 char *tmpValue = NULL;
1066 memset(&(pSetting->option.voiceMailOpt), 0x00, sizeof(MSG_VOICEMAIL_OPT_S));
1068 tmpValue = MsgSettingGetString(VOICEMAIL_NUMBER);
1069 if (tmpValue != NULL) {
1070 strncpy(pSetting->option.voiceMailOpt.mailNumber, tmpValue, MAX_PHONE_NUMBER_LEN);
1077 void MsgGetMsgSizeOpt(MSG_SETTING_S *pSetting)
1079 memset(&(pSetting->option.msgSizeOpt), 0x00, sizeof(MSG_MSGSIZE_OPT_S));
1081 pSetting->option.msgSizeOpt.nMsgSize = MsgSettingGetInt(MSGSIZE_OPTION);
1085 MSG_ERROR_T MsgSetConfigInSim(const MSG_SETTING_S *pSetting)
1087 MSG_ERROR_T err = MSG_SUCCESS;
1089 MsgPlugin* plg = MsgPluginManager::instance()->getPlugin(MSG_SMS_TYPE);
1091 // Get Setting Data from SIM
1093 err = plg->setConfigData(pSetting);
1095 err = MSG_ERR_NULL_POINTER;
1097 if (err != MSG_SUCCESS)
1099 MSG_DEBUG("Error. Error code is %d.", err);