NwInfoSrv.c
42.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* NwInfoSrv.c
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Service of network infomation.
* This module provides network service availability, protocol, signal strength
* and information from protocol.
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
/****************************************************************************
* Include
****************************************************************************/
#include "NwInfoSrv.h"
#include "GSM7BitDefaultAlphabet.h" /* CovertStringForPlatform */
#include "ModeSwitchSrvGprot.h"
#include "NetworkSetupGProt.h" /* MMI_BAND_900 */
#include "NwInfoSrvGprot.h"
#include "SimCtrlSrvGprot.h"
#include "MMIDataType.h"
#include "kal_general_types.h"
#include "stack_config.h"
#include "UtilitySrvGprot.h"
#include "MMI_features.h"
#include "string.h"
#include "stack_msgs.h"
#include "mmi_frm_events_gprot.h"
#include "ps_public_enum.h"
#include "MMI_common_app_trc.h"
#include "DebugInitDef_Int.h"
#include "kal_trace.h"
#include "mmi_common_app_trc.h"
#include "mmi_cb_mgr_gprot.h"
#include "mmi_msg_struct.h"
#include "kal_public_api.h"
#include "Unicodexdcl.h"
#include "mmi_frm_mem_gprot.h"
#include "TimerEvents.h"
#include "mmi_frm_timer_gprot.h"
#include "mmi_frm_utility_gprot.h"
#if defined(__TCPIP__) && defined(__MMI_NW_INFO_DN_STATUS_ULINK_DLINK_ICONS__)
#include "CnmgrSrvGprot.h"
#endif // #if defined(__TCPIP__) && defined(__MMI_NW_INFO_DN_STATUS_ULINK_DLINK_ICONS__)
/****************************************************************************
* Global variables
****************************************************************************/
static srv_nw_info_cntx_struct g_srv_nw_info_cntx[SRV_SIM_CTRL_MAX_SIM_NUM];
/****************************************************************************
* Local functions
****************************************************************************/
#if 0
/* under construction !*/
#endif
#ifdef __MMI_GPRS_FEATURES__
static MMI_BOOL srv_nw_info_gprs_status_update_ind_hdlr(void *msg, S32 src_mod);
#endif
#ifdef __SRV_NW_INFO_CIPHER_SUPPORT__
static MMI_BOOL srv_nw_info_smu_cipher_ind_hdlr(void *msg, S32 src_mod);
#endif
#if defined(__INVALID_SIM_RECOVERY__) && defined(__MMI_EM_CTM_CTA_TDD__)
#include "mmi_rp_app_engineermode1_def.h"
static void srv_nw_info_get_conf_test_param_rsp_hdlr(void *msg);
#endif
/*****************************************************************************
* FUNCTION
* srv_nw_info_init
* DESCRIPTION
* Initialize network info service
* PARAMETERS
* evt [IN] srv_bootup_early_init_struct*
* RETURNS
* MMI_RET_OK
*****************************************************************************/
mmi_ret srv_nw_info_init(mmi_event_struct *evt)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 i;
srv_nw_info_cntx_struct *cntx;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (i = 0; i < SRV_SIM_CTRL_MAX_SIM_NUM; i++)
{
cntx = &(g_srv_nw_info_cntx[i]);
cntx->service_availability = SRV_NW_INFO_SA_NO_SERVICE;
#ifdef __SRV_NW_INFO_CIPHER_SUPPORT__
cntx->cipher_info.cs_status = SRV_NW_INFO_CIPHER_STATUS_INVALID;
cntx->cipher_info.ps_status = SRV_NW_INFO_CIPHER_STATUS_INVALID;
#endif
}
mmi_frm_set_multi_protocol_event_handler(MSG_ID_MMI_NW_ATTACH_IND, (PsIntFuncPtr)srv_nw_info_nw_attach_ind_hdlr);
mmi_frm_set_multi_protocol_event_handler(MSG_ID_MMI_NW_RX_LEVEL_IND, (PsIntFuncPtr)srv_nw_info_rx_level_ind_hdlr);
#ifdef __MMI_GPRS_FEATURES__
mmi_frm_set_multi_protocol_event_handler(MSG_ID_MMI_PS_GPRS_STATUS_UPDATE_IND, (PsIntFuncPtr)srv_nw_info_gprs_status_update_ind_hdlr);
#endif
#ifdef __SRV_NW_INFO_CIPHER_SUPPORT__
mmi_frm_set_multi_protocol_event_handler(MSG_ID_MMI_SMU_CIPHER_IND, (PsIntFuncPtr)srv_nw_info_smu_cipher_ind_hdlr);
#endif
#if defined(__INVALID_SIM_RECOVERY__) && defined(__MMI_EM_CTM_CTA_TDD__)
{
mmi_em_set_conform_test_param_req_struct *msg_set_req;
S8 value;
S16 error;
msg_set_req = OslConstructDataPtr(sizeof(mmi_em_set_conform_test_param_req_struct));
ReadValue(NVRAM_EM_IVSR, &value, DS_BYTE, &error);
mmi_frm_send_ilm(
MOD_L4C,
MSG_ID_MMI_EM_GET_CONFORM_TEST_PARAM_REQ,
NULL,
NULL);
srv_nw_info_enable_ivsr((MMI_BOOL)value);
mmi_frm_set_single_protocol_event_handler(
MSG_ID_MMI_EM_GET_CONFORM_TEST_PARAM_RSP,
(PsIntFuncPtr)srv_nw_info_get_conf_test_param_rsp_hdlr);
}
#endif /* __INVALID_SIM_RECOVERY__ && __MMI_EM_CTM_CTA_TDD__ */
return MMI_RET_OK;
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_get_cntx
* DESCRIPTION
* Get the context of the specified protocol layer of SIM.
* PARAMETERS
* sim [IN] Which protocol layer
* RETURNS
* The context.
*****************************************************************************/
srv_nw_info_cntx_struct *srv_nw_info_get_cntx(mmi_sim_enum sim)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return (&g_srv_nw_info_cntx[mmi_frm_sim_to_index(sim)]);
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_map_cell_capability
* DESCRIPTION
* Map L4 cell capability bit set to MMI bit set.
* PARAMETERS
* protocol [IN] Protocol system
* l4_bit_set [IN] Bit set from L4
* RETURN VALUES
* Capability bit set
*****************************************************************************/
srv_nw_info_capability_bit_set srv_nw_info_map_cell_capability(
mmi_network_enum protocol,
U32 l4_bit_set)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_capability_bit_set capability = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (protocol == MMI_GSM)
{
if (l4_bit_set & L4C_GPRS_SUPPORT)
{
capability |= MMI_GPRS;
}
if (l4_bit_set & L4C_EDGE_SUPPORT)
{
capability |= MMI_EDGE;
}
}
else if (protocol == MMI_WCDMA)
{
if (l4_bit_set & L4C_HSDPA_SUPPORT)
{
capability |= MMI_HSDPA;
}
if (l4_bit_set & L4C_HSUPA_SUPPORT)
{
capability |= MMI_HSUPA;
}
}
return capability;
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_map_cell_capability
* DESCRIPTION
* Map L4 channel capability enum to MMI bit set.
* PARAMETERS
* protocol [IN] Protocol system
* l4_bit_set [IN] Bit set from L4
* RETURN VALUES
* Capability bit set
*****************************************************************************/
static srv_nw_info_capability_bit_set srv_nw_info_map_channel_capability(
mmi_network_enum protocol,
l4c_data_bearer_capablility_enum l4_ch_cap)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_capability_bit_set capability = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (protocol == MMI_GSM)
{
if (l4_ch_cap == L4C_GPRS_CAPABILITY)
{
capability = MMI_GPRS;
}
else if (l4_ch_cap == L4C_EDGE_CAPABILITY)
{
capability = MMI_EDGE;
}
}
else if (protocol == MMI_WCDMA)
{
if (l4_ch_cap == L4C_HSDPA_CAPABILITY)
{
capability = MMI_HSDPA;
}
else if (l4_ch_cap == L4C_HSUPA_CAPABILITY)
{
capability = MMI_HSUPA;
}
else if (l4_ch_cap == L4C_HSDPA_HSUPA_CAPABILITY)
{
capability = (MMI_HSDPA | MMI_HSUPA);
}
}
return capability;
}
static void srv_nw_info_post_dn_status_changed(mmi_sim_enum sim, srv_nw_info_sim_dn_status_bit_set old_status, srv_nw_info_sim_dn_status_bit_set new_status)
{
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_DN_STATUS_CHANGED,
sim, old_status, new_status);
/* Emit data network status changed event */
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /*As there is no receiver, so will not be implement new*/
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_update_sim_dn_status
* DESCRIPTION
* Update the status of data network by the l4c_gprs_status_enum from L4C.
* If changed, it will emit SIM_DN_STATUS_CHANGED event.
* PARAMETERS
* cntx [IN] Context
* sim [IN] Which protocol layer
* gprs_status [IN] l4c_gprs_status_enum from L4C
* RETURN VALUES
* MMI_TRUE : Data network status changed
* MMI_FALSE : The same as before
*****************************************************************************/
MMI_BOOL srv_nw_info_update_sim_dn_status(
srv_nw_info_cntx_struct *cntx,
mmi_sim_enum sim,
l4c_gprs_status_enum gprs_status)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_sim_dn_status_bit_set old_dn_status = cntx->dn_status;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
switch (gprs_status)
{
case L4C_GPRS_COVERAGE:
cntx->dn_status |= SRV_NW_INFO_SIM_DN_STATUS_COVERAGE;
break;
case L4C_NONE_GPRS:
cntx->dn_status &=
~(SRV_NW_INFO_SIM_DN_STATUS_COVERAGE | SRV_NW_INFO_SIM_DN_STATUS_ATTACHED);
break;
case L4C_INVALID_SIM:
cntx->dn_status &=
~(SRV_NW_INFO_SIM_DN_STATUS_ATTACHED | SRV_NW_INFO_SIM_DN_STATUS_PDP_ACTIVATED);
break;
case L4C_GPRS_ATTACHED:
cntx->dn_status |=
(SRV_NW_INFO_SIM_DN_STATUS_COVERAGE | SRV_NW_INFO_SIM_DN_STATUS_ATTACHED);
break;
case L4C_GPRS_DETACHED:
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_ATTACHED);
break;
case L4C_PDP_ACTIVED:
cntx->dn_status |= SRV_NW_INFO_SIM_DN_STATUS_PDP_ACTIVATED;
break;
case L4C_PDP_DEACTIVED:
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_PDP_ACTIVATED);
break;
default:
/* Ignore */
break;
}
if (old_dn_status != cntx->dn_status)
{
srv_nw_info_post_dn_status_changed(sim, old_dn_status, cntx->dn_status);
return MMI_TRUE;
}
return MMI_FALSE;
}
#ifdef __MMI_GPRS_FEATURES__
/*****************************************************************************
* FUNCTION
* srv_nw_info_gprs_status_update_ind_hdlr
* DESCRIPTION
* Handler of PS_GPRS_STATUS_UPDATE_IND.
* Update the capability and the status of data network.
* PARAMETERS
* sim [IN] From which layer
* msg [IN] mmi_ps_gprs_status_update_ind_struct*
* RETURNS
* MMI_FALSE; continue message routing
*****************************************************************************/
static MMI_BOOL srv_nw_info_gprs_status_update_ind_hdlr(void *msg, S32 src_mod)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_sim_enum sim;
srv_nw_info_cntx_struct *cntx;
mmi_ps_gprs_status_update_ind_struct *update_ind;
srv_nw_info_status_changed_evt_struct changed_evt;
srv_nw_info_capability_bit_set old_cell_cap;
srv_nw_info_capability_bit_set old_channel_cap;
MMI_BOOL dn_status_changed;
MMI_BOOL capability_changed;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
sim = mmi_frm_l4c_mod_to_sim((module_type)src_mod);
cntx = srv_nw_info_get_cntx(sim);
update_ind = (mmi_ps_gprs_status_update_ind_struct*)msg;
dn_status_changed = srv_nw_info_update_sim_dn_status(cntx, sim, (l4c_gprs_status_enum)update_ind->status);
capability_changed = MMI_FALSE;
old_cell_cap = cntx->cell_capability;
old_channel_cap = cntx->channel_capability;
cntx->cell_capability = srv_nw_info_map_cell_capability(cntx->protocol, update_ind->data_speed_support);
if (cntx->dn_status & SRV_NW_INFO_SIM_DN_STATUS_ATTACHED)
{
if (cntx->protocol == MMI_GSM)
{
cntx->channel_capability = cntx->cell_capability;
}
else
{
cntx->channel_capability = srv_nw_info_map_channel_capability(
cntx->protocol,
(l4c_data_bearer_capablility_enum)update_ind->data_bearer_capability);
}
}
else
{
cntx->channel_capability = 0;
}
if (old_cell_cap != cntx->cell_capability ||
old_channel_cap != cntx->channel_capability)
{
srv_nw_info_protocol_capability_changed_evt_struct protocol_evt;
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_PROT_CAP_CHANGED,
sim, cntx->protocol, old_cell_cap, old_channel_cap,
cntx->protocol, cntx->cell_capability, cntx->channel_capability);
MMI_FRM_INIT_EVENT(&protocol_evt, EVT_ID_SRV_NW_INFO_PROTOCOL_CAPABILITY_CHANGED);
protocol_evt.sim = sim;
protocol_evt.old_protocol = cntx->protocol;
protocol_evt.old_cell_cap = old_cell_cap;
protocol_evt.old_channel_cap = old_channel_cap;
protocol_evt.new_protocol = cntx->protocol;
protocol_evt.new_cell_cap = cntx->cell_capability;
protocol_evt.new_channel_cap = cntx->channel_capability;
MMI_FRM_CB_EMIT_POST_EVENT(&protocol_evt);
capability_changed = MMI_TRUE;
}
MMI_FRM_INIT_EVENT(&changed_evt, EVT_ID_SRV_NW_INFO_STATUS_CHANGED);
changed_evt.sim = sim;
changed_evt.service_availability_changed = MMI_FALSE;
changed_evt.location_changed = MMI_FALSE;
changed_evt.dn_status_changed = dn_status_changed;
changed_evt.protocol_changed = MMI_FALSE;
changed_evt.capability_changed = capability_changed;
if (changed_evt.dn_status_changed ||
changed_evt.capability_changed)
{
MMI_FRM_CB_EMIT_POST_EVENT(&changed_evt);
}
return MMI_FALSE;
}
#endif /* __MMI_GPRS_FEATURES__ */
/*****************************************************************************
* FUNCTION
* srv_nw_info_is_enabled
* DESCRIPTION
* Query whether the network of the SIM is enabled or not.
* PARAMETERS
* sim [IN] Which protocol layer of SIM
* RETURNS
* MMI_TRUE if the network is enabled by settings
*****************************************************************************/
MMI_BOOL srv_nw_info_is_enabled(mmi_sim_enum sim)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_mode_switch_type_enum mode = srv_mode_switch_get_current_mode();
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* If it is flight mode, return false */
if (mode == SRV_MODE_SWITCH_ALL_OFF)
{
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_IS_ENABLED, sim, 0, 10);
return MMI_FALSE;
}
#if (MMI_MAX_SIM_NUM >= 2)
/* If the SIM is not turned on, return false */
if ((sim & mode) == 0)
{
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_IS_ENABLED, sim, 0, 30);
return MMI_FALSE;
}
#endif
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_IS_ENABLED, sim, 1, 99);
return MMI_TRUE;
}
void srv_nw_info_post_roaming_changed(mmi_sim_enum sim, MMI_BOOL is_roaming_now)
{
srv_nw_info_roaming_status_changed_evt_struct roaming_evt;
MMI_FRM_INIT_EVENT(&roaming_evt, EVT_ID_SRV_NW_INFO_ROAMING_STATUS_CHANGED);
roaming_evt.sim = sim;
roaming_evt.is_roaming_now = is_roaming_now;
MMI_FRM_CB_EMIT_POST_EVENT(&roaming_evt);
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_set_enabled
* DESCRIPTION
* Notify the enabled property to change status and emit events.
* PARAMETERS
* sim [IN] Which protocol layer of SIM
* RETURNS
* void
*****************************************************************************/
static void srv_nw_info_set_enabled(mmi_sim_enum sim, MMI_BOOL enabled)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cntx_struct *cntx;
srv_nw_info_service_availability_enum old_service_availability;
srv_nw_info_sim_dn_status_bit_set old_dn_status;
mmi_network_enum old_protocol;
srv_nw_info_capability_bit_set old_cell_cap;
srv_nw_info_capability_bit_set old_channel_cap;
MMI_BOOL old_is_roaming;
srv_nw_info_status_changed_evt_struct changed_evt;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (enabled)
{
/* Will update by new indications */
return;
}
cntx = srv_nw_info_get_cntx(sim);
MMI_FRM_INIT_EVENT(&changed_evt, EVT_ID_SRV_NW_INFO_STATUS_CHANGED);
changed_evt.sim = sim;
/* Service availability */
old_service_availability = cntx->service_availability;
cntx->service_availability = SRV_NW_INFO_SA_NO_SERVICE;
if (old_service_availability != cntx->service_availability)
{
srv_nw_info_service_availability_changed_evt_struct avai_evt;
MMI_FRM_INIT_EVENT(&avai_evt, EVT_ID_SRV_NW_INFO_SERVICE_AVAILABILITY_CHANGED);
avai_evt.sim = sim;
avai_evt.old_status = old_service_availability;
avai_evt.new_status = cntx->service_availability;
MMI_FRM_CB_EMIT_POST_EVENT(&avai_evt);
changed_evt.service_availability_changed = MMI_TRUE;
}
else
{
changed_evt.service_availability_changed = MMI_FALSE;
}
/* Protocol / capability */
old_protocol = cntx->protocol;
old_cell_cap = cntx->cell_capability;
old_channel_cap = cntx->channel_capability;
cntx->protocol = MMI_NETWORK_NONE;
cntx->cell_capability = MMI_NETWORK_CAPABILITY_NONE;
cntx->channel_capability = MMI_NETWORK_CAPABILITY_NONE;
if (old_protocol != cntx->protocol ||
old_cell_cap != cntx->cell_capability ||
old_channel_cap != cntx->channel_capability)
{
srv_nw_info_protocol_capability_changed_evt_struct prot_capa_evt;
MMI_FRM_INIT_EVENT(&prot_capa_evt, EVT_ID_SRV_NW_INFO_PROTOCOL_CAPABILITY_CHANGED);
prot_capa_evt.sim = sim;
prot_capa_evt.old_protocol = old_protocol;
prot_capa_evt.old_cell_cap = old_cell_cap;
prot_capa_evt.old_channel_cap = old_channel_cap;
prot_capa_evt.new_protocol = cntx->protocol;
prot_capa_evt.new_cell_cap = cntx->cell_capability;
prot_capa_evt.new_channel_cap = cntx->channel_capability;
MMI_FRM_CB_EMIT_POST_EVENT(&prot_capa_evt);
changed_evt.protocol_changed = (old_protocol != cntx->protocol)? MMI_TRUE : MMI_FALSE;
changed_evt.capability_changed =
(old_cell_cap != cntx->cell_capability || old_channel_cap != cntx->channel_capability)? MMI_TRUE : MMI_FALSE;
}
else
{
changed_evt.protocol_changed = MMI_FALSE;
changed_evt.capability_changed = MMI_FALSE;
}
/* Data network status */
old_dn_status = cntx->dn_status;
cntx->dn_status = SRV_NW_INFO_SIM_DN_STATUS_NONE;
if (old_dn_status != cntx->dn_status)
{
srv_nw_info_post_dn_status_changed(sim, old_dn_status, cntx->dn_status);
changed_evt.dn_status_changed = MMI_TRUE;
}
else
{
changed_evt.dn_status_changed = MMI_FALSE;
}
/* Roaming */
old_is_roaming = cntx->is_roaming;
cntx->is_roaming = MMI_FALSE;
if (old_is_roaming != cntx->is_roaming)
{
srv_nw_info_post_roaming_changed(sim, cntx->is_roaming);
}
changed_evt.location_changed = MMI_FALSE;
/* Status changed event */
if (changed_evt.service_availability_changed ||
changed_evt.protocol_changed ||
changed_evt.capability_changed ||
changed_evt.dn_status_changed)
{
MMI_FRM_CB_EMIT_POST_EVENT(&changed_evt);
}
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_notify_mode_changed
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
mmi_ret srv_nw_info_notify_mode_changed(mmi_event_struct *evt)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_NOTIFY_MODE_CHANGED);
for (i = 0; i < SRV_SIM_CTRL_MAX_SIM_NUM; i++)
{
mmi_sim_enum sim = mmi_frm_index_to_sim(i);
srv_nw_info_set_enabled(sim, srv_nw_info_is_enabled(sim));
}
return MMI_RET_OK;
}
/*****************************************************************************
* Please refer to NwInfoSrvGprot.h
*****************************************************************************/
srv_nw_info_sim_dn_status_bit_set srv_nw_info_get_sim_dn_status(mmi_sim_enum sim)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cntx_struct *cntx = srv_nw_info_get_cntx(sim);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return (cntx->dn_status);
}
#ifdef __SRV_NW_INFO_CIPHER_SUPPORT__
/*****************************************************************************
* FUNCTION
* srv_nw_info_convert_to_cipher_status
* DESCRIPTION
* Convert native cipher status to service interface.
* PARAMETERS
* native_value [IN] Native value
* RETURNS
* srv_nw_info_cipher_status_enum
*****************************************************************************/
static srv_nw_info_cipher_status_enum srv_nw_info_convert_to_cipher_status(kal_uint8 native_value)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cipher_status_enum status;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
status = SRV_NW_INFO_CIPHER_STATUS_INVALID;
switch (native_value)
{
case GMMREG_CIPHER_OFF:
status = SRV_NW_INFO_CIPHER_STATUS_OFF;
break;
case GMMREG_CIPHER_ON:
status = SRV_NW_INFO_CIPHER_STATUS_ON;
break;
case GMMREG_CIPHER_INVALID:
default:
status = SRV_NW_INFO_CIPHER_STATUS_INVALID;
break;
}
return status;
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_smu_cipher_ind_hdlr
* DESCRIPTION
* Handler of SMU_CIPHER_IND.
* Update the cipher information of network.
* PARAMETERS
* sim [IN] From which layer
* msg [IN] mmi_smu_cipher_ind_struct*
* RETURNS
* MMI_FALSE; continue message routing
*****************************************************************************/
static MMI_BOOL srv_nw_info_smu_cipher_ind_hdlr(void *msg, S32 src_mod)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_sim_enum sim;
srv_nw_info_cntx_struct *cntx;
mmi_smu_cipher_ind_struct *cipher_ind;
srv_nw_info_cipher_info_struct old_cipher_status;
srv_nw_info_cipher_status_changed_evt_struct cipher_evt;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
sim = mmi_frm_l4c_mod_to_sim((module_type)src_mod);
cntx = srv_nw_info_get_cntx(sim);
cipher_ind = (mmi_smu_cipher_ind_struct*)msg;
old_cipher_status = cntx->cipher_info;
cntx->cipher_info.is_supported_by_network =
(cipher_ind->cipher_ind ? MMI_TRUE : MMI_FALSE);
cntx->cipher_info.cs_connection_exists =
(cipher_ind->is_gsm_conn_exist ? MMI_TRUE : MMI_FALSE);
cntx->cipher_info.cs_status =
srv_nw_info_convert_to_cipher_status(cipher_ind->gsm_cipher_cond);
cntx->cipher_info.ps_status =
srv_nw_info_convert_to_cipher_status(cipher_ind->gprs_cipher_cond);
if (memcmp(&old_cipher_status, &(cntx->cipher_info), sizeof(srv_nw_info_cipher_info_struct)) != 0)
{
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_CIPHER_CHANGED,
sim, cntx->cipher_info.is_supported_by_network, cntx->cipher_info.cs_connection_exists,
cntx->cipher_info.cs_status, cntx->cipher_info.ps_status);
MMI_FRM_INIT_EVENT(&cipher_evt, EVT_ID_SRV_NW_INFO_CIPHER_STATUS_CHANGED);
cipher_evt.sim = sim;
cipher_evt.status = cntx->cipher_info;
MMI_FRM_CB_EMIT_POST_EVENT(&cipher_evt);
}
return MMI_FALSE;
}
/*****************************************************************************
* Please refer to SimCtrlSrvGprot.h
*****************************************************************************/
MMI_BOOL srv_nw_info_get_cipher_info(mmi_sim_enum sim, srv_nw_info_cipher_info_struct *out_info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cntx_struct *cntx;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cntx = srv_nw_info_get_cntx(sim);
MMI_ASSERT(out_info != NULL);
*out_info = cntx->cipher_info;
return MMI_TRUE;
}
#endif /* __SRV_NW_INFO_CIPHER_SUPPORT__ */
#ifdef __HOMEZONE_SUPPORT__
/*****************************************************************************
* FUNCTION
* srv_nw_info_get_gsm7bit_upper_bound
* DESCRIPTION
* Get the valid data length(index bound) of a GSM 7-bit string.
* PARAMETERS
* gsm7bit_str [IN] GSM 7-bit data array
* max_upper_bound [IN] Maximum data upper index
* RETURNS
* Upper index bound
*****************************************************************************/
static S32 srv_nw_info_get_gsm7bit_upper_bound(const U8 *gsm7bit_str, S32 max_upper_bound)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (i = 0; i < max_upper_bound; i++)
{
if (gsm7bit_str[i] == 0xff)
{
return i;
}
}
return max_upper_bound;
}
/*****************************************************************************
* FUNCTION
* srv_nw_info_hz_tag_ind_hdlr
* DESCRIPTION
* Handler of HZ_TAG_IND.
* Update the homezone information of network.
* PARAMETERS
* sim [IN] From which layer
* msg [IN] mmi_hz_tag_ind_struct*
* RETURNS
* MMI_FALSE; continue message routing
*****************************************************************************/
static MMI_BOOL srv_nw_info_hz_tag_ind_hdlr(mmi_sim_enum sim, void *msg)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cntx_struct *cntx;
mmi_hz_tag_ind_struct *hz_tag_ind;
srv_nw_info_homezone_info_struct old_homezone_info;
srv_nw_info_homezone_status_changed_evt_struct homezone_evt;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cntx = srv_nw_info_get_cntx(sim);
hz_tag_ind = (mmi_hz_tag_ind_struct*)msg;
memcpy(&old_homezone_info, &(cntx->homezone_info), sizeof(srv_nw_info_homezone_info_struct));
cntx->homezone_info.is_in_homezone =
(hz_tag_ind->is_hz ? MMI_TRUE : MMI_FALSE);
if (hz_tag_ind->is_hz && hz_tag_ind->action)
{
U8 *converted_ucs2_string;
U16 out_len;
converted_ucs2_string =
CovertStringForPlatform(
hz_tag_ind->tag,
(U16)srv_nw_info_get_gsm7bit_upper_bound(hz_tag_ind->tag, sizeof(hz_tag_ind->tag)),
MMI_DEFAULT_DCS,
&out_len);
mmi_wcsncpy(
cntx->homezone_info.tag,
converted_ucs2_string,
SRV_NW_INFO_MAX_HOMEZONE_TAG_LEN);
OslMfree(converted_ucs2_string);
}
else
{
cntx->homezone_info.tag[0] = L'\0';
}
if (hz_tag_ind->action ||
memcmp(&old_homezone_info, &(cntx->homezone_info), sizeof(srv_nw_info_homezone_info_struct)) != 0)
{
MMI_TRACE(SRV_NW_INFO_TRC_GROUP, TRC_SRV_NW_INFO_HOMEZONE_CHANGED,
sim, hz_tag_ind->action, cntx->homezone_info.is_in_homezone);
MMI_FRM_INIT_EVENT(&homezone_evt, EVT_ID_SRV_NW_INFO_HOMEZONE_STATUS_CHANGED);
homezone_evt.sim = sim;
homezone_evt.notify_user = hz_tag_ind->action ? MMI_TRUE : MMI_FALSE;
memcpy(&(homezone_evt.info), &(cntx->homezone_info), sizeof(srv_nw_info_homezone_info_struct));
MMI_FRM_CB_EMIT_POST_EVENT(&homezone_evt);
}
return MMI_FALSE;
}
/*****************************************************************************
* Please refer to NwInfoSrvGprot.h
*****************************************************************************/
MMI_BOOL srv_nw_info_get_homezone_info(
mmi_sim_enum sim,
srv_nw_info_homezone_info_struct *out_info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_nw_info_cntx_struct *cntx = srv_nw_info_get_cntx(sim);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (out_info != NULL)
{
memcpy(out_info, &(cntx->homezone_info), sizeof(srv_nw_info_homezone_info_struct));
}
return (cntx->homezone_info.is_in_homezone);
}
#endif /* __HOMEZONE_SUPPORT__ */
#ifdef __INVALID_SIM_RECOVERY__
/*****************************************************************************
* Please refer to NwInfoSrvGprot.h
*****************************************************************************/
void srv_nw_info_enable_ivsr(MMI_BOOL enable_flag)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (i = 0; i < MMI_MAX_SIM_NUM; i++)
{
g_srv_nw_info_cntx[i].ivsr_info.enable_ivsr = enable_flag;
}
}
#ifdef __MMI_EM_CTM_CTA_TDD__
void srv_nw_info_get_conf_test_param_rsp_hdlr(void *msg)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_em_get_conform_test_param_rsp_struct *param =
(mmi_em_get_conform_test_param_rsp_struct*)msg;
S32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (param->conf_test_mode != PS_CONF_TEST_CTA &&
param->conf_test_mode != PS_CONF_TEST_FTA &&
param->conf_test_mode != PS_CONF_TEST_IOT)
{
for (i = 0; i < MMI_MAX_SIM_NUM; i++)
{
g_srv_nw_info_cntx[i].ivsr_info.is_in_test_mode = MMI_FALSE;
}
}
else
{
for (i = 0; i < MMI_MAX_SIM_NUM; i++)
{
g_srv_nw_info_cntx[i].ivsr_info.is_in_test_mode = MMI_TRUE;
}
}
// EM will reg this msg
mmi_frm_clear_protocol_event_handler(
MSG_ID_MMI_EM_GET_CONFORM_TEST_PARAM_RSP,
srv_nw_info_get_conf_test_param_rsp_hdlr);
}
#endif /* __MMI_EM_CTM_CTA_TDD__ */
#endif /* __INVALID_SIM_RECOVERY__ */
#if defined(__TCPIP__) && defined(__MMI_NW_INFO_DN_STATUS_ULINK_DLINK_ICONS__)
mmi_ret srv_nw_info_cnmgr_notify_nwinfo_hdlr(mmi_event_struct *evt)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_sim_enum sim;
srv_nw_info_cntx_struct *cntx;
srv_cnmgr_notify_nwinfo_evt_struct *nwinfo;
srv_nw_info_status_changed_evt_struct changed_evt;
srv_nw_info_sim_dn_status_bit_set old_dn_status;
U32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
nwinfo = (srv_cnmgr_notify_nwinfo_evt_struct*)evt;
for (i = 0; i < MMI_MAX_SIM_NUM; i++)
{
sim = mmi_frm_index_to_sim(i);
cntx = srv_nw_info_get_cntx(sim);
old_dn_status = cntx->dn_status;
MMI_TRACE(
SRV_NW_INFO_TRC_GROUP,
TRC_SRV_NW_INFO_CNMGR_NOTIFY_NWINFO_HDLR,
sim,
old_dn_status,
nwinfo->flag[i].uplink,
nwinfo->flag[i].downlink);
if (cntx->dn_status & SRV_NW_INFO_SIM_DN_STATUS_ATTACHED ||
cntx->dn_status & SRV_NW_INFO_SIM_DN_STATUS_PDP_ACTIVATED)
{
if (nwinfo->flag[i].uplink == MMI_TRUE)
{
cntx->dn_status |= SRV_NW_INFO_SIM_DN_STATUS_UPLINK;
}
else
{
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_UPLINK);
}
if (nwinfo->flag[i].downlink == MMI_TRUE)
{
cntx->dn_status |= SRV_NW_INFO_SIM_DN_STATUS_DOWNLINK;
}
else
{
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_DOWNLINK);
}
}
else
{
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_UPLINK);
cntx->dn_status &= ~(SRV_NW_INFO_SIM_DN_STATUS_DOWNLINK);
}
if (old_dn_status != cntx->dn_status)
{
MMI_FRM_INIT_EVENT(&changed_evt, EVT_ID_SRV_NW_INFO_STATUS_CHANGED);
changed_evt.sim = sim;
changed_evt.service_availability_changed = MMI_FALSE;
changed_evt.location_changed = MMI_FALSE;
changed_evt.dn_status_changed = MMI_TRUE;
changed_evt.protocol_changed = MMI_FALSE;
changed_evt.capability_changed = MMI_FALSE;
MMI_FRM_CB_EMIT_POST_EVENT(&changed_evt);
}
}
return MMI_RET_OK;
}
#endif // #if defined(__TCPIP__) && defined(__MMI_NW_INFO_DN_STATUS_ULINK_DLINK_ICONS__)