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 /*==================================================================================================
34 ==================================================================================================*/
40 #include "MapiSetting.h"
41 #include "MsgTestSetting.h"
44 /*==================================================================================================
45 FUNCTION IMPLEMENTATION
46 ==================================================================================================*/
47 void MsgTestSettingMain(MSG_HANDLE_T hMsgHandle)
49 if (hMsgHandle == NULL)
51 MSG_DEBUG("Handle is NULL");
61 print("======================================");
62 print("============ Setting Menu ============");
63 print("======================================");
64 print("[1] General Options");
65 print("[2] SMS Send Options");
66 print("[3] SMSC List");
67 print("[4] MMS Send Options");
68 print("[5] MMS Recv Options");
69 print("[6] MMS Style Options");
70 print("[7] Push Msg Options");
71 print("[8] CB Msg Options");
72 print("[0] Voice Mail Option");
73 print("[A] Msg Size Option");
75 print("======================================");
79 memset(menu, 0x00, sizeof(menu));
82 MsgSelectMenu(hMsgHandle, menu);
84 while (strcmp(menu, "B"));
88 void MsgSelectMenu(MSG_HANDLE_T hMsgHandle, char *pMenu)
90 if (!strcmp(pMenu, "1"))
92 MsgTestGeneralOpt(hMsgHandle);
94 else if (!strcmp(pMenu, "2"))
96 MsgTestSMSSendOpt(hMsgHandle);
98 else if (!strcmp(pMenu, "3"))
100 MsgTestSMSCList(hMsgHandle);
102 else if (!strcmp(pMenu, "4"))
104 MsgTestMMSSendOpt(hMsgHandle);
106 else if (!strcmp(pMenu, "5"))
108 MsgTestMMSRecvOpt(hMsgHandle);
110 else if (!strcmp(pMenu, "6"))
112 MsgTestMMSStyleOpt(hMsgHandle);
114 else if (!strcmp(pMenu, "7"))
116 MsgTestPushMsgOpt(hMsgHandle);
118 else if (!strcmp(pMenu, "8"))
120 MsgTestCBMsgOpt(hMsgHandle);
122 else if (!strcmp(pMenu, "0"))
124 MsgTestVoiceMailOpt(hMsgHandle);
126 else if (!strcmp(pMenu, "A"))
128 MsgTestMsgSizeOpt(hMsgHandle);
133 void MsgTestGeneralOpt(MSG_HANDLE_T hMsgHandle)
135 MSG_ERROR_T err = MSG_SUCCESS;
140 MSG_SETTING_S setting;
144 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_GENERAL_OPT_S));
146 setting.type = MSG_GENERAL_OPT;
148 err = msg_get_config(hMsgHandle, &setting);
152 print("======================================");
153 print("=========== General Option ===========");
154 print("======================================");
156 memset(strPrint, 0x00, sizeof(strPrint));
157 snprintf(strPrint, sizeof(strPrint), "Keep a Copy : [%d]", setting.option.generalOpt.bKeepCopy);
160 memset(strPrint, 0x00, sizeof(strPrint));
161 snprintf(strPrint, sizeof(strPrint), "Alert Tone : [%d]", setting.option.generalOpt.alertTone);
164 print("======================================");
165 print("================ Menu ================");
166 print("[U] Update Options");
168 print("======================================");
172 memset(menu, 0x00, sizeof(menu));
173 cin.getline(menu, 2);
175 if (!strcmp(menu, "U"))
177 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_GENERAL_OPT_S));
179 setting.type = MSG_GENERAL_OPT;
181 setting.option.generalOpt.bKeepCopy = true;
182 setting.option.generalOpt.alertTone = MSG_ALERT_TONE_ONCE;
184 else if (!strcmp(menu, "B"))
193 err = msg_set_config(hMsgHandle, &setting);
195 if (err == MSG_SUCCESS)
196 print("Setting Config Data is OK!");
198 print("Setting Config Data is failed!");
204 void MsgTestSMSSendOpt(MSG_HANDLE_T hMsgHandle)
206 MSG_ERROR_T err = MSG_SUCCESS;
211 MSG_SETTING_S setting;
215 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_SMS_SENDOPT_S));
217 setting.type = MSG_SMS_SENDOPT;
219 err = msg_get_config(hMsgHandle, &setting);
223 print("======================================");
224 print("=========== SMS Send Option ===========");
225 print("======================================");
227 memset(strPrint, 0x00, sizeof(strPrint));
228 snprintf(strPrint, sizeof(strPrint), "DCS : [%d]", setting.option.smsSendOpt.dcs);
231 memset(strPrint, 0x00, sizeof(strPrint));
232 snprintf(strPrint, sizeof(strPrint), "Network Selection : [%d]", setting.option.smsSendOpt.netMode);
235 memset(strPrint, 0x00, sizeof(strPrint));
236 snprintf(strPrint, sizeof(strPrint), "Reply Path : [%d]", setting.option.smsSendOpt.bReplyPath);
239 memset(strPrint, 0x00, sizeof(strPrint));
240 snprintf(strPrint, sizeof(strPrint), "Delivery Report : [%d]", setting.option.smsSendOpt.bDeliveryReport);
243 memset(strPrint, 0x00, sizeof(strPrint));
244 snprintf(strPrint, sizeof(strPrint), "Save Storage : [%d]", setting.option.smsSendOpt.saveStorage);
247 print("======================================");
248 print("================ Menu ================");
249 print("[U] Update Options");
251 print("======================================");
255 memset(menu, 0x00, sizeof(menu));
256 cin.getline(menu, 2);
258 if (!strcmp(menu, "U"))
260 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_SMS_SENDOPT_S));
262 setting.type = MSG_SMS_SENDOPT;
264 setting.option.smsSendOpt.dcs = MSG_ENCODE_AUTO;
265 setting.option.smsSendOpt.netMode = MSG_SMS_NETWORK_CS_ONLY;
266 setting.option.smsSendOpt.bReplyPath = false;
267 setting.option.smsSendOpt.bDeliveryReport = true;
268 setting.option.smsSendOpt.saveStorage = MSG_SMS_SAVE_STORAGE_PHONE;
270 else if (!strcmp(menu, "B"))
279 err = msg_set_config(hMsgHandle, &setting);
281 if (err == MSG_SUCCESS)
282 print("Setting Config Data is OK!");
284 print("Setting Config Data is failed!");
290 void MsgTestSMSCList(MSG_HANDLE_T hMsgHandle)
292 MSG_ERROR_T err = MSG_SUCCESS;
297 MSG_SETTING_S setting;
301 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_SMSC_LIST_S));
303 setting.type = MSG_SMSC_LIST;
305 err = msg_get_config(hMsgHandle, &setting);
309 print("======================================");
310 print("============== SMSC List ==============");
311 print("======================================");
313 memset(strPrint, 0x00, sizeof(strPrint));
314 snprintf(strPrint, sizeof(strPrint), "Total Count : [%d]", setting.option.smscList.totalCnt);
317 memset(strPrint, 0x00, sizeof(strPrint));
318 snprintf(strPrint, sizeof(strPrint), "Selected SMSC : [%d]", setting.option.smscList.selected);
321 for (int i = 0; i < setting.option.smscList.totalCnt; i++)
323 print("======================================");
325 memset(strPrint, 0x00, sizeof(strPrint));
326 snprintf(strPrint, sizeof(strPrint), "SMSC Name : [%s]", setting.option.smscList.smscData[i].name);
329 memset(strPrint, 0x00, sizeof(strPrint));
330 snprintf(strPrint, sizeof(strPrint), "SMSC Address : [%s]", setting.option.smscList.smscData[i].smscAddr.address);
333 memset(strPrint, 0x00, sizeof(strPrint));
334 snprintf(strPrint, sizeof(strPrint), "SMSC PID : [%d]", setting.option.smscList.smscData[i].pid);
337 memset(strPrint, 0x00, sizeof(strPrint));
338 snprintf(strPrint, sizeof(strPrint), "SMSC VAL PERIOD : [%d]", setting.option.smscList.smscData[i].valPeriod);
341 memset(strPrint, 0x00, sizeof(strPrint));
342 snprintf(strPrint, sizeof(strPrint), "SMSC TON : [%d]", setting.option.smscList.smscData[i].smscAddr.ton);
345 memset(strPrint, 0x00, sizeof(strPrint));
346 snprintf(strPrint, sizeof(strPrint), "SMSC NPI : [%d]", setting.option.smscList.smscData[i].smscAddr.npi);
350 print("======================================");
351 print("================ Menu ================");
352 print("[A] Add New SMSC");
353 print("[U] Update SMSC");
354 print("[D] Delete SMSC");
356 print("======================================");
360 memset(menu, 0x00, sizeof(menu));
361 cin.getline(menu, 2);
363 if (!strcmp(menu, "A"))
367 else if (!strcmp(menu, "U"))
369 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_SMSC_LIST_S));
371 setting.type = MSG_SMSC_LIST;
373 setting.option.smscList.selected = 0;
374 setting.option.smscList.totalCnt = 1;
375 setting.option.smscList.smscData[0].pid = MSG_PID_TEXT;
376 setting.option.smscList.smscData[0].valPeriod = MSG_VAL_MAXIMUM;
377 snprintf(setting.option.smscList.smscData[0].name, SMSC_NAME_MAX, "%s", "SMS Centre 1");
379 setting.option.smscList.smscData[0].smscAddr.ton = MSG_TON_INTERNATIONAL;
380 setting.option.smscList.smscData[0].smscAddr.npi = MSG_NPI_ISDN;
381 snprintf(setting.option.smscList.smscData[0].smscAddr.address, SMSC_ADDR_MAX, "%s", "1111");
383 else if (!strcmp(menu, "D"))
387 else if (!strcmp(menu, "B"))
396 err = msg_set_config(hMsgHandle, &setting);
398 if (err == MSG_SUCCESS)
399 print("Setting Config Data is OK!");
401 print("Setting Config Data is failed!");
407 void MsgTestMMSSendOpt(MSG_HANDLE_T hMsgHandle)
409 MSG_ERROR_T err = MSG_SUCCESS;
414 MSG_SETTING_S setting;
418 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_SENDOPT_S));
420 setting.type = MSG_MMS_SENDOPT;
422 err = msg_get_config(hMsgHandle, &setting);
426 print("======================================");
427 print("=========== MMS Send Option ===========");
428 print("======================================");
430 memset(strPrint, 0x00, sizeof(strPrint));
431 snprintf(strPrint, sizeof(strPrint), "Msg Class : [%d]", setting.option.mmsSendOpt.msgClass);
434 memset(strPrint, 0x00, sizeof(strPrint));
435 snprintf(strPrint, sizeof(strPrint), "Priority : [%d]", setting.option.mmsSendOpt.priority);
438 memset(strPrint, 0x00, sizeof(strPrint));
439 snprintf(strPrint, sizeof(strPrint), "Expiry Time : [%d]", setting.option.mmsSendOpt.expiryTime);
442 memset(strPrint, 0x00, sizeof(strPrint));
443 snprintf(strPrint, sizeof(strPrint), "Delivery Time : [%d]", setting.option.mmsSendOpt.deliveryTime);
446 memset(strPrint, 0x00, sizeof(strPrint));
447 snprintf(strPrint, sizeof(strPrint), "Custom Delivery Time : [%d]", setting.option.mmsSendOpt.customDeliveryTime);
450 memset(strPrint, 0x00, sizeof(strPrint));
451 snprintf(strPrint, sizeof(strPrint), "Sender Visibility : [%d]", setting.option.mmsSendOpt.bSenderVisibility);
454 memset(strPrint, 0x00, sizeof(strPrint));
455 snprintf(strPrint, sizeof(strPrint), "Delivery Report : [%d]", setting.option.mmsSendOpt.bDeliveryReport);
458 memset(strPrint, 0x00, sizeof(strPrint));
459 snprintf(strPrint, sizeof(strPrint), "Read Reply : [%d]", setting.option.mmsSendOpt.bReadReply);
462 memset(strPrint, 0x00, sizeof(strPrint));
463 snprintf(strPrint, sizeof(strPrint), "Keep Copy : [%d]", setting.option.mmsSendOpt.bKeepCopy);
466 memset(strPrint, 0x00, sizeof(strPrint));
467 snprintf(strPrint, sizeof(strPrint), "Body Replying : [%d]", setting.option.mmsSendOpt.bBodyReplying);
470 memset(strPrint, 0x00, sizeof(strPrint));
471 snprintf(strPrint, sizeof(strPrint), "Hide Recipients : [%d]", setting.option.mmsSendOpt.bHideRecipients);
474 memset(strPrint, 0x00, sizeof(strPrint));
475 snprintf(strPrint, sizeof(strPrint), "Reply Charging : [%d]", setting.option.mmsSendOpt.replyCharging);
478 memset(strPrint, 0x00, sizeof(strPrint));
479 snprintf(strPrint, sizeof(strPrint), "Reply Charging Deadline : [%d]", setting.option.mmsSendOpt.replyChargingDeadline);
482 memset(strPrint, 0x00, sizeof(strPrint));
483 snprintf(strPrint, sizeof(strPrint), "Reply Charging Size : [%d]", setting.option.mmsSendOpt.replyChargingSize);
486 memset(strPrint, 0x00, sizeof(strPrint));
487 snprintf(strPrint, sizeof(strPrint), "Creation Mode : [%d]", setting.option.mmsSendOpt.creationMode);
490 print("======================================");
491 print("================ Menu ================");
492 print("[U] Update Options");
494 print("======================================");
498 memset(menu, 0x00, sizeof(menu));
499 cin.getline(menu, 2);
501 if (!strcmp(menu, "U"))
503 memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_SENDOPT_S));
505 setting.type = MSG_MMS_SENDOPT;
507 setting.option.mmsSendOpt.msgClass = MSG_CLASS_AUTO;
508 setting.option.mmsSendOpt.priority = MSG_MESSAGE_PRIORITY_NORMAL;
509 setting.option.mmsSendOpt.expiryTime = MSG_EXPIRY_TIME_1DAY;
510 setting.option.mmsSendOpt.deliveryTime = MSG_DELIVERY_TIME_IMMEDIATLY;
511 setting.option.mmsSendOpt.customDeliveryTime = 0;
512 setting.option.mmsSendOpt.bSenderVisibility = false;
513 setting.option.mmsSendOpt.bDeliveryReport = true;
514 setting.option.mmsSendOpt.bReadReply = false;
515 setting.option.mmsSendOpt.bKeepCopy = false;
516 setting.option.mmsSendOpt.bBodyReplying = false;
517 setting.option.mmsSendOpt.bHideRecipients = false;
518 setting.option.mmsSendOpt.replyCharging = MSG_REPLY_CHARGING_NONE;
519 setting.option.mmsSendOpt.replyChargingDeadline = 0;
520 setting.option.mmsSendOpt.replyChargingSize = 0;
521 setting.option.mmsSendOpt.creationMode = MSG_CREATION_MODE_FREE;
523 else if (!strcmp(menu, "B"))
532 err = msg_set_config(hMsgHandle, &setting);
534 if (err == MSG_SUCCESS)
535 print("Setting Config Data is OK!");
537 print("Setting Config Data is failed!");
543 void MsgTestMMSRecvOpt(MSG_HANDLE_T hMsgHandle)
545 MSG_ERROR_T err = MSG_SUCCESS;
550 MSG_SETTING_S setOption;
551 MSG_SETTING_S getOption;
555 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_RECVOPT_S));
557 getOption.type = MSG_MMS_RECVOPT;
559 err = msg_get_config(hMsgHandle, &getOption);
563 print("======================================");
564 print("=========== MMS Recv Option ===========");
565 print("======================================");
567 memset(strPrint, 0x00, sizeof(strPrint));
568 snprintf(strPrint, sizeof(strPrint), "Home Network : [%d]", getOption.option.mmsRecvOpt.homeNetwork);
571 memset(strPrint, 0x00, sizeof(strPrint));
572 snprintf(strPrint, sizeof(strPrint), "Abroad Network : [%d]", getOption.option.mmsRecvOpt.abroadNetwok);
575 memset(strPrint, 0x00, sizeof(strPrint));
576 snprintf(strPrint, sizeof(strPrint), "Read Receipt : [%d]", getOption.option.mmsRecvOpt.readReceipt);
579 memset(strPrint, 0x00, sizeof(strPrint));
580 snprintf(strPrint, sizeof(strPrint), "Delivery Receipt : [%d]", getOption.option.mmsRecvOpt.bDeliveryReceipt);
583 memset(strPrint, 0x00, sizeof(strPrint));
584 snprintf(strPrint, sizeof(strPrint), "Reject Unknown : [%d]", getOption.option.mmsRecvOpt.bRejectUnknown);
587 memset(strPrint, 0x00, sizeof(strPrint));
588 snprintf(strPrint, sizeof(strPrint), "Reject Advertisement : [%d]", getOption.option.mmsRecvOpt.bRejectAdvertisement);
591 print("======================================");
592 print("================ Menu ================");
593 print("[U] Update Options");
595 print("======================================");
599 memset(menu, 0x00, sizeof(menu));
600 cin.getline(menu, 2);
602 if (!strcmp(menu, "U"))
604 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_RECVOPT_S));
606 setOption.type = MSG_MMS_RECVOPT;
608 setOption.option.mmsRecvOpt.homeNetwork = MSG_HOME_AUTO_DOWNLOAD;
609 setOption.option.mmsRecvOpt.abroadNetwok = MSG_ABROAD_RESTRICTED;
610 setOption.option.mmsRecvOpt.readReceipt = false;
611 setOption.option.mmsRecvOpt.bDeliveryReceipt = true;
612 setOption.option.mmsRecvOpt.bRejectUnknown = false;
613 setOption.option.mmsRecvOpt.bRejectAdvertisement = false;
615 err = msg_set_config(hMsgHandle, &setOption);
617 if (err == MSG_SUCCESS)
618 print("Setting Config Data is OK!");
620 print("Setting Config Data is failed!");
622 else if (!strcmp(menu, "B"))
635 void MsgTestMMSStyleOpt(MSG_HANDLE_T hMsgHandle)
637 MSG_ERROR_T err = MSG_SUCCESS;
642 MSG_SETTING_S setOption;
643 MSG_SETTING_S getOption;
647 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_STYLEOPT_S));
649 getOption.type = MSG_MMS_STYLEOPT;
651 err = msg_get_config(hMsgHandle, &getOption);
655 print("======================================");
656 print("=========== MMS Style Option ===========");
657 print("======================================");
659 memset(strPrint, 0x00, sizeof(strPrint));
660 snprintf(strPrint, sizeof(strPrint), "Font Size : [%d]", getOption.option.mmsStyleOpt.fontSize);
663 memset(strPrint, 0x00, sizeof(strPrint));
664 snprintf(strPrint, sizeof(strPrint), "Font Style (Bold) : [%d]", getOption.option.mmsStyleOpt.bFontStyleBold);
667 memset(strPrint, 0x00, sizeof(strPrint));
668 snprintf(strPrint, sizeof(strPrint), "Font Style (Italic) : [%d]", getOption.option.mmsStyleOpt.bFontStyleItalic);
671 memset(strPrint, 0x00, sizeof(strPrint));
672 snprintf(strPrint, sizeof(strPrint), "Font Style (Underline) : [%d]", getOption.option.mmsStyleOpt.bFontStyleUnderline);
675 memset(strPrint, 0x00, sizeof(strPrint));
676 snprintf(strPrint, sizeof(strPrint), "Font Color (Red) : [%d]", getOption.option.mmsStyleOpt.fontColorRed);
679 memset(strPrint, 0x00, sizeof(strPrint));
680 snprintf(strPrint, sizeof(strPrint), "Font Color (Green) : [%d]", getOption.option.mmsStyleOpt.fontColorGreen);
683 memset(strPrint, 0x00, sizeof(strPrint));
684 snprintf(strPrint, sizeof(strPrint), "Font Color (Blue) : [%d]", getOption.option.mmsStyleOpt.fontColorBlue);
687 memset(strPrint, 0x00, sizeof(strPrint));
688 snprintf(strPrint, sizeof(strPrint), "Font Color (Hue) : [%d]", getOption.option.mmsStyleOpt.fontColorHue);
691 memset(strPrint, 0x00, sizeof(strPrint));
692 snprintf(strPrint, sizeof(strPrint), "BG Color (Red) : [%d]", getOption.option.mmsStyleOpt.bgColorRed);
695 memset(strPrint, 0x00, sizeof(strPrint));
696 snprintf(strPrint, sizeof(strPrint), "BG Color (Green) : [%d]", getOption.option.mmsStyleOpt.bgColorGreen);
699 memset(strPrint, 0x00, sizeof(strPrint));
700 snprintf(strPrint, sizeof(strPrint), "BG Color (Blue) : [%d]", getOption.option.mmsStyleOpt.bgColorBlue);
703 memset(strPrint, 0x00, sizeof(strPrint));
704 snprintf(strPrint, sizeof(strPrint), "BG Color (Hue) : [%d]", getOption.option.mmsStyleOpt.bgColorHue);
707 memset(strPrint, 0x00, sizeof(strPrint));
708 snprintf(strPrint, sizeof(strPrint), "Page Duration : [%d]", getOption.option.mmsStyleOpt.pageDur);
711 memset(strPrint, 0x00, sizeof(strPrint));
712 snprintf(strPrint, sizeof(strPrint), "Page Custom Duration : [%d]", getOption.option.mmsStyleOpt.pageCustomDur);
715 memset(strPrint, 0x00, sizeof(strPrint));
716 snprintf(strPrint, sizeof(strPrint), "Page Duration Manual : [%d]", getOption.option.mmsStyleOpt.pageDurManual);
719 print("======================================");
720 print("================ Menu ================");
721 print("[U] Update Options");
723 print("======================================");
727 memset(menu, 0x00, sizeof(menu));
728 cin.getline(menu, 2);
730 if (!strcmp(menu, "U"))
732 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MMS_STYLEOPT_S));
734 setOption.type = MSG_MMS_STYLEOPT;
736 setOption.option.mmsStyleOpt.fontSize = 30;
737 setOption.option.mmsStyleOpt.bFontStyleBold = true;
738 setOption.option.mmsStyleOpt.bFontStyleItalic = true;
739 setOption.option.mmsStyleOpt.bFontStyleUnderline = false;
740 setOption.option.mmsStyleOpt.fontColorRed = 0;
741 setOption.option.mmsStyleOpt.fontColorGreen = 0;
742 setOption.option.mmsStyleOpt.fontColorBlue = 0;
743 setOption.option.mmsStyleOpt.fontColorHue = 255;
744 setOption.option.mmsStyleOpt.bgColorRed = 255;
745 setOption.option.mmsStyleOpt.bgColorGreen = 255;
746 setOption.option.mmsStyleOpt.bgColorBlue = 255;
747 setOption.option.mmsStyleOpt.bgColorHue = 255;
748 setOption.option.mmsStyleOpt.pageDur = 2;
749 setOption.option.mmsStyleOpt.pageCustomDur = 0;
750 setOption.option.mmsStyleOpt.pageDurManual = 0;
752 err = msg_set_config(hMsgHandle, &setOption);
754 if (err == MSG_SUCCESS)
755 print("Setting Config Data is OK!");
757 print("Setting Config Data is failed!");
759 else if (!strcmp(menu, "B"))
772 void MsgTestPushMsgOpt(MSG_HANDLE_T hMsgHandle)
774 MSG_ERROR_T err = MSG_SUCCESS;
779 MSG_SETTING_S setOption;
780 MSG_SETTING_S getOption;
784 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_PUSHMSG_OPT_S));
786 getOption.type = MSG_PUSHMSG_OPT;
788 err = msg_get_config(hMsgHandle, &getOption);
792 print("======================================");
793 print("=========== Push Msg Option ===========");
794 print("======================================");
796 memset(strPrint, 0x00, sizeof(strPrint));
797 snprintf(strPrint, sizeof(strPrint), "Receive Option : [%d]", getOption.option.pushMsgOpt.bReceive);
800 memset(strPrint, 0x00, sizeof(strPrint));
801 snprintf(strPrint, sizeof(strPrint), "Service Load : [%d]", getOption.option.pushMsgOpt.serviceType);
804 print("======================================");
805 print("================ Menu ================");
806 print("[U] Update Options");
808 print("======================================");
812 memset(menu, 0x00, sizeof(menu));
813 cin.getline(menu, 2);
815 if (!strcmp(menu, "U"))
817 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_PUSHMSG_OPT_S));
819 setOption.type = MSG_PUSHMSG_OPT;
821 setOption.option.pushMsgOpt.bReceive = false;
822 setOption.option.pushMsgOpt.serviceType = MSG_PUSH_SERVICE_PROMPT;
824 err = msg_set_config(hMsgHandle, &setOption);
826 if (err == MSG_SUCCESS)
827 print("Setting Config Data is OK!");
829 print("Setting Config Data is failed!");
831 else if (!strcmp(menu, "B"))
843 void MsgTestCBMsgOpt(MSG_HANDLE_T hMsgHandle)
845 MSG_ERROR_T err = MSG_SUCCESS;
850 MSG_SETTING_S setOption;
851 MSG_SETTING_S getOption;
855 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_CBMSG_OPT_S));
857 getOption.type = MSG_CBMSG_OPT;
859 err = msg_get_config(hMsgHandle, &getOption);
863 print("======================================");
864 print("=========== CB Msg Option ===========");
865 print("======================================");
867 memset(strPrint, 0x00, sizeof(strPrint));
868 snprintf(strPrint, sizeof(strPrint), "Receive : [%d]", getOption.option.cbMsgOpt.bReceive);
871 memset(strPrint, 0x00, sizeof(strPrint));
872 snprintf(strPrint, sizeof(strPrint), "All Channel : [%d]", getOption.option.cbMsgOpt.bAllChannel);
875 memset(strPrint, 0x00, sizeof(strPrint));
876 snprintf(strPrint, sizeof(strPrint), "Channel Count : [%d]", getOption.option.cbMsgOpt.channelData.channelCnt);
879 for (int i = 0; i < getOption.option.cbMsgOpt.channelData.channelCnt; i++)
881 memset(strPrint, 0x00, sizeof(strPrint));
882 snprintf(strPrint, sizeof(strPrint), "Channel Activate : [%d]", getOption.option.cbMsgOpt.channelData.channelInfo[i].bActivate);
885 memset(strPrint, 0x00, sizeof(strPrint));
886 snprintf(strPrint, sizeof(strPrint), "Channel ID : [%d]", getOption.option.cbMsgOpt.channelData.channelInfo[i].id);
889 memset(strPrint, 0x00, sizeof(strPrint));
890 snprintf(strPrint, sizeof(strPrint), "Channel Name : [%s]", getOption.option.cbMsgOpt.channelData.channelInfo[i].name);
894 for (int i = MSG_CBLANG_TYPE_ALL; i < MSG_CBLANG_TYPE_MAX; i++)
896 memset(strPrint, 0x00, sizeof(strPrint));
897 snprintf(strPrint, sizeof(strPrint), "Language[%d] : [%d]", i, getOption.option.cbMsgOpt.bLanguage[i]);
901 print("======================================");
902 print("================ Menu ================");
903 print("[U] Update Options");
905 print("======================================");
909 memset(menu, 0x00, sizeof(menu));
910 cin.getline(menu, 2);
912 if (!strcmp(menu, "U"))
914 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_CBMSG_OPT_S));
916 setOption.type = MSG_CBMSG_OPT;
918 setOption.option.cbMsgOpt.bReceive = true;
919 setOption.option.cbMsgOpt.bAllChannel = true;
921 setOption.option.cbMsgOpt.channelData.channelCnt = 3;
923 setOption.option.cbMsgOpt.channelData.channelInfo[0].bActivate = true;
924 setOption.option.cbMsgOpt.channelData.channelInfo[0].id = 10;
925 memset(setOption.option.cbMsgOpt.channelData.channelInfo[0].name, 0x00, CB_CHANNEL_NAME_MAX+1);
926 strncpy(setOption.option.cbMsgOpt.channelData.channelInfo[0].name, "CB MSG", CB_CHANNEL_NAME_MAX);
928 setOption.option.cbMsgOpt.channelData.channelInfo[1].bActivate = true;
929 setOption.option.cbMsgOpt.channelData.channelInfo[1].id = 50;
930 memset(setOption.option.cbMsgOpt.channelData.channelInfo[1].name, 0x00, CB_CHANNEL_NAME_MAX+1);
931 strncpy(setOption.option.cbMsgOpt.channelData.channelInfo[1].name, "CB TEST", CB_CHANNEL_NAME_MAX);
933 setOption.option.cbMsgOpt.channelData.channelInfo[2].bActivate = false;
934 setOption.option.cbMsgOpt.channelData.channelInfo[2].id = 60;
935 memset(setOption.option.cbMsgOpt.channelData.channelInfo[2].name, 0x00, CB_CHANNEL_NAME_MAX+1);
937 // memcpy(&setOption.option.cbMsgOpt.channelData, &getOption.option.cbMsgOpt.channelData, sizeof(MSG_CB_CHANNEL_S));
939 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_ALL] = false;
940 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_ENG] = true;
941 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_GER] = false;
942 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_FRE] = false;
943 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_ITA] = false;
944 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_NED] = false;
945 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_SPA] = false;
946 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_POR] = false;
947 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_SWE] = false;
948 setOption.option.cbMsgOpt.bLanguage[MSG_CBLANG_TYPE_TUR] = false;
950 err = msg_set_config(hMsgHandle, &setOption);
952 if (err == MSG_SUCCESS)
953 print("Setting Config Data is OK!");
955 print("Setting Config Data is failed!");
957 else if (!strcmp(menu, "B"))
969 void MsgTestVoiceMailOpt(MSG_HANDLE_T hMsgHandle)
971 MSG_ERROR_T err = MSG_SUCCESS;
976 MSG_SETTING_S setOption;
977 MSG_SETTING_S getOption;
981 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_VOICEMAIL_OPT_S));
983 getOption.type = MSG_VOICEMAIL_OPT;
985 err = msg_get_config(hMsgHandle, &getOption);
989 print("======================================");
990 print("=========== Voice Mail Option ===========");
991 print("======================================");
993 memset(strPrint, 0x00, sizeof(strPrint));
994 snprintf(strPrint, sizeof(strPrint), "Voice Mail Number : [%s]", getOption.option.voiceMailOpt.mailNumber);
997 print("======================================");
998 print("================ Menu ================");
999 print("[U] Update Options");
1001 print("======================================");
1005 memset(menu, 0x00, sizeof(menu));
1006 cin.getline(menu, 2);
1008 if (!strcmp(menu, "U"))
1010 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_VOICEMAIL_OPT_S));
1012 setOption.type = MSG_VOICEMAIL_OPT;
1014 memset(setOption.option.voiceMailOpt.mailNumber, 0x00, sizeof(MAX_PHONE_NUMBER_LEN));
1015 strncpy(setOption.option.voiceMailOpt.mailNumber, "11111", MAX_PHONE_NUMBER_LEN);
1017 err = msg_set_config(hMsgHandle, &setOption);
1019 if (err == MSG_SUCCESS)
1020 print("Setting Config Data is OK!");
1022 print("Setting Config Data is failed!");
1024 else if (!strcmp(menu, "B"))
1036 void MsgTestMsgSizeOpt(MSG_HANDLE_T hMsgHandle)
1038 MSG_ERROR_T err = MSG_SUCCESS;
1041 char strPrint [512];
1043 MSG_SETTING_S setOption;
1044 MSG_SETTING_S getOption;
1048 memset(&getOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MSGSIZE_OPT_S));
1050 getOption.type = MSG_MSGSIZE_OPT;
1052 err = msg_get_config(hMsgHandle, &getOption);
1056 memset(strPrint, 0x00, sizeof(strPrint));
1057 snprintf(strPrint, sizeof(strPrint), "Message Size : [%d]", getOption.option.msgSizeOpt.nMsgSize);
1060 print("======================================");
1061 print("================ Menu ================");
1062 print("[U] Update Options");
1064 print("======================================");
1068 memset(menu, 0x00, sizeof(menu));
1069 cin.getline(menu, 2);
1071 if (!strcmp(menu, "U"))
1073 memset(&setOption, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_MSGSIZE_OPT_S));
1075 setOption.type = MSG_MSGSIZE_OPT;
1077 setOption.option.msgSizeOpt.nMsgSize = 100;
1079 err = msg_set_config(hMsgHandle, &setOption);
1081 if (err == MSG_SUCCESS)
1082 print("Setting Config Data is OK!");
1084 print("Setting Config Data is failed!");
1086 else if (!strcmp(menu, "B"))