2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 using System.Collections.Generic;
22 /// A class which defines the list of phone book availability of the current SIM.
24 public class SimPhonebookList
33 internal SimPhonebookList()
38 /// Fixed Dialing Number.
40 /// <value>Fdn represented in integer format.</value>
50 /// SIM - ADN(2G phonebook, Under DF phonebook).
52 /// <value>Adn represented in integer format.</value>
62 /// Service Dialing Number.
64 /// <value>Sdn represented in integer format.</value>
74 /// USIM - 3G phonebook.
76 /// <value>Usim represented in integer format.</value>
86 /// Additional number Alpha String phonebook.
88 /// <value>Aas represented in integer format.</value>
98 /// Grouping information Alpha String phonebook.
100 /// <value>Gas represented in integer format.</value>
111 /// A class which defines phone book status of the current SIM.
113 public class SimPhonebookStatus
115 internal bool InitStatus;
116 internal SimPhonebookList List;
118 internal SimPhonebookStatus()
123 /// Init completed or not.
125 /// <value>Boolean value to check the status of Init.</value>
126 public bool IsInitCompleted
135 /// List of phonebook.
137 /// <value>An instance of SimPhonebookList containing the list of available phone book.</value>
138 public SimPhonebookList PbList
148 /// A class which defines phonebook contact change information.
150 public class PhonebookContactChangeInfo
152 internal PhonebookType PbType;
153 internal ushort ChangedIndex;
154 internal PhonebookOperationType OpType;
156 internal PhonebookContactChangeInfo()
161 /// Storage file type.
163 /// <value>Type of phonebook storage represented as PhonebookType enum.</value>
164 public PhonebookType Type
175 /// <value>Index value represented in unsigned short.</value>
185 /// Phonebook operation.
187 /// <value>Operation indicating the action on phonebook contact.</value>
188 public PhonebookOperationType Operation
198 /// A class which defines phone book storage count information.
200 public class PhonebookStorageInfo
202 internal PhonebookType PbType;
203 internal ushort PbTotalRecord;
204 internal ushort PbUsedRecord;
205 internal PhonebookStorageInfo()
210 /// Storage file type.
212 /// <value>Type of phone book storage file.</value>
213 public PhonebookType Type
222 /// Total record count.
224 /// <value>Count of total phonebook record.</value>
225 public ushort TotalRecord
229 return PbTotalRecord;
234 /// Used record count.
236 /// <value>Number of used phonebook record.</value>
237 public ushort UsedRecord
247 /// A class which defines phone book entry information.
249 public class PhonebookMetaInfo
251 internal PhonebookType MetaType;
252 internal ushort MinIdx;
253 internal ushort MaxIdx;
254 internal ushort NumMaxLength;
255 internal ushort TextMaxLen;
256 internal ushort UsedRecCount;
257 internal PhonebookMetaInfo()
262 /// Storage file type.
264 /// <value>Type of phonebook storage.</value>
265 public PhonebookType Type
274 /// Phone book minimum index.
276 /// <value>Minimum index value of the phone book record.</value>
277 public ushort MinIndex
286 /// Phone book maximum index.
288 /// <value>Maximum index value of the phone book record.</value>
289 public ushort MaxIndex
298 /// Phone number's maximum length
300 /// <value>Maximum length of the phone number.</value>
301 public ushort NumberMaxLength
310 /// Text's maximum length.
312 /// <value>Maximum length of the text.</value>
313 public ushort TextMaxLength
322 /// Phone book used record count.
324 /// <value>Number of used phone book record.</value>
325 public ushort UsedCount
335 /// A class which defines 3G phone book capability information.
337 public class FileTypeCapabilityInfo3G
339 internal PhonebookFileType3G Type;
340 internal ushort MaxIdx;
341 internal ushort TextMaxLen;
342 internal ushort UsedRecCount;
343 internal FileTypeCapabilityInfo3G()
348 /// 3G phonebook file type.
350 /// <value>File type of the 3G phonebook.</value>
351 public PhonebookFileType3G FileType
362 /// <value>Maximum index value present in 3G phonebook.</value>
363 public ushort MaxIndex
374 /// <value>Maximum text length in unsigned short.</value>
375 public ushort TextMaxLength
384 /// Used record count.
386 /// <value>Number of used record in 3G phonebook.</value>
387 public ushort UsedCount
397 /// A class which manages Sim phonebook and its capabilities information.
399 public class PhonebookMetaInfo3G
401 internal ushort FileCount;
402 internal IEnumerable<FileTypeCapabilityInfo3G> FileInfo;
403 internal PhonebookMetaInfo3G()
408 /// Phonebook file type count.
410 /// <value>Filetype count of the 3G phonebook.</value>
411 public ushort FileTypeCount
420 /// Phonebook file type information.
422 /// <value>A list of FileTypeCapabilityInfo3G instances.</value>
423 public IEnumerable<FileTypeCapabilityInfo3G> FileTypeInfo
433 /// A class which contains information about phonebook record.
435 public class PhonebookRecord
437 private PhonebookType _type;
438 private ushort _index;
439 private ushort _nextIndex;
440 private string _name;
441 private TextEncryptionType _dcs;
442 private string _number;
443 private SimTypeOfNumber _ton;
445 private TextEncryptionType _sneDcs;
446 private string _anr1;
447 private SimTypeOfNumber _anr1Ton;
448 private string _anr2;
449 private SimTypeOfNumber _anr2Ton;
450 private string _anr3;
451 private SimTypeOfNumber _anr3Ton;
452 private string _email1;
453 private string _email2;
454 private string _email3;
455 private string _email4;
456 private ushort _groupIndex;
457 private ushort _pbControl;
462 /// <value>Type of the phonebook used.</value>
463 public PhonebookType Type
479 /// <value>Index value represented in unsigned short.</value>
494 /// Next index (This field is not used in the add/update case).
496 /// <value>Next index represented in unsigned short.</value>
497 public ushort NextIndex
513 /// <value>Name in phonebook record.</value>
530 /// <value>Sim encryption type.</value>
531 public TextEncryptionType Dcs
547 /// <value>Number in phonebook record.</value>
564 /// <value>Sim type of number.</value>
565 public SimTypeOfNumber Ton
579 /// SNE(Second Name Entry).
581 /// <value>Second name entry in byte array.</value>
598 /// <value>SNE text encryption type.</value>
599 public TextEncryptionType SneDcs
613 /// Additional Number1.
615 /// <value>Additional number1 represented in byte array.</value>
632 /// <value>Additional number1 type of number.</value>
633 public SimTypeOfNumber Anr1Ton
647 /// Additional Number2.
649 /// <value>Additional number2 represented in byte array.</value>
666 /// <value>Additional number2 type of number.</value>
667 public SimTypeOfNumber Anr2Ton
681 /// Additional number3.
683 /// <value>Additional number3 represented in byte array.</value>
700 /// <value>Additional number3 type of number.</value>
701 public SimTypeOfNumber Anr3Ton
717 /// <value>Email1 represented in byte array.</value>
734 /// <value>Email2 represented in byte array.</value>
751 /// <value>Email3 represented in byte array.</value>
768 /// <value>Email4 reprensented in byte array.</value>
785 /// <value>Group index represented in unsigned short.</value>
786 public ushort GroupIndex
800 /// Phonebook control.
802 /// <value>Phonebook control represented in unsigned short.</value>
803 public ushort PbControl