Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Tapi / Tizen.Tapi / SimData.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System.Collections.Generic;
18
19 namespace Tizen.Tapi
20 {
21     /// <summary>
22     /// A class which defines SIM card initialization information.
23     /// </summary>
24     public class SimInitInfo
25     {
26         internal SimCardStatus SimStatus;
27         internal bool IsChanged;
28         internal SimInitInfo()
29         {
30         }
31
32         /// <summary>
33         /// The SIM initialization status from the Telephony server boot up time.
34         /// </summary>
35         public SimCardStatus Status
36         {
37             get
38             {
39                 return SimStatus;
40             }
41         }
42
43         /// <summary>
44         /// The SIM card identification value. It will be true when the current inserted SIM card differs from the previous SIM. False otherwise.
45         /// </summary>
46         public bool IsCardChanged
47         {
48             get
49             {
50                 return IsChanged;
51             }
52         }
53     }
54
55     /// <summary>
56     /// A class which defines data for IMSI information.
57     /// </summary>
58     public class SimImsiInfo
59     {
60         internal string CountryCode;
61         internal string NetworkCode;
62         internal string StationId;
63         internal SimImsiInfo()
64         {
65         }
66
67         /// <summary>
68         /// Mobile Country Code.
69         /// </summary>
70         public string Mcc
71         {
72             get
73             {
74                 return CountryCode;
75             }
76         }
77
78         /// <summary>
79         /// Mobile Network Code.
80         /// </summary>
81         public string Mnc
82         {
83             get
84             {
85                 return NetworkCode;
86             }
87         }
88
89         /// <summary>
90         /// Mobile Station Identification Number.
91         /// </summary>
92         public string Msin
93         {
94             get
95             {
96                 return StationId;
97             }
98         }
99     }
100
101     /// <summary>
102     /// A class which defines data for ECC information of GSM/USIM/CDMA SIM.
103     /// </summary>
104     public class SimEccInfo
105     {
106         internal string NameInfo;
107         internal string NumberInfo;
108         internal SimEccEmergencyServiceType TypeInfo;
109         internal SimEccInfo()
110         {
111         }
112
113         /// <summary>
114         /// Name. Applicable only for USIM(3G) SIM.
115         /// </summary>
116         public string Name
117         {
118             get
119             {
120                 return NameInfo;
121             }
122         }
123
124         /// <summary>
125         /// Number.
126         /// </summary>
127         public string Number
128         {
129             get
130             {
131                 return NumberInfo;
132             }
133         }
134
135         /// <summary>
136         /// Emergency service type. Applicable only for USIM(3G) SIM.
137         /// </summary>
138         public SimEccEmergencyServiceType Category
139         {
140             get
141             {
142                 return TypeInfo;
143             }
144         }
145     }
146
147     /// <summary>
148     /// A class which defines ECC information list.
149     /// </summary>
150     public class SimEccInfoList
151     {
152         internal int EccCount;
153         internal IEnumerable<SimEccInfo> List;
154         internal SimEccInfoList()
155         {
156         }
157
158         /// <summary>
159         /// ECC count.
160         /// </summary>
161         public int Count
162         {
163             get
164             {
165                 return EccCount;
166             }
167         }
168
169         /// <summary>
170         /// List of ECC.
171         /// </summary>
172         public IEnumerable<SimEccInfo> EccList
173         {
174             get
175             {
176                 return List;
177             }
178         }
179     }
180
181     /// <summary>
182     /// A class which defines ICCID(Integrated Circuit Card Identifier).
183     /// </summary>
184     public class SimIccIdInfo
185     {
186         internal int Length;
187         internal string Number;
188         internal SimIccIdInfo()
189         {
190         }
191
192         /// <summary>
193         /// Integrated Circuit Card number length.
194         /// </summary>
195         public int IccLength
196         {
197             get
198             {
199                 return Length;
200             }
201         }
202
203         /// <summary>
204         /// Integrated Circuit Card number.
205         /// </summary>
206         public string IccNumber
207         {
208             get
209             {
210                 return Number;
211             }
212         }
213     }
214
215     /// <summary>
216     /// A class which defines call forwarding indication status data.
217     /// </summary>
218     public class SimCfis
219     {
220         private int _recIndex;
221         private byte _mspNum;
222         private byte _cfuStatus;
223         private SimTypeOfNumber _ton;
224         private SimNumberPlanIdentity _npi;
225         private string _cfuNum;
226         private byte _cc2Id;
227         private byte _ext7Id;
228
229         /// <summary>
230         /// Record index.
231         /// </summary>
232         public int RecIndex
233         {
234             get
235             {
236                 return _recIndex;
237             }
238
239             set
240             {
241                 _recIndex = value;
242             }
243         }
244
245         /// <summary>
246         /// MSP number.
247         /// </summary>
248         public byte MspNum
249         {
250             get
251             {
252                 return _mspNum;
253             }
254
255             set
256             {
257                 _mspNum = value;
258             }
259         }
260
261         /// <summary>
262         /// Call forwarding unconditional indication status.
263         /// </summary>
264         public byte CfuStatus
265         {
266             get
267             {
268                 return _cfuStatus;
269             }
270
271             set
272             {
273                 _cfuStatus = value;
274             }
275         }
276
277         /// <summary>
278         /// SIM Type of number.
279         /// </summary>
280         public SimTypeOfNumber Ton
281         {
282             get
283             {
284                 return _ton;
285             }
286
287             set
288             {
289                 _ton = value;
290             }
291         }
292
293         /// <summary>
294         /// SIM numbering plan identity.
295         /// </summary>
296         public SimNumberPlanIdentity Npi
297         {
298             get
299             {
300                 return _npi;
301             }
302
303             set
304             {
305                 _npi = value;
306             }
307         }
308
309         /// <summary>
310         /// Dialing Number/SSC String.
311         /// </summary>
312         public string CfuNum
313         {
314             get
315             {
316                 return _cfuNum;
317             }
318
319             set
320             {
321                 _cfuNum = value;
322             }
323         }
324
325         /// <summary>
326         /// Capability/Configuration 2 Record Identifier.
327         /// </summary>
328         public byte Cc2Id
329         {
330             get
331             {
332                 return _cc2Id;
333             }
334
335             set
336             {
337                 _cc2Id = value;
338             }
339         }
340
341         /// <summary>
342         /// Extension 7 Record Identifier.
343         /// </summary>
344         public byte Ext7Id
345         {
346             get
347             {
348                 return _ext7Id;
349             }
350
351             set
352             {
353                 _ext7Id = value;
354             }
355         }
356     }
357
358     /// <summary>
359     /// A class which defines call forwarding indication status list.
360     /// </summary>
361     public class SimCfisList
362     {
363         internal int Count;
364         internal IEnumerable<SimCfis> List;
365         internal SimCfisList()
366         {
367         }
368
369         /// <summary>
370         /// Profile count.
371         /// </summary>
372         public int ProfileCount
373         {
374             get
375             {
376                 return Count;
377             }
378         }
379
380         /// <summary>
381         /// List of CFIS.
382         /// </summary>
383         public IEnumerable<SimCfis> CfisList
384         {
385             get
386             {
387                 return List;
388             }
389         }
390     }
391
392     /// <summary>
393     /// A class which defines CPHS call forwarding status data.
394     /// </summary>
395     public class SimCphsCf
396     {
397         private int _line1;
398         private int _line2;
399         private int _fax;
400         private int _data;
401
402         /// <summary>
403         /// CallForwardUnconditionalLine 1.
404         /// </summary>
405         public int Line1
406         {
407             get
408             {
409                 return _line1;
410             }
411
412             set
413             {
414                 _line1 = value;
415             }
416         }
417
418         /// <summary>
419         /// CallForwardUnconditionalLine 2.
420         /// </summary>
421         public int Line2
422         {
423             get
424             {
425                 return _line2;
426             }
427
428             set
429             {
430                 _line2 = value;
431             }
432         }
433
434         /// <summary>
435         /// CallForwardUnconditional Fax.
436         /// </summary>
437         public int Fax
438         {
439             get
440             {
441                 return _fax;
442             }
443
444             set
445             {
446                 _fax = value;
447             }
448         }
449
450         /// <summary>
451         /// CallForwardUnconditional data.
452         /// </summary>
453         public int Data
454         {
455             get
456             {
457                 return _data;
458             }
459
460             set
461             {
462                 _data = value;
463             }
464         }
465     }
466
467     /// <summary>
468     /// A class which defines call forwarding response.
469     /// </summary>
470     public class SimCallForwardResponse
471     {
472         internal bool IsCphsCf;
473         internal SimCfisList List;
474         internal SimCphsCf CphsCfInfo;
475         internal SimCallForwardResponse()
476         {
477         }
478
479         /// <summary>
480         /// CPHS or not.
481         /// </summary>
482         public bool IsCphs
483         {
484             get
485             {
486                 return IsCphsCf;
487             }
488         }
489
490         /// <summary>
491         /// List of CFIS.
492         /// </summary>
493         public SimCfisList CfList
494         {
495             get
496             {
497                 return List;
498             }
499         }
500
501         /// <summary>
502         /// CPHS CF.
503         /// </summary>
504         public SimCphsCf CphsCf
505         {
506             get
507             {
508                 return CphsCfInfo;
509             }
510         }
511     }
512
513     /// <summary>
514     /// A class which defines call forwarding request.
515     /// </summary>
516     public class SimCallForwardRequest
517     {
518         private bool _isCphs;
519         private SimCfis _cfis;
520         private SimCphsCf _cphsCf;
521
522         /// <summary>
523         /// CPHS or not.
524         /// </summary>
525         public bool IsCphs
526         {
527             get
528             {
529                 return _isCphs;
530             }
531
532             set
533             {
534                 _isCphs = value;
535             }
536         }
537
538         /// <summary>
539         /// CFIS.
540         /// </summary>
541         /// <remarks>
542         /// This should be filled only if IsCphs is false.
543         /// </remarks>
544         public SimCfis Cfis
545         {
546             get
547             {
548                 return _cfis;
549             }
550
551             set
552             {
553                 _cfis = value;
554             }
555         }
556
557         /// <summary>
558         /// CPHS CF.
559         /// </summary>
560         /// <remarks>
561         /// This should be filled only if IsCphs is true.
562         /// </remarks>
563         public SimCphsCf CphsCf
564         {
565             get
566             {
567                 return _cphsCf;
568             }
569
570             set
571             {
572                 _cphsCf = value;
573             }
574         }
575     }
576
577     /// <summary>
578     /// A class which defines message waiting indication status data.
579     /// </summary>
580     public class SimMwis
581     {
582         private int _recIndex;
583         private byte _indicatorStatus;
584         private int _voiceCount;
585         private int _faxCount;
586         private int _emailCount;
587         private int _otherCount;
588         private int _videoCount;
589
590         /// <summary>
591         /// Record index.
592         /// </summary>
593         public int RecIndex
594         {
595             get
596             {
597                 return _recIndex;
598             }
599
600             set
601             {
602                 _recIndex = value;
603             }
604         }
605
606         /// <summary>
607         /// Indicator type.
608         /// </summary>
609         public byte IndicatorStatus
610         {
611             get
612             {
613                 return _indicatorStatus;
614             }
615
616             set
617             {
618                 _indicatorStatus = value;
619             }
620         }
621
622         /// <summary>
623         /// VoiceMail count.
624         /// </summary>
625         public int VoiceCount
626         {
627             get
628             {
629                 return _voiceCount;
630             }
631
632             set
633             {
634                 _voiceCount = value;
635             }
636         }
637
638         /// <summary>
639         /// Fax count.
640         /// </summary>
641         public int FaxCount
642         {
643             get
644             {
645                 return _faxCount;
646             }
647
648             set
649             {
650                 _faxCount = value;
651             }
652         }
653
654         /// <summary>
655         /// Email count.
656         /// </summary>
657         public int EmailCount
658         {
659             get
660             {
661                 return _emailCount;
662             }
663
664             set
665             {
666                 _emailCount = value;
667             }
668         }
669
670         /// <summary>
671         /// Other count.
672         /// </summary>
673         public int OtherCount
674         {
675             get
676             {
677                 return _otherCount;
678             }
679
680             set
681             {
682                 _otherCount = value;
683             }
684         }
685
686         /// <summary>
687         /// VideoMail count.
688         /// </summary>
689         public int VideoCount
690         {
691             get
692             {
693                 return _videoCount;
694             }
695
696             set
697             {
698                 _videoCount = value;
699             }
700         }
701     }
702
703     /// <summary>
704     /// A class which defines message waiting indication status list.
705     /// </summary>
706     public class SimMwisList
707     {
708         internal int Count;
709         internal IEnumerable<SimMwis> List;
710         internal SimMwisList()
711         {
712         }
713
714         /// <summary>
715         /// Profile count.
716         /// </summary>
717         public int ProfileCount
718         {
719             get
720             {
721                 return Count;
722             }
723         }
724
725         /// <summary>
726         /// List of MWIS.
727         /// </summary>
728         public IEnumerable<SimMwis> MwList
729         {
730             get
731             {
732                 return List;
733             }
734         }
735     }
736
737     /// <summary>
738     /// A class which defines CPHS message waiting status data.
739     /// </summary>
740     public class SimCphsMw
741     {
742         private bool _isVoice1;
743         private bool _isVoice2;
744         private bool _isFax;
745         private bool _isData;
746
747         /// <summary>
748         /// VoiceMsgLine1 message waiting flag.
749         /// </summary>
750         public bool IsVoice1
751         {
752             get
753             {
754                 return _isVoice1;
755             }
756
757             set
758             {
759                 _isVoice1 = value;
760             }
761         }
762
763         /// <summary>
764         /// VoiceMsgLine2 message waiting flag.
765         /// </summary>
766         public bool IsVoice2
767         {
768             get
769             {
770                 return _isVoice2;
771             }
772
773             set
774             {
775                 _isVoice2 = value;
776             }
777         }
778
779         /// <summary>
780         /// FAX message waiting flag.
781         /// </summary>
782         public bool IsFax
783         {
784             get
785             {
786                 return _isFax;
787             }
788
789             set
790             {
791                 _isFax = value;
792             }
793         }
794
795         /// <summary>
796         /// Data message waiting flag.
797         /// </summary>
798         public bool IsData
799         {
800             get
801             {
802                 return _isData;
803             }
804
805             set
806             {
807                 _isData = value;
808             }
809         }
810     }
811
812     /// <summary>
813     /// A class which defines message waiting reponse.
814     /// </summary>
815     public class SimMessageWaitingResponse
816     {
817         internal bool IsCphsMw;
818         internal SimMwisList List;
819         internal SimCphsMw CphsMwInfo;
820         internal SimMessageWaitingResponse()
821         {
822         }
823
824         /// <summary>
825         /// CPHS or not.
826         /// </summary>
827         public bool IsCphs
828         {
829             get
830             {
831                 return IsCphsMw;
832             }
833         }
834
835         /// <summary>
836         /// List of MWIS.
837         /// </summary>
838         public SimMwisList MwList
839         {
840             get
841             {
842                 return List;
843             }
844         }
845
846         /// <summary>
847         /// CPHS MW.
848         /// </summary>
849         public SimCphsMw CphsMw
850         {
851             get
852             {
853                 return CphsMwInfo;
854             }
855         }
856     }
857
858     /// <summary>
859     /// A class which defines message waiting request.
860     /// </summary>
861     public class SimMessageWaitingRequest
862     {
863         private bool _isCphs;
864         private SimMwis _mwis;
865         private SimCphsMw _cphsMw;
866
867         /// <summary>
868         /// CPHS or not.
869         /// </summary>
870         public bool IsCphs
871         {
872             get
873             {
874                 return _isCphs;
875             }
876
877             set
878             {
879                 _isCphs = value;
880             }
881         }
882
883         /// <summary>
884         /// MWIS.
885         /// </summary>
886         /// <remarks>
887         /// This should be filled only if IsCphs is false.
888         /// </remarks>
889         public SimMwis Mwis
890         {
891             get
892             {
893                 return _mwis;
894             }
895
896             set
897             {
898                 _mwis = value;
899             }
900         }
901
902         /// <summary>
903         /// CPHS MW.
904         /// </summary>
905         /// <remarks>
906         /// This should be filled only if IsCphs is true.
907         /// </remarks>
908         public SimCphsMw CphsMw
909         {
910             get
911             {
912                 return _cphsMw;
913             }
914
915             set
916             {
917                 _cphsMw = value;
918             }
919         }
920     }
921
922     /// <summary>
923     /// A class which defines mailbox dialing number data.
924     /// </summary>
925     public class SimMailboxNumber
926     {
927         private bool _isCphs;
928         private int _recIndex;
929         private int _profileNumber;
930         private SimMailboxType _mbType;
931         private int _alphaMaxLength;
932         private string _alphaId;
933         private SimTypeOfNumber _ton;
934         private SimNumberPlanIdentity _npi;
935         private string _number;
936         private byte _ccId;
937         private byte _ext1Id;
938
939         /// <summary>
940         /// CPHS or not.
941         /// </summary>
942         public bool IsCphs
943         {
944             get
945             {
946                 return _isCphs;
947             }
948
949             set
950             {
951                 _isCphs = value;
952             }
953         }
954
955         /// <summary>
956         /// Index which stands for the location where the record is saved in SIM.
957         /// </summary>
958         public int RecIndex
959         {
960             get
961             {
962                 return _recIndex;
963             }
964
965             set
966             {
967                 _recIndex = value;
968             }
969         }
970
971         /// <summary>
972         /// SIM profile index.
973         /// </summary>
974         public int ProfileNumber
975         {
976             get
977             {
978                 return _profileNumber;
979             }
980
981             set
982             {
983                 _profileNumber = value;
984             }
985         }
986
987         /// <summary>
988         /// Mailbox type.
989         /// </summary>
990         public SimMailboxType MbType
991         {
992             get
993             {
994                 return _mbType;
995             }
996
997             set
998             {
999                 _mbType = value;
1000             }
1001         }
1002
1003         /// <summary>
1004         /// Alpha max length in SIM.
1005         /// </summary>
1006         public int AlphaMaxLength
1007         {
1008             get
1009             {
1010                 return _alphaMaxLength;
1011             }
1012
1013             set
1014             {
1015                 _alphaMaxLength = value;
1016             }
1017         }
1018
1019         /// <summary>
1020         /// Alpha Identifier.
1021         /// </summary>
1022         public string AlphaId
1023         {
1024             get
1025             {
1026                 return _alphaId;
1027             }
1028
1029             set
1030             {
1031                 _alphaId = value;
1032             }
1033         }
1034
1035         /// <summary>
1036         /// Type Of Number.
1037         /// </summary>
1038         public SimTypeOfNumber Ton
1039         {
1040             get
1041             {
1042                 return _ton;
1043             }
1044
1045             set
1046             {
1047                 _ton = value;
1048             }
1049         }
1050
1051         /// <summary>
1052         /// Number Plan Identity.
1053         /// </summary>
1054         public SimNumberPlanIdentity Npi
1055         {
1056             get
1057             {
1058                 return _npi;
1059             }
1060
1061             set
1062             {
1063                 _npi = value;
1064             }
1065         }
1066
1067         /// <summary>
1068         /// Dialing Number/SSC String.
1069         /// </summary>
1070         public string Number
1071         {
1072             get
1073             {
1074                 return _number;
1075             }
1076
1077             set
1078             {
1079                 _number = value;
1080             }
1081         }
1082
1083         /// <summary>
1084         /// Capability/Configuration Identifier.
1085         /// </summary>
1086         public byte CcId
1087         {
1088             get
1089             {
1090                 return _ccId;
1091             }
1092
1093             set
1094             {
1095                 _ccId = value;
1096             }
1097         }
1098
1099         /// <summary>
1100         /// Extension 1 Record Identifier.
1101         /// </summary>
1102         public byte Ext1Id
1103         {
1104             get
1105             {
1106                 return _ext1Id;
1107             }
1108
1109             set
1110             {
1111                 _ext1Id = value;
1112             }
1113         }
1114     }
1115
1116     /// <summary>
1117     /// A class which defines mailbox dialing number list.
1118     /// </summary>
1119     public class SimMailboxList
1120     {
1121         internal int MbCount;
1122         internal IEnumerable<SimMailboxNumber> MbList;
1123         internal SimMailboxList()
1124         {
1125         }
1126
1127         /// <summary>
1128         /// Mailbox count.
1129         /// </summary>
1130         public int Count
1131         {
1132             get
1133             {
1134                 return MbCount;
1135             }
1136         }
1137
1138         /// <summary>
1139         /// List of mailbox.
1140         /// </summary>
1141         public IEnumerable<SimMailboxNumber> List
1142         {
1143             get
1144             {
1145                 return MbList;
1146             }
1147         }
1148     }
1149
1150     /// <summary>
1151     /// A class which defines available optional CPHS SIM files.
1152     /// </summary>
1153     public class SimCphsServiceTable
1154     {
1155         internal int CustomerSvcProfile;
1156         internal int SvcStringTable;
1157         internal int MbNumbers;
1158         internal int OperatorNameShort;
1159         internal int InformationNum;
1160         internal SimCphsServiceTable()
1161         {
1162         }
1163
1164         /// <summary>
1165         /// Customer Service Profile (CSP).
1166         /// </summary>
1167         public int CustomerServiceProfile
1168         {
1169             get
1170             {
1171                 return CustomerSvcProfile;
1172             }
1173         }
1174
1175         /// <summary>
1176         /// Service String Table (SST).
1177         /// </summary>
1178         public int ServiceStringTable
1179         {
1180             get
1181             {
1182                 return SvcStringTable;
1183             }
1184         }
1185
1186         /// <summary>
1187         /// MailBoxNumbers.
1188         /// </summary>
1189         public int MailboxNumbers
1190         {
1191             get
1192             {
1193                 return MbNumbers;
1194             }
1195         }
1196
1197         /// <summary>
1198         /// Short form of operator name.
1199         /// </summary>
1200         public int OperatorNameShortForm
1201         {
1202             get
1203             {
1204                 return OperatorNameShort;
1205             }
1206         }
1207
1208         /// <summary>
1209         /// Information numbers.
1210         /// </summary>
1211         public int InformationNumbers
1212         {
1213             get
1214             {
1215                 return InformationNum;
1216             }
1217         }
1218     }
1219
1220     /// <summary>
1221     /// A class which defines CPHS information data.
1222     /// </summary>
1223     public class SimCphsInfo
1224     {
1225         internal SimCphsPhaseType Phase;
1226         internal SimCphsServiceTable CphsSvcTable;
1227         internal SimCphsInfo()
1228         {
1229         }
1230
1231         /// <summary>
1232         /// CPHS phase type.
1233         /// </summary>
1234         public SimCphsPhaseType CphsPhase
1235         {
1236             get
1237             {
1238                 return Phase;
1239             }
1240         }
1241
1242         /// <summary>
1243         /// CPHS service table.
1244         /// </summary>
1245         public SimCphsServiceTable CphsServiceTable
1246         {
1247             get
1248             {
1249                 return CphsSvcTable;
1250             }
1251         }
1252     }
1253
1254     /// <summary>
1255     /// A class which defines CSIM service table.
1256     /// </summary>
1257     public class SimCst
1258     {
1259         internal SimCdmaServiceTable CdmaSvc;
1260         internal byte[] Cdma;
1261         internal byte[] Csim;
1262         internal SimCst()
1263         {
1264         }
1265
1266         /// <summary>
1267         /// Cdma service table;
1268         /// </summary>
1269         public SimCdmaServiceTable CdmaSvcTable
1270         {
1271             get
1272             {
1273                 return CdmaSvc;
1274             }
1275         }
1276
1277         /// <summary>
1278         /// Cdma service. Gives mask value of SimCdmaService enum.
1279         /// </summary>
1280         /// <remarks>
1281         /// This will be filled only if CdmaSvcTable is Cdma.
1282         /// </remarks>
1283         public byte[] CdmaService
1284         {
1285             get
1286             {
1287                 return Cdma;
1288             }
1289         }
1290
1291         /// <summary>
1292         /// Csim service. Gives mask value of SimCsimService enum.
1293         /// </summary>
1294         /// <remarks>
1295         /// This will be filled only if CdmaSvcTable is Csim.
1296         /// </remarks>
1297         public byte[] CsimService
1298         {
1299             get
1300             {
1301                 return Csim;
1302             }
1303         }
1304     }
1305
1306     /// <summary>
1307     /// A class which defines SIM service table.
1308     /// </summary>
1309     public class SimServiceTable
1310     {
1311         internal SimCardType Type;
1312         internal byte[] Sst;
1313         internal byte[] Ust;
1314         internal SimCst Cst;
1315         internal SimServiceTable()
1316         {
1317         }
1318
1319         /// <summary>
1320         /// SIM card type.
1321         /// </summary>
1322         public SimCardType SimType
1323         {
1324             get
1325             {
1326                 return Type;
1327             }
1328         }
1329
1330         /// <summary>
1331         /// SIM service table. Gives mask value of SimSstService enum.
1332         /// </summary>
1333         /// <remarks>
1334         /// This will be filled only if SimType is Gsm.
1335         /// </remarks>
1336         public byte[] SstService
1337         {
1338             get
1339             {
1340                 return Sst;
1341             }
1342         }
1343
1344         /// <summary>
1345         /// USIM service table. Gives mask value of SimUstService enum.
1346         /// </summary>
1347         /// <remarks>
1348         /// This will be filled only if SimType is Usim.
1349         /// </remarks>
1350         public byte[] UstService
1351         {
1352             get
1353             {
1354                 return Ust;
1355             }
1356         }
1357
1358         /// <summary>
1359         /// CSIM service table.
1360         /// </summary>
1361         /// <remarks>
1362         /// This will be filled only if SimType is Ruim.
1363         /// </remarks>
1364         public SimCst CstService
1365         {
1366             get
1367             {
1368                 return Cst;
1369             }
1370         }
1371     }
1372
1373     /// <summary>
1374     /// A class which defines MSISDN information of the GSM/CDMA SIM.
1375     /// </summary>
1376     public class SimSubscriberInfo
1377     {
1378         internal string MsisdnNum;
1379         internal string MsisdnName;
1380         internal SimSubscriberInfo()
1381         {
1382         }
1383
1384         /// <summary>
1385         /// MSISDN number. If it does not exist, a null string will be returned
1386         /// </summary>
1387         public string Number
1388         {
1389             get
1390             {
1391                 return MsisdnNum;
1392             }
1393         }
1394
1395         /// <summary>
1396         /// MSISDN name. If it does not exist, a null string will be returned. Not applicable for CDMA.
1397         /// </summary>
1398         public string Name
1399         {
1400             get
1401             {
1402                 return MsisdnName;
1403             }
1404         }
1405     }
1406
1407     /// <summary>
1408     /// A class which defines MSISDN list.
1409     /// </summary>
1410     public class SimMsisdnList
1411     {
1412         internal int MsisdnCount;
1413         internal IEnumerable<SimSubscriberInfo> SubscriberList;
1414         internal SimMsisdnList()
1415         {
1416         }
1417
1418         /// <summary>
1419         /// Count.
1420         /// </summary>
1421         public int Count
1422         {
1423             get
1424             {
1425                 return MsisdnCount;
1426             }
1427         }
1428
1429         /// <summary>
1430         /// List of subscriber info.
1431         /// </summary>
1432         public IEnumerable<SimSubscriberInfo> List
1433         {
1434             get
1435             {
1436                 return SubscriberList;
1437             }
1438         }
1439     }
1440
1441     /// <summary>
1442     /// A class which defines OPLMNwACT data.
1443     /// </summary>
1444     public class SimOplmnwact
1445     {
1446         internal string PlmnString;
1447         internal bool UmtsFlag;
1448         internal bool GsmFlag;
1449         internal SimOplmnwact()
1450         {
1451         }
1452
1453         /// <summary>
1454         /// PLMN.
1455         /// </summary>
1456         public string Plmn
1457         {
1458             get
1459             {
1460                 return PlmnString;
1461             }
1462         }
1463
1464         /// <summary>
1465         /// UMTS or not.
1466         /// </summary>
1467         public bool IsUmts
1468         {
1469             get
1470             {
1471                 return UmtsFlag;
1472             }
1473         }
1474
1475         /// <summary>
1476         /// GSM or not.
1477         /// </summary>
1478         public bool IsGsm
1479         {
1480             get
1481             {
1482                 return GsmFlag;
1483             }
1484         }
1485     }
1486
1487     /// <summary>
1488     /// A class which defines OPLMNwACT list.
1489     /// </summary>
1490     public class SimOplmnwactList
1491     {
1492         internal int OplmnCount;
1493         internal IEnumerable<SimOplmnwact> OplmnList;
1494         internal SimOplmnwactList()
1495         {
1496         }
1497
1498         /// <summary>
1499         /// Count.
1500         /// </summary>
1501         public int Count
1502         {
1503             get
1504             {
1505                 return OplmnCount;
1506             }
1507         }
1508
1509         /// <summary>
1510         /// List of OPLMNWACT.
1511         /// </summary>
1512         public IEnumerable<SimOplmnwact> List
1513         {
1514             get
1515             {
1516                 return OplmnList;
1517             }
1518         }
1519     }
1520
1521     /// <summary>
1522     /// A class which defines SPN(Service Provider Name).
1523     /// </summary>
1524     public class SimSpn
1525     {
1526         internal byte Condition;
1527         internal string SpName;
1528         internal SimSpn()
1529         {
1530         }
1531
1532         /// <summary>
1533         /// Display condition.
1534         /// </summary>
1535         public byte DisplayCondition
1536         {
1537             get
1538             {
1539                 return Condition;
1540             }
1541         }
1542
1543         /// <summary>
1544         /// Service Provider Name.
1545         /// </summary>
1546         public string Spn
1547         {
1548             get
1549             {
1550                 return SpName;
1551             }
1552         }
1553     }
1554
1555     /// <summary>
1556     /// A class which defines CPHS network name.
1557     /// </summary>
1558     public class SimCphsNetName
1559     {
1560         internal string Full;
1561         internal string Short;
1562         internal SimCphsNetName()
1563         {
1564         }
1565
1566         /// <summary>
1567         /// Full name.
1568         /// </summary>
1569         public string FullName
1570         {
1571             get
1572             {
1573                 return Full;
1574             }
1575         }
1576
1577         /// <summary>
1578         /// Short name.
1579         /// </summary>
1580         public string ShortName
1581         {
1582             get
1583             {
1584                 return Short;
1585             }
1586         }
1587     }
1588
1589     /// <summary>
1590     /// A class which defines authentication request data.
1591     /// </summary>
1592     public class SimAuthenticationData
1593     {
1594         private SimAuthenticationType _authType;
1595         private int _randLength;
1596         private int _autnLength;
1597         private byte[] _randData;
1598         private byte[] _autnData;
1599         private SimAuthenticationData()
1600         {
1601         }
1602
1603         /// <summary>
1604         /// A constructor to instantiate SimAuthenticationData class with necessary parameters.
1605         /// </summary>
1606         /// <param name="authType">Authentication type.</param>
1607         /// <param name="randLength">The length of RAND.</param>
1608         /// <param name="autnLength">The length of AUTN. It is not used in case of GSM AUTH.</param>
1609         /// <param name="randData">RAND data.</param>
1610         /// <param name="autnData">AUTN data. It is not used in case of GSM AUTH.</param>
1611         public SimAuthenticationData(SimAuthenticationType authType, int randLength, int autnLength, byte[] randData, byte[] autnData)
1612         {
1613             _authType = authType;
1614             _randLength = randLength;
1615             _autnLength = autnLength;
1616             _randData = randData;
1617             _autnData = autnData;
1618         }
1619
1620         internal SimAuthenticationType AuthType
1621         {
1622             get
1623             {
1624                 return _authType;
1625             }
1626         }
1627
1628         internal int RandLength
1629         {
1630             get
1631             {
1632                 return _randLength;
1633             }
1634         }
1635
1636         internal int AutnLength
1637         {
1638             get
1639             {
1640                 return _autnLength;
1641             }
1642         }
1643
1644         internal byte[] RandData
1645         {
1646             get
1647             {
1648                 return _randData;
1649             }
1650         }
1651
1652         internal byte[] AutnData
1653         {
1654             get
1655             {
1656                 return _autnData;
1657             }
1658         }
1659     }
1660
1661     /// <summary>
1662     /// A class which defines authentication result data.
1663     /// </summary>
1664     public class SimAuthenticationResponse
1665     {
1666         internal SimAuthenticationType Type;
1667         internal SimAuthenticationResult Result;
1668         internal int RespLength;
1669         internal string RespData;
1670         internal int AuthKeyLen;
1671         internal string Key;
1672         internal int CipherLen;
1673         internal string Cipher;
1674         internal int IntegrityLen;
1675         internal string Integrity;
1676         internal SimAuthenticationResponse()
1677         {
1678         }
1679
1680         /// <summary>
1681         /// Authentication type.
1682         /// </summary>
1683         public SimAuthenticationType AuthType
1684         {
1685             get
1686             {
1687                 return Type;
1688             }
1689         }
1690
1691         /// <summary>
1692         /// Authentication result.
1693         /// </summary>
1694         public SimAuthenticationResult AuthResult
1695         {
1696             get
1697             {
1698                 return Result;
1699             }
1700         }
1701
1702         /// <summary>
1703         /// Response length.
1704         /// </summary>
1705         public int ResponseLength
1706         {
1707             get
1708             {
1709                 return RespLength;
1710             }
1711         }
1712
1713         /// <summary>
1714         /// Response data.
1715         /// </summary>
1716         public string ResponseData
1717         {
1718             get
1719             {
1720                 return RespData;
1721             }
1722         }
1723
1724         /// <summary>
1725         /// The length of the authentication key.
1726         /// </summary>
1727         public int AuthKeyLength
1728         {
1729             get
1730             {
1731                 return AuthKeyLen;
1732             }
1733         }
1734
1735         /// <summary>
1736         /// The data of the authentication key.
1737         /// </summary>
1738         public string AuthKey
1739         {
1740             get
1741             {
1742                 return Key;
1743             }
1744         }
1745
1746         /// <summary>
1747         /// The length of the cipher key.
1748         /// </summary>
1749         public int CipherLength
1750         {
1751             get
1752             {
1753                 return CipherLen;
1754             }
1755         }
1756
1757         /// <summary>
1758         /// Cipher key.
1759         /// </summary>
1760         public string CipherData
1761         {
1762             get
1763             {
1764                 return Cipher;
1765             }
1766         }
1767
1768         /// <summary>
1769         /// The length of the integrity key.
1770         /// </summary>
1771         public int IntegrityLength
1772         {
1773             get
1774             {
1775                 return IntegrityLen;
1776             }
1777         }
1778
1779         /// <summary>
1780         /// Integrity key.
1781         /// </summary>
1782         public string IntegrityData
1783         {
1784             get
1785             {
1786                 return Integrity;
1787             }
1788         }
1789     }
1790
1791     /// <summary>
1792     /// A class which defines information about SIM PIN data.
1793     /// </summary>
1794     public class SimPinData
1795     {
1796         private SimPinType _type;
1797         private string _pin;
1798         private uint _pinLength;
1799         private SimPinData()
1800         {
1801         }
1802
1803         /// <summary>
1804         /// A constructor to instantiate SimPinData class which necessary parameters.
1805         /// </summary>
1806         /// <param name="type">PIN type.</param>
1807         /// <param name="pin">PIN code.</param>
1808         /// <param name="pinLength">PIN code length.</param>
1809         public SimPinData(SimPinType type, string pin, uint pinLength)
1810         {
1811             _type = type;
1812             _pin = pin;
1813             _pinLength = pinLength;
1814         }
1815
1816         internal SimPinType Type
1817         {
1818             get
1819             {
1820                 return _type;
1821             }
1822         }
1823
1824         internal string Pin
1825         {
1826             get
1827             {
1828                 return _pin;
1829             }
1830         }
1831
1832         internal uint PinLength
1833         {
1834             get
1835             {
1836                 return _pinLength;
1837             }
1838         }
1839     }
1840
1841     /// <summary>
1842     /// A class which defines PIN information.
1843     /// </summary>
1844     public class SimPinResult
1845     {
1846         internal SimPinType PinType;
1847         internal int Retry;
1848         internal SimPinResult()
1849         {
1850         }
1851
1852         /// <summary>
1853         /// Specifies the PIN or PUK type.
1854         /// </summary>
1855         public SimPinType Type
1856         {
1857             get
1858             {
1859                 return PinType;
1860             }
1861         }
1862
1863         /// <summary>
1864         /// Number of attempts remaining for PIN/PUK verification.
1865         /// </summary>
1866         public int RetryCount
1867         {
1868             get
1869             {
1870                 return Retry;
1871             }
1872         }
1873     }
1874
1875     /// <summary>
1876     /// A class which is used to used to enable/disable facility.
1877     /// </summary>
1878     public class SimFacility
1879     {
1880         private SimLockType _lockType;
1881         private string _password;
1882         private int _passwordLength;
1883         private SimFacility()
1884         {
1885         }
1886
1887         /// <summary>
1888         /// A constructor to instantiate SimFacility class with necessary parameters.
1889         /// </summary>
1890         /// <param name="lockType">Facility type.</param>
1891         /// <param name="password">Password.</param>
1892         /// <param name="passwordLength">Password length.</param>
1893         public SimFacility(SimLockType lockType, string password, int passwordLength)
1894         {
1895             _lockType = lockType;
1896             _password = password;
1897             _passwordLength = passwordLength;
1898         }
1899
1900         internal SimLockType LockType
1901         {
1902             get
1903             {
1904                 return _lockType;
1905             }
1906         }
1907
1908         internal string Password
1909         {
1910             get
1911             {
1912                 return _password;
1913             }
1914         }
1915
1916         internal int PasswordLength
1917         {
1918             get
1919             {
1920                 return _passwordLength;
1921             }
1922         }
1923     }
1924
1925     /// <summary>
1926     /// A class which defines facility result data.
1927     /// </summary>
1928     public class SimFacilityResult
1929     {
1930         internal SimLockType LockType;
1931         internal int Count;
1932         internal SimFacilityResult()
1933         {
1934         }
1935
1936         /// <summary>
1937         /// Specifies the PIN or PUK type.
1938         /// </summary>
1939         public SimLockType Type
1940         {
1941             get
1942             {
1943                 return LockType;
1944             }
1945         }
1946
1947         /// <summary>
1948         /// Number of attempts remaining for PIN/PUK verification.
1949         /// </summary>
1950         public int RetryCount
1951         {
1952             get
1953             {
1954                 return Count;
1955             }
1956         }
1957     }
1958
1959     /// <summary>
1960     /// A class which defines facility info data.
1961     /// </summary>
1962     public class SimFacilityInfo
1963     {
1964         internal SimLockType LockType;
1965         internal SimFacilityStatus FacilityStatus;
1966         internal SimFacilityInfo()
1967         {
1968         }
1969
1970         /// <summary>
1971         /// Lock type.
1972         /// </summary>
1973         public SimLockType Type
1974         {
1975             get
1976             {
1977                 return LockType;
1978             }
1979         }
1980
1981         /// <summary>
1982         /// Facility status.
1983         /// </summary>
1984         public SimFacilityStatus Status
1985         {
1986             get
1987             {
1988                 return FacilityStatus;
1989             }
1990         }
1991     }
1992
1993     /// <summary>
1994     /// A class which defines information about lock type.
1995     /// </summary>
1996     public class SimLockInfo
1997     {
1998         internal SimLockType LockType;
1999         internal SimLockStatus LockStatus;
2000         internal int Count;
2001         internal SimLockInfo()
2002         {
2003         }
2004
2005         /// <summary>
2006         /// Lock type.
2007         /// </summary>
2008         public SimLockType Type
2009         {
2010             get
2011             {
2012                 return LockType;
2013             }
2014         }
2015
2016         /// <summary>
2017         /// Lock status.
2018         /// </summary>
2019         public SimLockStatus Status
2020         {
2021             get
2022             {
2023                 return LockStatus;
2024             }
2025         }
2026
2027         /// <summary>
2028         /// Retry counts.
2029         /// </summary>
2030         public int RetryCount
2031         {
2032             get
2033             {
2034                 return Count;
2035             }
2036         }
2037     }
2038
2039     /// <summary>
2040     /// A class which defines APDU information.
2041     /// </summary>
2042     public class SimApdu
2043     {
2044         private byte[] _apdu;
2045         private SimApdu()
2046         {
2047         }
2048
2049         /// <summary>
2050         /// A constructor to instantiate SimApdu class with necessary parameters.
2051         /// </summary>
2052         /// <param name="apdu">APDU.</param>
2053         public SimApdu(byte[] apdu)
2054         {
2055             _apdu = apdu;
2056         }
2057
2058         internal byte[] Apdu
2059         {
2060             get
2061             {
2062                 return _apdu;
2063             }
2064         }
2065     }
2066
2067     /// <summary>
2068     /// A class which defines the response of sending APDU.
2069     /// </summary>
2070     public class SimApduResponse
2071     {
2072         internal ushort ApduLen;
2073         internal byte[] ApduResp;
2074         internal SimApduResponse()
2075         {
2076         }
2077
2078         /// <summary>
2079         /// Length of response APDU.
2080         /// </summary>
2081         public ushort ApduLength
2082         {
2083             get
2084             {
2085                 return ApduLen;
2086             }
2087         }
2088
2089         /// <summary>
2090         /// Response APDU.
2091         /// </summary>
2092         public byte[] ApduResponse
2093         {
2094             get
2095             {
2096                 return ApduResp;
2097             }
2098         }
2099     }
2100
2101     /// <summary>
2102     /// A class which defines the response of sending ATR.
2103     /// </summary>
2104     public class SimAtrResponse
2105     {
2106         internal ushort AtrRespLen;
2107         internal byte[] AtrResp;
2108         internal SimAtrResponse()
2109         {
2110         }
2111
2112         /// <summary>
2113         /// Length of response ATR.
2114         /// </summary>
2115         public ushort AtrRespLength
2116         {
2117             get
2118             {
2119                 return AtrRespLen;
2120             }
2121         }
2122
2123         /// <summary>
2124         /// Response ATR.
2125         /// </summary>
2126         public byte[] AtrResponse
2127         {
2128             get
2129             {
2130                 return AtrResp;
2131             }
2132         }
2133     }
2134
2135     /// <summary>
2136     /// A class which defines ISIM IMPU list data.
2137     /// </summary>
2138     public class SimImpuList
2139     {
2140         internal uint DataCount;
2141         internal IEnumerable<string> ImpuList;
2142         internal SimImpuList()
2143         {
2144         }
2145
2146         /// <summary>
2147         /// ISIM IMPU data count.
2148         /// </summary>
2149         public uint Count
2150         {
2151             get
2152             {
2153                 return DataCount;
2154             }
2155         }
2156
2157         /// <summary>
2158         /// ISIM IMPU list.
2159         /// </summary>
2160         public IEnumerable<string> List
2161         {
2162             get
2163             {
2164                 return ImpuList;
2165             }
2166         }
2167     }
2168
2169     /// <summary>
2170     /// A class which defines ISIM P-CSCF data.
2171     /// </summary>
2172     public class SimPcscf
2173     {
2174         internal SimPcscfType PcscfType;
2175         internal string PcscfData;
2176         internal SimPcscf()
2177         {
2178         }
2179
2180         /// <summary>
2181         /// ISIM P-CSCF type.
2182         /// </summary>
2183         public SimPcscfType Type
2184         {
2185             get
2186             {
2187                 return PcscfType;
2188             }
2189         }
2190
2191         /// <summary>
2192         /// ISIM P-CSCF data.
2193         /// </summary>
2194         public string Pcscf
2195         {
2196             get
2197             {
2198                 return PcscfData;
2199             }
2200         }
2201     }
2202
2203     /// <summary>
2204     /// A class which defines ISIM P-CSCF list data.
2205     /// </summary>
2206     public class SimPcscfList
2207     {
2208         internal uint DataCount;
2209         internal IEnumerable<SimPcscf> PcscfList;
2210         internal SimPcscfList()
2211         {
2212         }
2213
2214         /// <summary>
2215         /// ISIM P-CSCF data count.
2216         /// </summary>
2217         public uint Count
2218         {
2219             get
2220             {
2221                 return DataCount;
2222             }
2223         }
2224
2225         /// <summary>
2226         /// ISIM P-CSCF list.
2227         /// </summary>
2228         public IEnumerable<SimPcscf> List
2229         {
2230             get
2231             {
2232                 return PcscfList;
2233             }
2234         }
2235     }
2236 }