--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+Name: csapi-tapi
+Summary: Tizen TAPI API for C#
+Version: 1.0.1
+Release: 1
+Group: Development/Libraries
+License: Apache-2.0
+URL: https://www.tizen.org
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+
+AutoReqProv: no
+ExcludeArch: aarch64
+
+BuildRequires: dotnet-build-tools
+
+# C# API Requires
+BuildRequires: csapi-tizen-nuget
+
+%define Assemblies Tizen.Tapi
+
+%description
+%{summary}
+
+%dotnet_import_sub_packages
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+for ASM in %{Assemblies}; do
+%dotnet_build $ASM
+%dotnet_pack $ASM/$ASM.nuspec %{version}
+done
+
+%install
+for ASM in %{Assemblies}; do
+%dotnet_install $ASM
+done
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%attr(644,root,root) %{dotnet_assembly_files}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+internal static partial class Interop
+{
+ internal static partial class Libraries
+ {
+ public const string Tapi = "libtapi.so.0";
+ public const string Glib = "libglib-2.0.so.0";
+ public const string Libc = "libc.so.6";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen.Tapi;
+
+/// <summary>
+/// Interop class for Tapi
+/// </summary>
+internal static partial class Interop
+{
+ /// <summary>
+ /// Tapi Native Apis
+ /// </summary>
+ internal static partial class Tapi
+ {
+ //Callback for event
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void TapiNotificationCallback(IntPtr handle, string id, IntPtr data, IntPtr userData);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void TapiResponseCallback(IntPtr handle, int result, IntPtr data, IntPtr userData);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void TapiStateCallback(int state, IntPtr userData);
+
+ //Tapi-common
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_cp_name_list")]
+ internal static extern string[] GetCpNames();
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_init")]
+ internal static extern IntPtr InitTapi(string cpName);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_deinit")]
+ internal static extern int DeinitTapi(IntPtr handle);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_register_noti_event")]
+ internal static extern int RegisterNotiEvent(IntPtr handle, string notificationId, TapiNotificationCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_deregister_noti_event")]
+ internal static extern int DeregisterNotiEvent(IntPtr handle, string notificationId);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_property_int")]
+ internal static extern int GetIntProperty(IntPtr handle, string property, out int result);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_property_string")]
+ internal static extern int GetStringProperty(IntPtr handle, string property, out string result);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_ready_state")]
+ internal static extern int GetReadyState(out int state);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_register_ready_state_cb")]
+ internal static extern int RegisterReadyStateCb(TapiStateCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_deregister_ready_state_cb")]
+ internal static extern int DeregisterReadyStateCb(TapiStateCallback cb);
+
+ //Phonebook
+ internal static class Phonebook
+ {
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_pb_init_info")]
+ internal static extern int GetPhonebookInitInfo(IntPtr handle, out int initCompleted, out IntPtr pbList);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_pb_count")]
+ internal static extern int GetPhonebookStorage(IntPtr handle, PhonebookType pbType, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_pb_meta_info")]
+ internal static extern int GetPhonebookMetaInfo(IntPtr handle, PhonebookType pbType, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_pb_usim_meta_info")]
+ internal static extern int GetPhonebookMetaInfo3G(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_read_sim_pb_record")]
+ internal static extern int ReadPhonebookRecord(IntPtr handle, PhonebookType pbType, ushort pbIndex, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_update_sim_pb_record")]
+ internal static extern int UpdatePhonebookRecord(IntPtr handle, ref PhonebookRecordStruct data, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_delete_sim_pb_record")]
+ internal static extern int DeletePhonebookRecord(IntPtr handle, PhonebookType pbType, ushort pbIndex, TapiResponseCallback cb, IntPtr userData);
+ }
+
+ //Sat
+ internal static class Sat
+ {
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_select_sat_menu")]
+ internal static extern int SatSendSelectMenu(IntPtr handle, ref SatMenuSelectionInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_download_sat_event")]
+ internal static extern int SatDownloadEvent(IntPtr handle, ref SatEventDownloadInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_send_sat_ui_display_status")]
+ internal static extern int SatSendUiDisplayStatus(IntPtr handle, int commandId, SatUiDisplayStatus status);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_send_sat_ui_user_confirm")]
+ internal static extern int SatSendUiUserConfim(IntPtr handle, ref SatUiUserConfirmInfoStruct confirmInfo);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sat_main_menu_info")]
+ internal static extern int SatGetMainMenuInfo(IntPtr handle, out SatMainMenuInfoStruct mainMenuInfo);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_send_sat_app_exec_result")]
+ internal static extern int SatExecutionResult(IntPtr handle, out SatResultDataStruct resultData);
+ }
+
+ //Sim
+ internal static class Sim
+ {
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_init_info")]
+ internal static extern int SimGetInitInfo(IntPtr handle, out SimCardStatus status, out int cardChanged);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_type")]
+ internal static extern int SimGetType(IntPtr handle, out SimType type);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_imsi")]
+ internal static extern int SimGetImsi(IntPtr handle, out SimImsiInfoStruct imsiInfo);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_ecc")]
+ internal static extern int SimGetEcc(IntPtr handle, out SimEccInfoStruct eccInfo);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_iccid")]
+ internal static extern int SimGetIccId(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_language")]
+ internal static extern int SimGetLanguage(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_sim_language")]
+ internal static extern int SimSetLanguage(IntPtr handle, SimLanguagePreference language, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_callforwarding_info")]
+ internal static extern int SimGetCallForwardingInfo(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_sim_callforwarding_info")]
+ internal static extern int SimSetCallForwardingInfo(IntPtr handle, SimCallForwardRequestStruct request, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_messagewaiting_info")]
+ internal static extern int SimGetMessageWaitingInfo(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_sim_messagewaiting_info")]
+ internal static extern int SimSetMessageWaitingInfo(IntPtr handle, SimMessageWaitingRequestStruct request, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_mailbox_info")]
+ internal static extern int SimGetMailboxInfo(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_sim_mailbox_info")]
+ internal static extern int SimSetMailboxInfo(IntPtr handle, SimMailboxNumberStruct mailbox, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_cphs_info")]
+ internal static extern int SimGetCphsInfo(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_service_table")]
+ internal static extern int SimGetServiceTable(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_msisdn")]
+ internal static extern int SimGetMsisdn(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_oplmnwact")]
+ internal static extern int SimGetOplmnwact(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_spn")]
+ internal static extern int SimGetSpn(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_cphs_netname")]
+ internal static extern int SimGetCphsNetName(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_req_sim_authentication")]
+ internal static extern int SimExecuteAuthentication(IntPtr handle, ref SimAuthenticationDataStruct authenticationData, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_verifiy_sim_pins")]
+ internal static extern int SimVerifyPins(IntPtr handle, ref SimPinDataStruct pinData, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_verify_sim_puks")]
+ internal static extern int SimVerifyPuks(IntPtr handle, ref SimPinDataStruct pukData, ref SimPinDataStruct newPinData, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_change_sim_pins")]
+ internal static extern int SimChangePins(IntPtr handle, ref SimPinDataStruct oldPin, ref SimPinDataStruct newPin, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_disable_sim_facility")]
+ internal static extern int SimDisableFacility(IntPtr handle, ref SimFacilityStruct facility, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_enable_sim_facility")]
+ internal static extern int SimEnableFacility(IntPtr handle, ref SimFacilityStruct facility, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_facility")]
+ internal static extern int SimGetFacility(IntPtr handle, SimLockType lockType, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_lock_info")]
+ internal static extern int SimGetLockInfo(IntPtr handle, SimLockType lockType, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_sim_power_state")]
+ internal static extern int SimSetPowerState(IntPtr handle, SimPowerState state, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_req_sim_apdu")]
+ internal static extern int SimRequestApdu(IntPtr handle, ref SimApduStruct apdu, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_req_sim_atr")]
+ internal static extern int SimRequestAtr(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_application_list")]
+ internal static extern int SimGetApplicationList(IntPtr handle, out byte appList);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_impi")]
+ internal static extern int SimGetImpi(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_impu")]
+ internal static extern int SimGetImpu(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_domain")]
+ internal static extern int SimGetDomain(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_pcscf")]
+ internal static extern int SimGetPcscf(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_sim_isim_service_table")]
+ internal static extern int SimGetIsimServiceTable(IntPtr handle, TapiResponseCallback cb, IntPtr userData);
+
+ }
+
+ //Ss
+ internal static class Ss
+ {
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_ss_barring")]
+ internal static extern int SsSetBarring(IntPtr handle, ref SsBarringInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_ss_barring_status")]
+ internal static extern int SsGetBarringStatus(IntPtr handle, SsClass ssClass, SsBarringType type, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_change_ss_barring_password")]
+ internal static extern int SsChangeBarringPassword(IntPtr handle, string oldPassword, string newPassword, string newPasswordAgain, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_ss_forward")]
+ internal static extern int SsSetForward(IntPtr handle, ref SsForwardInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_ss_forward_status")]
+ internal static extern int SsGetForwardStatus(IntPtr handle, SsClass ssClass, SsForwardCondition condition, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_ss_waiting")]
+ internal static extern int SsSetWaiting(IntPtr handle, ref SsWaitingInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_ss_waiting_status")]
+ internal static extern int SsGetWaitingStatus(IntPtr handle, SsClass ssClass, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_set_ss_cli_status")]
+ internal static extern int SsSetCliStatus(IntPtr handle, SsCliType type, SsCliStatus status, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_get_ss_cli_status")]
+ internal static extern int SsGetCliStatus(IntPtr handle, SsCliType type, TapiResponseCallback cb, IntPtr userData);
+ [DllImport(Libraries.Tapi, EntryPoint = "tel_send_ss_ussd_request")]
+ internal static extern int SsSendUssdRequest(IntPtr handle, ref SsUssdMsgInfoStruct info, TapiResponseCallback cb, IntPtr userData);
+ }
+ }
+}
--- /dev/null
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following\r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("Tizen.Tapi")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("Samsung Electronics")]\r
+[assembly: AssemblyProduct("Tizen.Tapi")]\r
+[assembly: AssemblyCopyright("Copyright © Samsung Electronics 2016")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible\r
+// to COM components. If you need to access a type in this assembly from\r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("08c34d73-7986-4e6e-8c21-5343c7feec86")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+// Major Version\r
+// Minor Version\r
+// Build Number\r
+// Revision\r
+//\r
+// You can specify all the values or you can default the Build and Revision Numbers\r
+// by using the '*' as shown below:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
+[assembly: AssemblyFileVersion("1.0.0.0")]\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProjectGuid>{08C34D73-7986-4E6E-8C21-5343C7FEEC86}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>Tizen.Tapi</RootNamespace>\r
+ <AssemblyName>Tizen.Tapi</AssemblyName>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>\r
+ <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>\r
+ <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ <NoStdLib>true</NoStdLib>\r
+ <NoWarn>$(NoWarn);1701;1702</NoWarn>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <SignAssembly>true</SignAssembly>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <AssemblyOriginatorKeyFile>Tizen.Tapi.snk</AssemblyOriginatorKeyFile>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Interop\Interop.Libraries.cs" />\r
+ <Compile Include="Interop\Interop.Tapi.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="Tizen.Tapi\SatData.cs" />\r
+ <Compile Include="Tizen.Tapi\CallData.cs" />\r
+ <Compile Include="Tizen.Tapi\CallStructs.cs" />\r
+ <Compile Include="Tizen.Tapi\CallEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\ModemEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\TapiEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\TapiUtility.cs" />\r
+ <Compile Include="Tizen.Tapi\TapiEventArgs.cs" />\r
+ <Compile Include="Tizen.Tapi\TapiHandle.cs" />\r
+ <Compile Include="Tizen.Tapi\TapiManager.cs" />\r
+ <Compile Include="Tizen.Tapi\SimStructs.cs" />\r
+ <Compile Include="Tizen.Tapi\SimEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\SatEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\SsEnumerations.cs" />\r
+ <Compile Include="Tizen.Tapi\SatStructs.cs" />\r
+ <Compile Include="Tizen.Tapi\SsStructs.cs" />\r
+ <Compile Include="Tizen.Tapi\PhonebookStructs.cs" />\r
+ <Compile Include="Tizen.Tapi\PhonebookEnumerations.cs" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Tizen.Tapi.nuspec" />\r
+ <None Include="Tizen.Tapi.project.json" />\r
+ <None Include="Tizen.Tapi.snk" />\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->\r
+ <PropertyGroup>\r
+ <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
+ https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
+ -->\r
+ <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
+ properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
+ to prevent it from outputting a warning (MSB3644).
+ -->\r
+ <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>\r
+ <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>\r
+ <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>\r
+ </PropertyGroup>\r
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<package>
+ <metadata>
+ <id>Tizen.Tapi</id>
+ <version>$version$</version>
+ <authors>Samsung Electronics</authors>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
+ <projectUrl>https://www.tizen.org/</projectUrl>
+ <iconUrl>https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png</iconUrl>
+ <copyright>© Samsung Electronics Co., Ltd All Rights Reserved</copyright>
+ <description>Provides Tapi APIs for Tizen.Tapi</description>
+ <dependencies>
+ <dependency id="Tizen" version="1.0.2" />
+ </dependencies>
+ </metadata>
+ <files>
+ <file src="bin/$Configuration$/Tizen.Tapi.dll" target="lib/netstandard1.3" />
+ </files>
+</package>
--- /dev/null
+{\r
+ "dependencies": {\r
+ "NETStandard.Library": "1.6.0",\r
+ "System.Threading.Thread": "4.3.0",\r
+ "Tizen": "1.0.2"\r
+ },\r
+ "frameworks": {\r
+ "netstandard1.3": {}\r
+ }\r
+}\r
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// A class containing information about call idle status notification data.
+ /// </summary>
+ public class CallIdleStatusNotificationData
+ {
+ internal uint Id;
+ internal CallEndCause Cause;
+
+ internal CallIdleStatusNotificationData()
+ {
+ }
+
+ /// <summary>
+ /// Notification id.
+ /// </summary>
+ /// <value>Notificatio id in unsigned integer format.</value>
+ public uint NotiId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// End cause for the call indicates whether the call is released normally or due to some other cause.
+ /// </summary>
+ /// <value>En cause enum value.</value>
+ public CallEndCause EndCause
+ {
+ get
+ {
+ return Cause;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains calling name information.
+ /// </summary>
+ public class CallerNameInfo
+ {
+ internal CallNameMode Mode;
+ internal string NameData;
+
+ internal CallerNameInfo()
+ {
+ }
+
+ /// <summary>
+ /// Display mode of the name.
+ /// </summary>
+ /// <value>Enum value for call name mode</value>
+ public CallNameMode NameMode
+ {
+ get
+ {
+ return Mode;
+ }
+ }
+
+ /// <summary>
+ /// Calling party name string.
+ /// </summary>
+ /// <value>String value representing calling party name.</value>
+ public string Name
+ {
+ get
+ {
+ return NameData;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains details about call information.
+ /// </summary>
+ public class CallIncomingInfo
+ {
+ internal uint Handle;
+ internal CallType Type;
+ internal string Number;
+ internal CallerNameInfo Name;
+ internal CallCliMode Cli;
+ internal CallNoCliCause Cause;
+ internal bool IsFwded;
+ internal CallActiveLine Line;
+
+ internal CallIncomingInfo()
+ {
+ }
+
+ /// <summary>
+ /// Call handle indicates the handle of the call for the application.
+ /// </summary>
+ /// <value>Call handle represented in unsigned integer format.</value>
+ public uint CallHandle
+ {
+ get
+ {
+ return Handle;
+ }
+ }
+
+ /// <summary>
+ /// Call type.
+ /// </summary>
+ /// <value>Call type indicating whether the requested call is a voice or video call.</value>
+ public CallType CallType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Caller number, null terminated ASCII.
+ /// </summary>
+ /// <value>A string representing calling party number.</value>
+ public string CallerNumber
+ {
+ get
+ {
+ return Number;
+ }
+ }
+
+ /// <summary>
+ /// Call name info. If there is no information from the network, this information will be null.
+ /// </summary>
+ /// <value>A CallerNameInfo which contains information about the calling party name.</value>
+ public CallerNameInfo NameInfo
+ {
+ get
+ {
+ return Name;
+ }
+ }
+
+ /// <summary>
+ /// CLI mode.
+ /// </summary>
+ /// <value>Enum value representing CLI mode.</value>
+ public CallCliMode CliMode
+ {
+ get
+ {
+ return Cli;
+ }
+ }
+
+ /// <summary>
+ /// No CLI cause.
+ /// </summary>
+ /// <value>Enum value representing the cause for no CLI.</value>
+ public CallNoCliCause CliCause
+ {
+ get
+ {
+ return Cause;
+ }
+ }
+
+ /// <summary>
+ /// Checks whether the incoming call is a forwarded call or not.
+ /// </summary>
+ /// <value>True or false. If the incoming call is a forwarded call, then true else false.</value>
+ public bool IsForwarded
+ {
+ get
+ {
+ return IsFwded;
+ }
+ }
+
+ /// <summary>
+ /// Current Active Line.
+ /// </summary>
+ /// <value>Enum value representing call active line.</value>
+ public CallActiveLine ActiveLine
+ {
+ get
+ {
+ return Line;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains information about call line control.
+ /// </summary>
+ public class CallRecordLineControl
+ {
+ internal byte PolarityInc;
+ internal byte Toggle;
+ internal byte ReversePol;
+ internal byte PowerTime;
+
+ internal CallRecordLineControl()
+ {
+ }
+
+ /// <summary>
+ /// Polarity included.
+ /// </summary>
+ /// <value>Polarity value represented in byte format.</value>
+ public byte PolarityIncluded
+ {
+ get
+ {
+ return PolarityInc;
+ }
+ }
+
+ /// <summary>
+ /// Toggle mode.
+ /// </summary>
+ /// <value>Toggle mode represented in byte format.</value>
+ public byte ToggleMode
+ {
+ get
+ {
+ return Toggle;
+ }
+ }
+
+ /// <summary>
+ /// Reverse polarity.
+ /// </summary>
+ /// <value>Reverse polarity value represented in byte format.</value>
+ public byte ReversePolarity
+ {
+ get
+ {
+ return ReversePol;
+ }
+ }
+
+ /// <summary>
+ /// Power denial time.
+ /// </summary>
+ /// <value>Time value in byte which represents power denial time.</value>
+ public byte PowerDenialTime
+ {
+ get
+ {
+ return PowerTime;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains information about call record.
+ /// </summary>
+ public class CallRecord
+ {
+ internal uint Id;
+ internal CallRecordType Type;
+ internal string Name;
+ internal string Number;
+ internal CallRecordLineControl LineCtrl;
+
+ internal CallRecord()
+ {
+ }
+
+ /// <summary>
+ /// Call id
+ /// </summary>
+ /// <value>Call id which is represented in unsigned integer format.</value>
+ public uint CallId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Call record type.
+ /// </summary>
+ /// <value>An enum value representing the call record type.</value>
+ public CallRecordType CallRecordType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Name record.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if CallRecordType is Name, otherwise it is null.
+ /// </remarks>
+ /// <value>Name record represented in string.</value>
+ public string NameRecord
+ {
+ get
+ {
+ return Name;
+ }
+ }
+
+ /// <summary>
+ /// Number record.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if CallRecordType is Record, otherwise it is null.
+ /// </remarks>
+ /// <value>Number record reprensented in string.</value>
+ public string NumberRecord
+ {
+ get
+ {
+ return Number;
+ }
+ }
+
+ /// <summary>
+ /// Gets the line control info.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if CallRecordType is LineControl, otherwise it is null.
+ /// </remarks>
+ /// <value>An instance of CallRecordLineControl class.</value>
+ public CallRecordLineControl LineControlInfo
+ {
+ get
+ {
+ return LineCtrl;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains information about call signal notification.
+ /// </summary>
+ public class CallSignalNotification
+ {
+ internal CallAlertSignal Signal;
+ internal CallAlertPitch Pitch;
+ internal CallToneSignal Tone;
+ internal CallIsdnAlertSignal Isdn;
+ internal CallIs54bAlertSignal Is54b;
+
+ internal CallSignalNotification()
+ {
+ }
+
+ /// <summary>
+ /// Gets the call signal type.
+ /// </summary>
+ /// <value>Signal type of the call represented as CallAlertSignal enum.</value>
+ public CallAlertSignal SignalType
+ {
+ get
+ {
+ return Signal;
+ }
+ }
+
+ /// <summary>
+ /// Gets the call pitch type.
+ /// </summary>
+ /// <value>Pitch type of the call represented as CallAlertPitch enum.</value>
+ public CallAlertPitch PitchType
+ {
+ get
+ {
+ return Pitch;
+ }
+ }
+
+ /// <summary>
+ /// Gets the call signal tone type.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if SignalType is Tone.
+ /// </remarks>
+ /// <value>Signal tone type of the call represented in CallToneSignal enum.</value>
+ public CallToneSignal ToneType
+ {
+ get
+ {
+ return Tone;
+ }
+ }
+
+ /// <summary>
+ /// Gets the signal ISDN Alert type.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if SignalType is IsdnAlert.
+ /// </remarks>
+ /// <value>Signal ISDN alert type of the call represented in CallIsdnAlertSignal enum.</value>
+ public CallIsdnAlertSignal IsdnAlertType
+ {
+ get
+ {
+ return Isdn;
+ }
+ }
+
+ /// <summary>
+ /// Gets the signal IS54B alert type.
+ /// </summary>
+ /// <remarks>
+ /// This value will be filled only if SignalType is Is54bAlert.
+ /// </remarks>
+ /// <value>Signal IS54B alerty type of the call represented in CallIs54bAlertSignal enum.</value>
+ public CallIs54bAlertSignal Is54bAlertType
+ {
+ get
+ {
+ return Is54b;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which contains information about call upgrade/downgrade request of VoLTE call.
+ /// </summary>
+ public class CallUpgradeDowngradeRequestNoti
+ {
+ internal int Handle;
+ internal CallConfigType Type;
+
+ internal CallUpgradeDowngradeRequestNoti()
+ {
+ }
+
+ /// <summary>
+ /// Gets the call handle.
+ /// </summary>
+ /// <value>Call handle value represented in integer format.</value>
+ public int CallHandle
+ {
+ get
+ {
+ return Handle;
+ }
+ }
+
+ /// <summary>
+ /// Gets the call upgrade/downgrade config type.
+ /// </summary>
+ /// <value>Call upgrade/downgrade type represented in CallConfigType enum.</value>
+ public CallConfigType UpgradeType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for call end cause.
+ /// </summary>
+ public enum CallEndCause
+ {
+ /// <summary>
+ /// No Cause.
+ /// </summary>
+ None = 0x00,
+ /// <summary>
+ /// Unassigned Number.
+ /// </summary>
+ UnassignedNumber,
+ /// <summary>
+ /// No Route to Destination.
+ /// </summary>
+ NoRouteToDestination,
+ /// <summary>
+ /// Channel Unacceptable.
+ /// </summary>
+ ChannelUnaccept,
+ /// <summary>
+ /// Operator Determined Barring.
+ /// </summary>
+ OperatorBarring,
+ /// <summary>
+ /// Normal Call Clearing.
+ /// </summary>
+ NormalCallClearing,
+ /// <summary>
+ /// User Busy.
+ /// </summary>
+ UserBusy,
+ /// <summary>
+ /// No user responding.
+ /// </summary>
+ NoUserRespond,
+ /// <summary>
+ /// User Alerting no Answer.
+ /// </summary>
+ UserAlertNoAnswer,
+ /// <summary>
+ /// Call Rejected.
+ /// </summary>
+ CallRejected,
+ /// <summary>
+ /// Number Changed.
+ /// </summary>
+ NumberChanged,
+ /// <summary>
+ /// Non Selected User Clearing.
+ /// </summary>
+ NonSelectUserClearing,
+ /// <summary>
+ /// Destination out of Order.
+ /// </summary>
+ DestinationOutOfOrder,
+ /// <summary>
+ /// Invalid Number Format.
+ /// </summary>
+ InvalidNumberFormat,
+ /// <summary>
+ /// Facility Rejected.
+ /// </summary>
+ FacilityRejected,
+ /// <summary>
+ /// Response to Status Enquiry.
+ /// </summary>
+ ResponseStatusEnquiry,
+ /// <summary>
+ /// Normal Unspecified.
+ /// </summary>
+ NormalUnspecified,
+ /// <summary>
+ /// No Circuit Channel Available.
+ /// </summary>
+ NoAvailableChannel,
+ /// <summary>
+ /// Network out of Order.
+ /// </summary>
+ NetworkOutOfOrder,
+ /// <summary>
+ /// Temporary Failure.
+ /// </summary>
+ TemporaryFailure,
+ /// <summary>
+ /// Switching Equipment Congestion.
+ /// </summary>
+ SwitchEquipmentCongestion,
+ /// <summary>
+ /// Access Information Discarded.
+ /// </summary>
+ AccessInfoDiscarded,
+ /// <summary>
+ /// Requested Circuit channel not available.
+ /// </summary>
+ NotAvailableRequestedChannel,
+ /// <summary>
+ /// Resources unavailable and unspecified.
+ /// </summary>
+ ResourceUnavailableUnspecified,
+ /// <summary>
+ /// Quality of service unavailable.
+ /// </summary>
+ ServiceQualityUnavailable,
+ /// <summary>
+ /// Requested facility not subscribed.
+ /// </summary>
+ NotSubscribedRequestedFacility,
+ /// <summary>
+ /// Incoming call barred within CUG.
+ /// </summary>
+ IncomingCallBarredWithinCug,
+ /// <summary>
+ /// Bearer capability not Authorised.
+ /// </summary>
+ BearerCapabilityUnauthorised,
+ /// <summary>
+ /// Bearer capability not presently Available.
+ /// </summary>
+ BearerCapabilityNotAvailable,
+ /// <summary>
+ /// Service or Option not available.
+ /// </summary>
+ ServiceOptionNotAvailable,
+ /// <summary>
+ /// Service not implemented.
+ /// </summary>
+ BearerServiceNotImplemented,
+ /// <summary>
+ /// ACM GEQ ACMAX.
+ /// </summary>
+ AcmGeqAcmax,
+ /// <summary>
+ /// Requested facility not implemented.
+ /// </summary>
+ RequestedFacilityNotImplemented,
+ /// <summary>
+ /// Restricted digital info BC not available
+ /// </summary>
+ OnlyRestrictedDigitalBcInfoAvailable,
+ /// <summary>
+ /// Service or Option not Implemented.
+ /// </summary>
+ ServiceOptionNotImplemented,
+ /// <summary>
+ /// Transaction ID value.
+ /// </summary>
+ TransactionIdValue,
+ /// <summary>
+ /// Not a member of CUG.
+ /// </summary>
+ UserNotCugMember,
+ /// <summary>
+ /// Incompatible Destination.
+ /// </summary>
+ IncompatibleDestination,
+ /// <summary>
+ /// Transit Network selection.
+ /// </summary>
+ TransitNetworkSelect,
+ /// <summary>
+ /// Semantically Incorrect message.
+ /// </summary>
+ SemanticIncorrectMessage,
+ /// <summary>
+ /// Invalid Mandatory Message.
+ /// </summary>
+ InvalidMandatoryInfo,
+ /// <summary>
+ /// Message Type Non Existent.
+ /// </summary>
+ MessageTypeNotExist,
+ /// <summary>
+ /// Message type not compatible with Prot state.
+ /// </summary>
+ MessageTypeNotCompatibleWithProtState,
+ /// <summary>
+ /// IE non exitent or not implemented.
+ /// </summary>
+ IeNotExistOrNotImplemented,
+ /// <summary>
+ /// Conditional IE error.
+ /// </summary>
+ ConditionalIeError,
+ /// <summary>
+ /// Not Compatible with protocol state.
+ /// </summary>
+ NotCompatibleWithProtocolState,
+ /// <summary>
+ /// Recovery on timer expiry.
+ /// </summary>
+ RecoveryOnTimeExpiry,
+ /// <summary>
+ /// Protocol error unspecified.
+ /// </summary>
+ ProtocolErrorUnspecified,
+ /// <summary>
+ /// Interworking unspecified.
+ /// </summary>
+ InterworkingUnspecified,
+ /// <summary>
+ /// Reorder.
+ /// </summary>
+ Reorder,
+ /// <summary>
+ /// End unspecified.
+ /// </summary>
+ EndUnspecified = 128,
+ /// <summary>
+ /// IMSI unknown in HLR.
+ /// </summary>
+ RejectCauseImsiUnknownInHlr,
+ /// <summary>
+ /// Illegal MS.
+ /// </summary>
+ RejectCauseIllegalMs,
+ /// <summary>
+ /// IMSI unknown in VLR.
+ /// </summary>
+ RejectCauseImsiUnknownInVlr,
+ /// <summary>
+ /// IMEI not accepted.
+ /// </summary>
+ RejectCauseImeiNotAccepted,
+ /// <summary>
+ /// Illegal ME.
+ /// </summary>
+ RejectCauseIllegalMe,
+ /// <summary>
+ /// GPRS service not allowed.
+ /// </summary>
+ RejectCauseGprsServiceNotAllowed,
+ /// <summary>
+ /// GPRS services and Non-GPRS services not allowed.
+ /// </summary>
+ RejectCauseGprsAndNonGprsServiceNotAllowed,
+ /// <summary>
+ /// MS device cannot be derived by the network.
+ /// </summary>
+ RejectCauseMsIdentityNotDerivedByNetwork,
+ /// <summary>
+ /// Implicitly detached.
+ /// </summary>
+ RejectCauseImplicitlyDetached,
+ /// <summary>
+ /// PLMN not allowed.
+ /// </summary>
+ RejectCausePlmnNotAllowed,
+ /// <summary>
+ /// LA not allowed.
+ /// </summary>
+ RejectCauseLaNotAllowed,
+ /// <summary>
+ /// National roaming not allowed.
+ /// </summary>
+ RejectCauseNationalRoamingNotAllowed,
+ /// <summary>
+ /// GPRS services not allowed in this PLMN.
+ /// </summary>
+ RejectCauseGprsServiceNotAllowedInPlmn,
+ /// <summary>
+ /// No suitable cells in the LA.
+ /// </summary>
+ RejectCauseNoSuitableCellsInLa,
+ /// <summary>
+ /// MSC temporarily not reachable.
+ /// </summary>
+ RejectCauseMscTempNotReachable,
+ /// <summary>
+ /// Network unavailable.
+ /// </summary>
+ RejectCauseNetworkFailure,
+ /// <summary>
+ /// MAC failure.
+ /// </summary>
+ RejectCauseMacFailure,
+ /// <summary>
+ /// SYNCH failure.
+ /// </summary>
+ RejectCauseSynchFailure,
+ /// <summary>
+ /// Congestion.
+ /// </summary>
+ RejectCauseCongestion,
+ /// <summary>
+ /// GSM Auth unaccepted.
+ /// </summary>
+ RejectCauseGsmAuthUnaccepted,
+ /// <summary>
+ /// Service option not supported.
+ /// </summary>
+ RejectCauseServiceOptionNotSupported,
+ /// <summary>
+ /// REQ_SERV option not suscribed.
+ /// </summary>
+ RejectCauseReqServOptionNotSubscribed,
+ /// <summary>
+ /// Service OPT out of order.
+ /// </summary>
+ RejectCauseServiceOptOutOfOrder,
+ /// <summary>
+ /// Call cannot be identified.
+ /// </summary>
+ RejectCauseCallUnidentified,
+ /// <summary>
+ /// No PDP context Activated.
+ /// </summary>
+ RejectCauseNoPdpContextActivated,
+ /// <summary>
+ /// Retry upon entry into a new call min value.
+ /// </summary>
+ RejectCauseRetryUponEntryToNewCallMinValue,
+ /// <summary>
+ /// Retry upon entry into a new call max value.
+ /// </summary>
+ RejectCauseRetryUponEntryToNewCallMaxValue,
+ /// <summary>
+ /// Semantically incorret message.
+ /// </summary>
+ RejectCauseSemanticIncorrectMessage,
+ /// <summary>
+ /// Invalid mandatory information.
+ /// </summary>
+ RejectCauseInvalidMandatoryInfo,
+ /// <summary>
+ /// Message type non-existant.
+ /// </summary>
+ RejectCauseMessageTypeNotExist,
+ /// <summary>
+ /// Message type not COMP PRT ST.
+ /// </summary>
+ RejectCauseMessageTypeNotCompPrtSt,
+ /// <summary>
+ /// IE non existent.
+ /// </summary>
+ RejectCauseIeNotExist,
+ /// <summary>
+ /// MSG not compatible protocol state.
+ /// </summary>
+ RejectCauseMessageNotCompatibleProtocolState,
+ /// <summary>
+ /// REJ unspecified.
+ /// </summary>
+ RejectCauseUnspecified,
+ /// <summary>
+ /// RR release indication.
+ /// </summary>
+ RejectCauseRrReleaseInd,
+ /// <summary>
+ /// Random Access Failure.
+ /// </summary>
+ RejectCauseRandomAccessFailure,
+ /// <summary>
+ /// RRC release indication.
+ /// </summary>
+ RejectCauseRrcReleaseInd,
+ /// <summary>
+ /// RRC close session indication.
+ /// </summary>
+ RejectCasueRrcCloseInd,
+ /// <summary>
+ /// RRC open session failure.
+ /// </summary>
+ RejectCauseRrcOpenSessionFailure,
+ /// <summary>
+ /// Low level failure.
+ /// </summary>
+ RejectCauseLowLevelFail,
+ /// <summary>
+ /// Low level failure redial not alowed.
+ /// </summary>
+ RejectCauseLowLevelFailRedialNotAllowed,
+ /// <summary>
+ /// Low level immediate retry.
+ /// </summary>
+ RejectCauseLowLevelRetry,
+ /// <summary>
+ /// Invalid SIM.
+ /// </summary>
+ RejectCauseInvalidSim,
+ /// <summary>
+ /// No service.
+ /// </summary>
+ RejectCauseNoService,
+ /// <summary>
+ /// Timer T3230 expiry.
+ /// </summary>
+ RejectCauseTimerT3230Expiry,
+ /// <summary>
+ /// No cell available.
+ /// </summary>
+ RejectCauseNoCellAvailable,
+ /// <summary>
+ /// Wrong state.
+ /// </summary>
+ RejectCauseWrongState,
+ /// <summary>
+ /// Access class blocked.
+ /// </summary>
+ RejectCauseAccessClassBlocked,
+ /// <summary>
+ /// Abort Message received.
+ /// </summary>
+ RejectCauseAbortMessageReceived,
+ /// <summary>
+ /// Other cause.
+ /// </summary>
+ OtherCause,
+ /// <summary>
+ /// Timer T303 expiry.
+ /// </summary>
+ RejectCauseTimerT303Expiry,
+ /// <summary>
+ /// Rejected due to unavailibilty of resources.
+ /// </summary>
+ RejectCauseNoResources,
+ /// <summary>
+ /// MM release pending.
+ /// </summary>
+ RejectCauseMmReleasePending,
+ /// <summary>
+ /// Invalid user data.
+ /// </summary>
+ RejectCauseInvalidUserData,
+ /// <summary>
+ /// Maximum End Cause limit for GSM/WCDMA.
+ /// </summary>
+ EndCauseMax = 255,
+ /// <summary>
+ /// Call Released by User.
+ /// </summary>
+ CdmaEndCauseReleasedByUser = 0x1001,
+ /// <summary>
+ /// Call Released by Network.
+ /// </summary>
+ CdmaEndCauseReleasedByNet,
+ /// <summary>
+ /// Call Released because the network is busy.
+ /// </summary>
+ CdmaEndCauseNetworkBusy,
+ /// <summary>
+ /// Call Released because of No Service area.
+ /// </summary>
+ CdmaEndCauseNoService,
+ /// <summary>
+ /// Call Released because of Fading.
+ /// </summary>
+ CdmaEndCauseFading,
+ /// <summary>
+ /// Call Released because of reorder.
+ /// </summary>
+ CdmaEndCauseReleaseByReorder,
+ /// <summary>
+ /// Call Released because of intercept.
+ /// </summary>
+ CdmaEndCauseReleaseByIntercept,
+ /// <summary>
+ /// Call Released because of silent zone retry.
+ /// </summary>
+ CdmaEndCauseSilentZoneRetry,
+ /// <summary>
+ /// Call Released because of OTA call failure.
+ /// </summary>
+ CdmaEndCauseOtaCallFail,
+ /// <summary>
+ /// Call Released because phone is offline.
+ /// </summary>
+ CdmaEndCausePhoneOffline,
+ /// <summary>
+ /// Call Released because CDMA is locked.
+ /// </summary>
+ CdmaEndCauseCdmaLocked,
+ /// <summary>
+ /// Call Released because of the flash-is-in-progress error.
+ /// </summary>
+ CdmaEndCauseFlashInProgressError,
+ /// <summary>
+ /// Call Released because of the e911 mode.
+ /// </summary>
+ CdmaEndCauseE911ModeError,
+ /// <summary>
+ /// Call Released by Others.
+ /// </summary>
+ CdmaEndCauseOthers,
+ /// <summary>
+ /// Maximum End Cause limit for CDMA.
+ /// </summary>
+ CdmaEndCauseMax
+ }
+
+ /// <summary>
+ /// Enumeration for call type to be used by applications.
+ /// </summary>
+ public enum CallType
+ {
+ /// <summary>
+ /// Voice call type.
+ /// </summary>
+ Voice,
+ /// <summary>
+ /// Data call type - (for modem, fax, packet, and other such calls).
+ /// </summary>
+ Data,
+ /// <summary>
+ /// Emergency call type.
+ /// </summary>
+ Emergency
+ }
+
+ /// <summary>
+ /// Enumeration for the call name mode.
+ /// </summary>
+ public enum CallNameMode
+ {
+ /// <summary>
+ /// This identifier refers to presenting the calling party's name identity to the called party.
+ /// </summary>
+ Available = 0,
+ /// <summary>
+ /// This identifier refers to restricting the name identity of the calling party from being presented to the called party.
+ /// </summary>
+ Restricted = 1,
+ /// <summary>
+ /// This identifier refers to the unavailability of the calling party's name identity from being offered to the called party.
+ /// </summary>
+ Unavailable = 2,
+ /// <summary>
+ /// This identifier refers to offering the calling party's name identity to the called party with which the presentation restriction is overridden.
+ /// </summary>
+ AvailRestricted = 3
+ }
+
+ /// <summary>
+ /// Enumeration for the "Cli mode" value.
+ /// </summary>
+ public enum CallCliMode
+ {
+ /// <summary>
+ /// Presentation Allowed.
+ /// </summary>
+ PresentationAvailable,
+ /// <summary>
+ /// Presentation Restricted.
+ /// </summary>
+ PresentationRestricted,
+ /// <summary>
+ /// Number not available.
+ /// </summary>
+ NumberUnavailable,
+ /// <summary>
+ /// Presentation default.
+ /// </summary>
+ PresentationDefault
+ }
+
+ /// <summary>
+ /// Enumeration for "No Cli cause" value.
+ /// </summary>
+ public enum CallNoCliCause
+ {
+ /// <summary>
+ /// None.
+ /// </summary>
+ None = -1,
+ /// <summary>
+ /// Unavailable.
+ /// </summary>
+ Unavailable = 0x00,
+ /// <summary>
+ /// Rejected by user.
+ /// </summary>
+ RejectByUser = 0x01,
+ /// <summary>
+ /// Other services.
+ /// </summary>
+ InteractionOtherServices = 0x02,
+ /// <summary>
+ /// Coin line phone.
+ /// </summary>
+ CoinLinePayPhone = 0x03
+ }
+
+ /// <summary>
+ /// Enumeration for call active line(IN GSM ONLY: call identification number).
+ /// </summary>
+ public enum CallActiveLine
+ {
+ /// <summary>
+ /// Line 1.
+ /// </summary>
+ Line1,
+ /// <summary>
+ /// Line 2.
+ /// </summary>
+ Line2
+ }
+
+ /// <summary>
+ /// Enumeration for the call record info type.
+ /// </summary>
+ public enum CallRecordType
+ {
+ /// <summary>
+ /// Name type.
+ /// </summary>
+ Name,
+ /// <summary>
+ /// Number type.
+ /// </summary>
+ Number,
+ /// <summary>
+ /// Line control type.
+ /// </summary>
+ LineControl
+ }
+
+ /// <summary>
+ /// Enumeration for the voice privacy option mode. (CDMA only).
+ /// </summary>
+ public enum CallPrivacyMode
+ {
+ /// <summary>
+ /// Standard mode.
+ /// </summary>
+ Standard = 0x00,
+ /// <summary>
+ /// Enhanced mode.
+ /// </summary>
+ Enhanced
+ }
+
+ /// <summary>
+ /// Enumeration for the OTASP Status. (CDMA only)
+ /// </summary>
+ public enum CallOtaspStatus
+ {
+ /// <summary>
+ /// SPL unlocked ok.
+ /// </summary>
+ SplUnlockedOk = 0x01,
+ /// <summary>
+ /// A-Key excess ok.
+ /// </summary>
+ AKeyExcessOk,
+ /// <summary>
+ /// SSD update ok.
+ /// </summary>
+ SsdUpdateOk,
+ /// <summary>
+ /// NAM download ok.
+ /// </summary>
+ NamDownloadOk,
+ /// <summary>
+ /// MDN download ok.
+ /// </summary>
+ MdnDownloadOk,
+ /// <summary>
+ /// IMSI download ok.
+ /// </summary>
+ ImsiDownloadOk,
+ /// <summary>
+ /// PRL download ok.
+ /// </summary>
+ PrlDownloadOk,
+ /// <summary>
+ /// Commit ok.
+ /// </summary>
+ CommitOk,
+ /// <summary>
+ /// Programming ok.
+ /// </summary>
+ ProgrammingOk,
+ /// <summary>
+ /// Success.
+ /// </summary>
+ Success,
+ /// <summary>
+ /// Unsuccess.
+ /// </summary>
+ Unsuccess,
+ /// <summary>
+ /// OTAPA verify ok.
+ /// </summary>
+ OtapaVerifyOk,
+ /// <summary>
+ /// Progress.
+ /// </summary>
+ Progress,
+ /// <summary>
+ /// SPC excess failure.
+ /// </summary>
+ SpcExcessFailure,
+ /// <summary>
+ /// Lock code password set.
+ /// </summary>
+ LockCodePasswordSet
+ }
+
+ /// <summary>
+ /// Enumeration for the OTAPA status. (CDMA only)
+ /// </summary>
+ public enum CallOtapaStatus
+ {
+ /// <summary>
+ /// Stop.
+ /// </summary>
+ Stop = 0x00,
+ /// <summary>
+ /// Start.
+ /// </summary>
+ Start
+ }
+
+ /// <summary>
+ /// Enumeration for call sound path.
+ /// </summary>
+ public enum SoundPath
+ {
+ /// <summary>
+ /// Audio path is handset.
+ /// </summary>
+ Handset = 0x01,
+ /// <summary>
+ /// Audio path is handset.
+ /// </summary>
+ Headset = 0x02,
+ /// <summary>
+ /// Audio path is Handsfree.
+ /// </summary>
+ Handsfree = 0x03,
+ /// <summary>
+ /// Audio path is bluetooth.
+ /// </summary>
+ Bluetooth = 0x04,
+ /// <summary>
+ /// Audio path is stereo bluetooth.
+ /// </summary>
+ StereoBluetooth = 0x05,
+ /// <summary>
+ /// Audio path is speaker phone.
+ /// </summary>
+ SpeakerPhone = 0x06,
+ /// <summary>
+ /// Audio path is headset_3_5PI.
+ /// </summary>
+ Headset35Pi = 0x07,
+ /// <summary>
+ /// Audio path Bluetooth NSEC is off.
+ /// </summary>
+ BluetoothNsecOff = 0x08,
+ /// <summary>
+ /// Audio path Mic one.
+ /// </summary>
+ Mic1 = 0x09,
+ /// <summary>
+ /// Audio path Bluetooth Mic two.
+ /// </summary>
+ Mic2 = 0x0A,
+ /// <summary>
+ /// Audio path is Bluetooth WB.
+ /// </summary>
+ BluetoothWb = 0x0B,
+ /// <summary>
+ /// Audio path is BT nsec off WB.
+ /// </summary>
+ BluetoothNsecOffWb = 0x0C,
+ /// <summary>
+ /// Audio path is headset HAC.
+ /// </summary>
+ HeadsetHac = 0x0D,
+ /// <summary>
+ /// Audio path is Bikemode Near.
+ /// </summary>
+ BikemodeNear = 0x17,
+ /// <summary>
+ /// Audio path is Bikemode Far.
+ /// </summary>
+ BikemodeFar = 0x18,
+ /// <summary>
+ /// Audio path is VoLTE handset.
+ /// </summary>
+ VolteHandset = 0x1F,
+ /// <summary>
+ /// Audio path is VoLTE headset.
+ /// </summary>
+ VolteHeadset = 0x20,
+ /// <summary>
+ /// Audio path is VoLTE Handsfree.
+ /// </summary>
+ VolteSpeaker = 0x21,
+ /// <summary>
+ /// Audio path is VoLTE bluetooth.
+ /// </summary>
+ VolteBluetooth = 0x22,
+ /// <summary>
+ /// Audio path is VoLTE stereo bluetooth.
+ /// </summary>
+ VolteStereoBluetooth = 0x23,
+ /// <summary>
+ /// Audio path is VoLTE speaker phone.
+ /// </summary>
+ VolteHeadPhone = 0x24,
+ /// <summary>
+ /// Audio path is VoLTE headset_3_5PI.
+ /// </summary>
+ VolteHeadset35Pi = 0x25,
+ /// <summary>
+ /// Audio path VoLTE Bluetooth NSEC is off.
+ /// </summary>
+ VolteBluetoothNsecOff = 0x26,
+ /// <summary>
+ /// Audio path is VoLTE Bluetooth WB.
+ /// </summary>
+ VolteBluetoothWb = 0x27,
+ /// <summary>
+ /// Audio path is VoLTE BT nsec off WB.
+ /// </summary>
+ VolteBluetoothNsecOffWb = 0x28,
+ /// <summary>
+ /// Audio path is VoLTE handset HAC.
+ /// </summary>
+ VolteHandsetHac = 0x29,
+ /// <summary>
+ /// Audio path is call forwarding.
+ /// </summary>
+ CallForward = 0x32,
+ /// <summary>
+ /// Audio path is Loopback Mic1+Ear.
+ /// </summary>
+ HeadsetMic1 = 0x33,
+ /// <summary>
+ /// Audio path is Loopback Mic2+Ear.
+ /// </summary>
+ HeadsetMic2 = 0x34,
+ /// <summary>
+ /// Audio path is Loopback Mic3+Ear.
+ /// </summary>
+ HeadsetMic3 = 0x35
+ }
+
+ /// <summary>
+ /// Enumeration for the Alert Signal Type. (CDMA only)
+ /// </summary>
+ public enum CallAlertSignal
+ {
+ /// <summary>
+ /// Tone.
+ /// </summary>
+ Tone = 0x00,
+ /// <summary>
+ /// ISDN Alerting.
+ /// </summary>
+ IsdnAlert,
+ /// <summary>
+ /// IS54B Alerting.
+ /// </summary>
+ Is54bAlert,
+ /// <summary>
+ /// Reserved.
+ /// </summary>
+ Reserved
+ }
+
+ /// <summary>
+ /// Enumeration for the Alert Pitch Type. (CDMA only)
+ /// </summary>
+ public enum CallAlertPitch
+ {
+ /// <summary>
+ /// Alert Pitch Medium.
+ /// </summary>
+ Medium = 0x00,
+ /// <summary>
+ /// Alert Pitch High.
+ /// </summary>
+ High,
+ /// <summary>
+ /// Alert Pitch Low.
+ /// </summary>
+ Low,
+ /// <summary>
+ /// Reserved.
+ /// </summary>
+ Reserved
+ }
+
+ /// <summary>
+ /// Enumeration for the signals specific to the alert signal type. (CDMA only)
+ /// </summary>
+ public enum CallToneSignal
+ {
+ /// <summary>
+ /// Dial.
+ /// </summary>
+ Dial = 0x00,
+ /// <summary>
+ /// Ringback Tone ON.
+ /// </summary>
+ RingbackToneOn,
+ /// <summary>
+ /// Intercept Tone ON.
+ /// </summary>
+ InterceptToneOn,
+ /// <summary>
+ /// Abbreviation Tone.
+ /// </summary>
+ AbbreviationTone,
+ /// <summary>
+ /// Network Congestion Tone ON.
+ /// </summary>
+ NetworkCongestionToneOn,
+ /// <summary>
+ /// Abbreviation Network Congestion.
+ /// </summary>
+ AbbreviationNetworkCongestion,
+ /// <summary>
+ /// Busy Tone ON>
+ /// </summary>
+ BusyToneOn,
+ /// <summary>
+ /// CFRM Tone ON.
+ /// </summary>
+ CfrmToneOn,
+ /// <summary>
+ /// Answer Tone ON.
+ /// </summary>
+ AnswerToneOn,
+ /// <summary>
+ /// Call Waiting Tone ON.
+ /// </summary>
+ CallWaitingToneOn,
+ /// <summary>
+ /// Pipe Tone ON.
+ /// </summary>
+ PipeToneOn,
+ /// <summary>
+ /// Tone OFF.
+ /// </summary>
+ Off
+ }
+
+ /// <summary>
+ /// Enumeration for the call ISDN Alert signal. (CDMA only)
+ /// </summary>
+ public enum CallIsdnAlertSignal
+ {
+ /// <summary>
+ /// Normal.
+ /// </summary>
+ Normal = 0x00,
+ /// <summary>
+ /// Inter group.
+ /// </summary>
+ InterGroup,
+ /// <summary>
+ /// Special Priority.
+ /// </summary>
+ SpecialPriority,
+ /// <summary>
+ /// ISDN Reserved1.
+ /// </summary>
+ IsdnReserved1,
+ /// <summary>
+ /// Ping Ring.
+ /// </summary>
+ PingRing,
+ /// <summary>
+ /// ISDN Reserved2.
+ /// </summary>
+ IsdnReserved2,
+ /// <summary>
+ /// ISDN Reserved3.
+ /// </summary>
+ IsdnReserved3,
+ /// <summary>
+ /// ISDN Reserved4.
+ /// </summary>
+ IsdnReserved4,
+ /// <summary>
+ /// Alert OFF.
+ /// </summary>
+ Off
+ }
+
+ /// <summary>
+ /// Enumeration for the call IS54B Alert signal types.
+ /// </summary>
+ public enum CallIs54bAlertSignal
+ {
+ /// <summary>
+ /// No Tone.
+ /// </summary>
+ NoTone = 0x00,
+ /// <summary>
+ /// Long.
+ /// </summary>
+ Long,
+ /// <summary>
+ /// Short Short.
+ /// </summary>
+ ShortShort,
+ /// <summary>
+ /// Short Short Long.
+ /// </summary>
+ ShortShortLong,
+ /// <summary>
+ /// Short Short 2.
+ /// </summary>
+ ShortShort2,
+ /// <summary>
+ /// Short Long Short.
+ /// </summary>
+ ShortLongShort,
+ /// <summary>
+ /// Short Short Short Short.
+ /// </summary>
+ ShortShortShortShort,
+ /// <summary>
+ /// PBX Long.
+ /// </summary>
+ PbxLong,
+ /// <summary>
+ /// PBX(Private Branch Exchange) Short Short.
+ /// </summary>
+ PbxShortShort,
+ /// <summary>
+ /// PBX Short Short Long.
+ /// </summary>
+ PbxShortShortLong,
+ /// <summary>
+ /// PBX Short Long Short.
+ /// </summary>
+ PbxShortLongShort,
+ /// <summary>
+ /// PBX Short Short Short Short.
+ /// </summary>
+ PbxShortShortShortShort,
+ /// <summary>
+ /// PIP PIP PIP PIP.
+ /// </summary>
+ PipPipPipPip
+ }
+
+ /// <summary>
+ /// Enumeration for call sound ringback tone notification data.
+ /// </summary>
+ public enum CallSoundRingbackNoti
+ {
+ /// <summary>
+ /// Ringback Tone End.
+ /// </summary>
+ End,
+ /// <summary>
+ /// Ringback Tone Start.
+ /// </summary>
+ Start
+ }
+
+ /// <summary>
+ /// Enumeration for call sound WBAMR notification data.
+ /// </summary>
+ public enum CallSoundWbamrNoti
+ {
+ /// <summary>
+ /// Status OFF.
+ /// </summary>
+ Off,
+ /// <summary>
+ /// Status ON.
+ /// </summary>
+ On,
+ /// <summary>
+ /// Status OFF 16k.
+ /// </summary>
+ Off16k,
+ /// <summary>
+ /// Status ON 8k.
+ /// </summary>
+ On8k
+ }
+
+ /// <summary>
+ /// Enumeration for call sound noise reduction.
+ /// </summary>
+ public enum CallSoundNoiseReduction
+ {
+ /// <summary>
+ /// Sound noise reduction off.
+ /// </summary>
+ Off,
+ /// <summary>
+ /// Sound noise reduction on.
+ /// </summary>
+ On
+ }
+
+ /// <summary>
+ /// Enumeration for call preferred voice subscription.
+ /// </summary>
+ public enum CallPreferredVoiceSubscription
+ {
+ /// <summary>
+ /// Unknown status.
+ /// </summary>
+ Unknown = -1,
+ /// <summary>
+ /// Current network.
+ /// </summary>
+ CurrentNetwork = 0,
+ /// <summary>
+ /// Ask Always.
+ /// </summary>
+ AskAlways,
+ /// <summary>
+ /// Sim 1.
+ /// </summary>
+ Sim1,
+ /// <summary>
+ /// Sim 2.
+ /// </summary>
+ Sim2
+ }
+
+ /// <summary>
+ /// Enumeration for specifying type for call upgrade/downgrade.
+ /// </summary>
+ public enum CallConfigType
+ {
+ /// <summary>
+ /// Call type is invalid.
+ /// </summary>
+ Invalid = -1,
+ /// <summary>
+ /// Call type is Audio.
+ /// </summary>
+ Audio = 2,
+ /// <summary>
+ /// Call type is Video Share TX.
+ /// </summary>
+ VideoShareTx = 3,
+ /// <summary>
+ /// Call type is Video Share RX.
+ /// </summary>
+ VideoShareRx = 4,
+ /// <summary>
+ /// Call type is Inbound Video Call.
+ /// </summary>
+ InboundVideoCall = 5,
+ /// <summary>
+ /// Call type is HD Video.
+ /// </summary>
+ HdVideo = 6,
+ /// <summary>
+ /// Call type is Video Conference.
+ /// </summary>
+ VideoConference = 7,
+ /// <summary>
+ /// Call type is QCIF Video Conference.
+ /// </summary>
+ QcifVideoConference = 8,
+ /// <summary>
+ /// Call type is QVGA.
+ /// </summary>
+ QvgaVideo = 9,
+ /// <summary>
+ /// Call type is QCIF Video.
+ /// </summary>
+ QcifVideo = 10,
+ /// <summary>
+ /// Call type is tty Full.
+ /// </summary>
+ TtyFull = 11,
+ /// <summary>
+ /// Call type is tty HCO.
+ /// </summary>
+ TtyHco = 12,
+ /// <summary>
+ /// Call type is tty VCO.
+ /// </summary>
+ TtyVco = 13,
+ /// <summary>
+ /// Call type USSD.
+ /// </summary>
+ Ussd = 14,
+ /// <summary>
+ /// Call type is HDVideo Land.
+ /// </summary>
+ HdVideoLand = 15,
+ /// <summary>
+ /// Call type is E911 - Emergency Call.
+ /// </summary>
+ E911 = 20,
+ /// <summary>
+ /// Call type is Audio conference.
+ /// </summary>
+ AudioConference = 21,
+ /// <summary>
+ /// Call type is E911 Emergency video call.
+ /// </summary>
+ E911Video = 22,
+ /// <summary>
+ /// Call type is E911 Emergency video call HD.
+ /// </summary>
+ E911VideoHd = 23,
+ /// <summary>
+ /// Call type is E911 Emergency video call HD Land.
+ /// </summary>
+ E911VideoHdLand = 24,
+ /// <summary>
+ /// Call type is E911 Emergency video call Land.
+ /// </summary>
+ E911VideoLand = 25,
+ /// <summary>
+ /// Call type is E911 Emergency video call HD QVGA Land.
+ /// </summary>
+ E911VideoHdQvgaLand = 26,
+ /// <summary>
+ /// Call type is CIF Video Call.
+ /// </summary>
+ CifVideo = 27,
+ /// <summary>
+ /// Call type is HD 720 video call.
+ /// </summary>
+ Hd720Video = 28,
+ /// <summary>
+ /// Call type is E911 video hold call.
+ /// </summary>
+ VideoHold = 29,
+ /// <summary>
+ /// Call type is switch VOIP to VT call.
+ /// </summary>
+ VoipToVtInProgress = 30
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.InteropServices;
+
+namespace Tizen.Tapi
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallIdleStatusNotiStruct
+ {
+ internal uint Id;
+ internal CallEndCause Cause;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallIncomingInfoStruct
+ {
+ internal uint Handle;
+ internal CallType Type;
+ [MarshalAs(UnmanagedType.LPStr)]
+ internal string CallerNumber;
+ internal CallerName NameData;
+ internal CallCliMode CliMode;
+ internal CallNoCliCause CliCause;
+ internal int IsForwarded;
+ internal CallActiveLine ActiveLine;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallerName
+ {
+ internal CallNameMode NameMode;
+ [MarshalAs(UnmanagedType.LPStr)]
+ internal string Name;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallRecordLineControlStruct
+ {
+ internal byte PolarityIncluded;
+ internal byte ToggleMode;
+ internal byte ReversePolarity;
+ internal byte PowerDenialTime;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ internal struct CallRecordDataStruct
+ {
+ [MarshalAs(UnmanagedType.LPStr)]
+ [FieldOffset(0)]
+ internal string Name;
+ [MarshalAs(UnmanagedType.LPStr)]
+ [FieldOffset(0)]
+ internal string Number;
+ [FieldOffset(0)]
+ internal CallRecordLineControlStruct LineCtrl;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallRecordStruct
+ {
+ internal uint Id;
+ internal CallRecordType Type;
+ internal CallRecordDataStruct Data;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ internal struct CallSignalStruct
+ {
+ [FieldOffset(0)]
+ internal CallToneSignal SignalTone;
+ [FieldOffset(0)]
+ internal CallIsdnAlertSignal IsdnAlert;
+ [FieldOffset(0)]
+ internal CallIs54bAlertSignal Is54bAlert;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallSignalInfoStruct
+ {
+ internal CallAlertSignal SignalType;
+ internal CallAlertPitch PitchType;
+ internal CallSignalStruct CallSignal;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct CallUpgradeDowngradeNotiStruct
+ {
+ internal int CallHandle;
+ internal CallConfigType ConfigType;
+ }
+
+ internal static class CallStructConversions
+ {
+ internal static CallIdleStatusNotificationData ConvertCallIdleStatusNoti(CallIdleStatusNotiStruct idleStatusNoti)
+ {
+ CallIdleStatusNotificationData idleStatusNotiData = new CallIdleStatusNotificationData();
+ idleStatusNotiData.Id = idleStatusNoti.Id;
+ idleStatusNotiData.Cause = idleStatusNoti.Cause;
+ return idleStatusNotiData;
+ }
+
+ internal static CallIncomingInfo ConvertIncomingCallInfo(CallIncomingInfoStruct incomingInfo)
+ {
+ CallIncomingInfo callIncoming = new CallIncomingInfo();
+ callIncoming.Handle = incomingInfo.Handle;
+ callIncoming.Type = incomingInfo.Type;
+ callIncoming.Number = incomingInfo.CallerNumber;
+ CallerNameInfo nameData = new CallerNameInfo();
+ nameData.Mode = incomingInfo.NameData.NameMode;
+ nameData.NameData = incomingInfo.NameData.Name;
+
+ callIncoming.Name = nameData;
+ callIncoming.Cli = incomingInfo.CliMode;
+ callIncoming.Cause = incomingInfo.CliCause;
+ if (incomingInfo.IsForwarded == 1)
+ {
+ callIncoming.IsFwded = true;
+ }
+
+ else if (incomingInfo.IsForwarded == 0)
+ {
+ callIncoming.IsFwded = false;
+ }
+
+ callIncoming.Line = incomingInfo.ActiveLine;
+
+ return callIncoming;
+ }
+
+ internal static CallRecord ConvertCallRecordStruct(CallRecordStruct record)
+ {
+ CallRecord recordData = new CallRecord();
+ recordData.Id = record.Id;
+ recordData.Type = record.Type;
+ if (record.Type == CallRecordType.Name)
+ {
+ recordData.Name = record.Data.Name;
+ }
+
+ else if (record.Type == CallRecordType.Number)
+ {
+ recordData.Number = record.Data.Number;
+ }
+
+ else if (record.Type == CallRecordType.LineControl)
+ {
+ CallRecordLineControl lineCtrl = new CallRecordLineControl();
+ lineCtrl.PolarityInc = record.Data.LineCtrl.PolarityIncluded;
+ lineCtrl.Toggle = record.Data.LineCtrl.ToggleMode;
+ lineCtrl.ReversePol = record.Data.LineCtrl.ReversePolarity;
+ lineCtrl.PowerTime = record.Data.LineCtrl.PowerDenialTime;
+ recordData.LineCtrl = lineCtrl;
+ }
+
+ return recordData;
+ }
+
+ internal static CallSignalNotification ConvertCallSignalInfo(CallSignalInfoStruct signalInfo)
+ {
+ CallSignalNotification signalNoti = new CallSignalNotification();
+ signalNoti.Signal = signalInfo.SignalType;
+ signalNoti.Pitch = signalInfo.PitchType;
+ if (signalInfo.SignalType == CallAlertSignal.Tone)
+ {
+ signalNoti.Tone = signalInfo.CallSignal.SignalTone;
+ }
+
+ else if (signalInfo.SignalType == CallAlertSignal.IsdnAlert)
+ {
+ signalNoti.Isdn = signalInfo.CallSignal.IsdnAlert;
+ }
+
+ else if (signalInfo.SignalType == CallAlertSignal.Is54bAlert)
+ {
+ signalNoti.Is54b = signalInfo.CallSignal.Is54bAlert;
+ }
+
+ return signalNoti;
+ }
+
+ internal static CallUpgradeDowngradeRequestNoti ConvertCallUpgradeNoti(CallUpgradeDowngradeNotiStruct notiStruct)
+ {
+ CallUpgradeDowngradeRequestNoti requestNoti = new CallUpgradeDowngradeRequestNoti();
+ requestNoti.Handle = notiStruct.CallHandle;
+ requestNoti.Type = notiStruct.ConfigType;
+ return requestNoti;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for the phone power status values.
+ /// </summary>
+ public enum PhonePowerStatus
+ {
+ /// <summary>
+ /// Unknown.
+ /// </summary>
+ Unknown = -1,
+ /// <summary>
+ /// Power on.
+ /// </summary>
+ On,
+ /// <summary>
+ /// Power off.
+ /// </summary>
+ Off,
+ /// <summary>
+ /// Power reset.
+ /// </summary>
+ Reset,
+ /// <summary>
+ /// Power low.
+ /// </summary>
+ Low,
+ /// <summary>
+ /// Error.
+ /// </summary>
+ Error
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for the storage types to be selected in the SIM or USIM.
+ /// </summary>
+ public enum PhonebookType
+ {
+ /// <summary>
+ /// Fixed Dialing Number.
+ /// </summary>
+ Fdn,
+ /// <summary>
+ /// Sim - ADN.
+ /// </summary>
+ Adn,
+ /// <summary>
+ /// Service Dialing Number.
+ /// </summary>
+ Sdn,
+ /// <summary>
+ /// USIM - 3G phone book.
+ /// </summary>
+ Usim,
+ /// <summary>
+ /// Additional number Alpha String.
+ /// </summary>
+ Aas,
+ /// <summary>
+ /// Grouping identifier Alpha String.
+ /// </summary>
+ Gas,
+ /// <summary>
+ /// Unknown file type.
+ /// </summary>
+ Unknown = 0xFF
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.InteropServices;
+
+namespace Tizen.Tapi
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct PhonebookRecordStruct
+ {
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.Generic;
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// A class which defines SAT main menu info.
+ /// </summary>
+ public class SatMainMenuInfo
+ {
+ internal int Id;
+ internal bool IsPresent;
+ internal string Title;
+ internal IEnumerable<SatMenuInfo> Items;
+ internal ushort Num;
+ internal bool IsHelpInfo;
+ internal bool IsUpdated;
+ internal SatIconIdInfo IcnId;
+ internal SatIconIdListInfo IdList;
+
+ internal SatMainMenuInfo()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command number represented in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Flag for checking whether main menu is present or not.
+ /// </summary>
+ /// <value>Boolean value checking the presence of main menu.</value>
+ public bool IsMainMenuPresent
+ {
+ get
+ {
+ return IsPresent;
+ }
+ }
+
+ /// <summary>
+ /// Menu title text.
+ /// </summary>
+ /// <value>Title text of the menu item represented in string.</value>
+ public string MenuTitle
+ {
+ get
+ {
+ return Title;
+ }
+ }
+
+ /// <summary>
+ /// Menu items.
+ /// </summary>
+ /// <value>List of SatMenuInfo objects.</value>
+ public IEnumerable<SatMenuInfo> MenuItems
+ {
+ get
+ {
+ return Items;
+ }
+ }
+
+ /// <summary>
+ /// Number of menu itmes.
+ /// </summary>
+ /// <value>An unsigned value representing the number of menu items.</value>
+ public ushort MainMenuCount
+ {
+ get
+ {
+ return Num;
+ }
+ }
+
+ /// <summary>
+ /// Flag for a help information request.
+ /// </summary>
+ /// <value>Boolean value for checking the flag for help information request.</value>
+ public bool IsMainMenuHelpInfo
+ {
+ get
+ {
+ return IsHelpInfo;
+ }
+ }
+
+ /// <summary>
+ /// Updated Sat main menu or not.
+ /// </summary>
+ /// <value>Boolean value to check whether Sat main menu is updated or not.</value>
+ public bool IsUpdatedMainMenu
+ {
+ get
+ {
+ return IsUpdated;
+ }
+ }
+
+ /// <summary>
+ /// Icon Identifier.
+ /// </summary>
+ /// <value>An instance of SatIconIdInfo class representing the icon identifier.</value>
+ public SatIconIdInfo IconId
+ {
+ get
+ {
+ return IcnId;
+ }
+ }
+
+ /// <summary>
+ /// List of Icon Identifiers.
+ /// </summary>
+ /// <value>An instance of SatIconIdListInfo class representing the icon identifier list.</value>
+ public SatIconIdListInfo IconIdList
+ {
+ get
+ {
+ return IdList;
+ }
+ }
+ }
+
+
+ /// <summary>
+ /// A class which contains menu item information for the setup menu.
+ /// </summary>
+ public class SatMenuInfo
+ {
+ internal string Item;
+ internal char Id;
+
+ internal SatMenuInfo()
+ {
+ }
+
+ /// <summary>
+ /// Menu item character data.
+ /// </summary>
+ /// <value>Menu item data represented in string.</value>
+ public string MenuItem
+ {
+ get
+ {
+ return Item;
+ }
+ }
+
+ /// <summary>
+ /// Identifies the item on the menu that the user selected.
+ /// </summary>
+ /// <value>Item identifier value represented as a character.</value>
+ public char ItemId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class defining the icon data object.
+ /// </summary>
+ public class SatIconIdInfo
+ {
+ internal bool IsPresent;
+ internal SatIconQualifierType Qualifier;
+ internal byte Id;
+ internal SatIconInfo Info;
+
+ internal SatIconIdInfo()
+ {
+ }
+
+ /// <summary>
+ /// Flag for checking whether the icon identifier exists.
+ /// </summary>
+ /// <value>Boolean value representing if the icon exists or not.</value>
+ public bool IsIconPresent
+ {
+ get
+ {
+ return IsPresent;
+ }
+ }
+
+ /// <summary>
+ /// Icon qualifier type.
+ /// </summary>
+ /// <value>Icon qualifier type represented as SatIconQualifierType enum.</value>
+ public SatIconQualifierType IconQualifier
+ {
+ get
+ {
+ return Qualifier;
+ }
+ }
+
+ /// <summary>
+ /// Icon identifier.
+ /// </summary>
+ /// <value>A byte value representing the icon identifier.</value>
+ public byte IconId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Icon info.
+ /// </summary>
+ /// <value>An instance of SatIconInfo class.</value>
+ public SatIconInfo IconInfo
+ {
+ get
+ {
+ return Info;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class containing the definition of icon info object.
+ /// </summary>
+ public class SatIconInfo
+ {
+ internal byte IconWidth;
+ internal byte IconHeight;
+ internal SatImageCodingScheme Scheme;
+ internal ushort IconLength;
+ internal ushort ClutLength;
+ internal string IcnFile;
+ internal string CltFile;
+
+ internal SatIconInfo()
+ {
+ }
+
+ /// <summary>
+ /// Icon width.
+ /// </summary>
+ /// <value>Width of the icon represented in byte.</value>
+ public byte Width
+ {
+ get
+ {
+ return IconWidth;
+ }
+ }
+
+ /// <summary>
+ /// Icon height.
+ /// </summary>
+ /// <value>Height of the icon represented in byte.</value>
+ public byte Height
+ {
+ get
+ {
+ return IconHeight;
+ }
+ }
+
+ /// <summary>
+ /// Image coding scheme.
+ /// </summary>
+ /// <value>Image coding scheme represented as SatImageCodingScheme enum.</value>
+ public SatImageCodingScheme Ics
+ {
+ get
+ {
+ return Scheme;
+ }
+ }
+
+ /// <summary>
+ /// Icon data length.
+ /// </summary>
+ /// <value>Data length of the icon represented in ushort.</value>
+ public ushort IconDataLength
+ {
+ get
+ {
+ return IconLength;
+ }
+ }
+
+ /// <summary>
+ /// Clut data length.
+ /// </summary>
+ /// <value>Data length of the clut represented in ushort.</value>
+ public ushort ClutDataLength
+ {
+ get
+ {
+ return ClutLength;
+ }
+ }
+
+ /// <summary>
+ /// Icon file.
+ /// </summary>
+ /// <value>Icon file string.</value>
+ public string IconFile
+ {
+ get
+ {
+ return IcnFile;
+ }
+ }
+
+ /// <summary>
+ /// Clut file.
+ /// </summary>
+ /// <value>Clut file string.</value>
+ public string ClutFile
+ {
+ get
+ {
+ return CltFile;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines the icon identifier data object.
+ /// </summary>
+ public class SatIconIdListInfo
+ {
+ internal bool IsPresent;
+ internal SatIconQualifierType Qualifier;
+ internal byte Count;
+ internal byte[] IconList;
+ internal IEnumerable<SatIconInfo> Info;
+
+ internal SatIconIdListInfo()
+ {
+ }
+
+ /// <summary>
+ /// Flag for checking whether the icon identifier exists.
+ /// </summary>
+ /// <value>Boolean value indicating the presence of icon.</value>
+ public bool IsIconPresent
+ {
+ get
+ {
+ return IsPresent;
+ }
+ }
+
+ /// <summary>
+ /// Icon list qualifier.
+ /// </summary>
+ /// <value>Icon list qualifier represented in SatIconQualifierType enum.</value>
+ public SatIconQualifierType IconListQualifier
+ {
+ get
+ {
+ return Qualifier;
+ }
+ }
+
+ /// <summary>
+ /// Number of icons.
+ /// </summary>
+ /// <value>Byte value indicating the number of icons.</value>
+ public byte IconCount
+ {
+ get
+ {
+ return Count;
+ }
+ }
+
+ /// <summary>
+ /// Icon identifier list.
+ /// </summary>
+ /// <value>A byte array containing the list of Icon identifier.</value>
+ public byte[] IconIdList
+ {
+ get
+ {
+ return IconList;
+ }
+ }
+
+ /// <summary>
+ /// Icon list info.
+ /// </summary>
+ /// <value>List of icon info.</value>
+ public IEnumerable<SatIconInfo> IconInfo
+ {
+ get
+ {
+ return Info;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class containing display text proactive command for SAT UI.
+ /// </summary>
+ public class SatDisplayTextData
+ {
+ internal int Id;
+ internal SatTextInfo Text;
+ internal uint Drtn;
+ internal bool IsPrtyHigh;
+ internal bool IsRespRequired;
+ internal bool IsImmediateResp;
+ internal SatIconIdInfo IcnId;
+
+ internal SatDisplayTextData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command id in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Character data to display on screen.
+ /// </summary>
+ /// <value>An instance of SatTextInfo containing text information.</value>
+ public SatTextInfo TextInfo
+ {
+ get
+ {
+ return Text;
+ }
+ }
+
+ /// <summary>
+ /// Duration of the display.
+ /// </summary>
+ /// <value>Duration in integer format.</value>
+ public uint Duration
+ {
+ get
+ {
+ return Drtn;
+ }
+ }
+
+ /// <summary>
+ /// Flag that indicates whether text is to be displayed if some other app is using the screen.
+ /// </summary>
+ /// <value>Boolean value checking the priority of the display.</value>
+ public bool IsPriorityHigh
+ {
+ get
+ {
+ return IsPrtyHigh;
+ }
+ }
+
+ /// <summary>
+ /// Flag that indicates whether user response is required.
+ /// </summary>
+ /// <value>Boolean value to check the need of user response.</value>
+ public bool IsUserResponseRequired
+ {
+ get
+ {
+ return IsRespRequired;
+ }
+ }
+
+ /// <summary>
+ /// Flag for checking whether immediate response is required.
+ /// </summary>
+ /// <value>Boolean value to check the immediate response status.</value>
+ public bool IsImmediateResponse
+ {
+ get
+ {
+ return IsImmediateResp;
+ }
+ }
+
+ /// <summary>
+ /// Icon Identifier.
+ /// </summary>
+ /// <value>An instance of SatIconIdInfo class.</value>
+ public SatIconIdInfo IconId
+ {
+ get
+ {
+ return IcnId;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class defining character data for the SAT engine data structure.
+ /// </summary>
+ public class SatTextInfo
+ {
+ internal ushort Length;
+ internal byte[] Data;
+
+ internal SatTextInfo()
+ {
+ }
+
+ /// <summary>
+ /// Character data length.
+ /// </summary>
+ /// <value>An unsigned short value representing the string length.</value>
+ public ushort StringLength
+ {
+ get
+ {
+ return Length;
+ }
+ }
+
+ /// <summary>
+ /// Character data.
+ /// </summary>
+ /// <value>A byte array representing the string data.</value>
+ public byte[] StringData
+ {
+ get
+ {
+ return Data;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines select item proactive command data for SAT UI.
+ /// </summary>
+ public class SatSelectItemData
+ {
+ internal int Id;
+ internal bool IsHelpAvailable;
+ internal SatTextInfo Text;
+ internal char DefaultIndex;
+ internal char ItemCount;
+ internal IEnumerable<SatMenuItemInfo> Items;
+ internal SatIconIdInfo IcnId;
+ internal SatIconIdListInfo IdList;
+
+ internal SatSelectItemData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command id represented in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Flag for a help information request.
+ /// </summary>
+ /// <value>Boolean value to check whether help information is availale or not.</value>
+ public bool IsHelpInfoAvailable
+ {
+ get
+ {
+ return IsHelpAvailable;
+ }
+ }
+
+ /// <summary>
+ /// Menu title text.
+ /// </summary>
+ /// <value>An instance of SatTextInfo class containing the text information.</value>
+ public SatTextInfo TextInfo
+ {
+ get
+ {
+ return Text;
+ }
+ }
+
+ /// <summary>
+ /// Selected default item.
+ /// </summary>
+ /// <value>Default item index of the given items.</value>
+ public char DefaultItemIndex
+ {
+ get
+ {
+ return DefaultIndex;
+ }
+ }
+
+ /// <summary>
+ /// Number of menu items.
+ /// </summary>
+ /// <value>Menu items count represented as a character.</value>
+ public char MenuItemCount
+ {
+ get
+ {
+ return ItemCount;
+ }
+ }
+
+ /// <summary>
+ /// Menu items.
+ /// </summary>
+ /// <value>A list of SatMenuItemInfo objects.</value>
+ public IEnumerable<SatMenuItemInfo> MenuItems
+ {
+ get
+ {
+ return Items;
+ }
+ }
+
+ /// <summary>
+ /// Icon Identifier.
+ /// </summary>
+ /// <value>An instance of SatIconIdInfo class.</value>
+ public SatIconIdInfo IconId
+ {
+ get
+ {
+ return IcnId;
+ }
+ }
+
+ /// <summary>
+ /// List of Icon Identifiers.
+ /// </summary>
+ /// <value>An instance of SatIconIdListInfo class containing the list of icon identifiers.</value>
+ public SatIconIdListInfo IconIdList
+ {
+ get
+ {
+ return IdList;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines the menu item data object.
+ /// </summary>
+ public class SatMenuItemInfo
+ {
+ internal byte Id;
+ internal byte Length;
+ internal byte[] Txt;
+
+ internal SatMenuItemInfo()
+ {
+ }
+
+ /// <summary>
+ /// Item identifier.
+ /// </summary>
+ /// <value>Item Id represented in byte.</value>
+ public byte ItemId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Text length.
+ /// </summary>
+ /// <value>Length of the text represented in byte.</value>
+ public byte TextLength
+ {
+ get
+ {
+ return Length;
+ }
+ }
+
+ /// <summary>
+ /// Text information.
+ /// </summary>
+ /// <value>A byte array of length TextLength containing the text information.</value>
+ public byte[] Text
+ {
+ get
+ {
+ return Txt;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines get inkey proactive command data for SAT UI.
+ /// </summary>
+ public class SatGetInKeyData
+ {
+ internal int Id;
+ internal SatInKeyType Type;
+ internal SatInputAlphabetType AlphabetType;
+ internal bool IsNumericFlag;
+ internal bool IsHelpAvailable;
+ internal SatTextInfo Text;
+ internal uint Duratn;
+ internal SatIconIdInfo IcnId;
+
+ internal SatGetInKeyData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command id represented in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Input Type.
+ /// </summary>
+ /// <value>Character Set or Yes/No.</value>
+ public SatInKeyType KeyType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Input character mode.
+ /// </summary>
+ /// <value>SMS default, UCS2.</value>
+ public SatInputAlphabetType InputAlphabetType
+ {
+ get
+ {
+ return AlphabetType;
+ }
+ }
+
+ /// <summary>
+ /// Flag for checking whether input character is numeric.
+ /// </summary>
+ /// <value>Boolean value for checking whether input character is numeric or not.</value>
+ public bool IsNumeric
+ {
+ get
+ {
+ return IsNumericFlag;
+ }
+ }
+
+ /// <summary>
+ /// Help info request flag.
+ /// </summary>
+ /// <value>Boolean value for checking whether help info is available or not.</value>
+ public bool IsHelpInfoAvailable
+ {
+ get
+ {
+ return IsHelpAvailable;
+ }
+ }
+
+ /// <summary>
+ /// Character data to display on the screen.
+ /// </summary>
+ /// <value>An instance of SatTextInfo class containing the text information.</value>
+ public SatTextInfo TextInfo
+ {
+ get
+ {
+ return Text;
+ }
+ }
+
+ /// <summary>
+ /// Duration of the display.
+ /// </summary>
+ /// <value>Display duration represented in unsigned integer.</value>
+ public uint Duration
+ {
+ get
+ {
+ return Duratn;
+ }
+ }
+
+ /// <summary>
+ /// Icon identifier.
+ /// </summary>
+ /// <value>An instance of SatIconIdInfo class containing the Icon identifier information.</value>
+ public SatIconIdInfo IconId
+ {
+ get
+ {
+ return IcnId;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines get input proactive command data for SAT UI.
+ /// </summary>
+ public class SatGetInputData
+ {
+ internal int Id;
+ internal SatInputAlphabetType Type;
+ internal bool IsNumericFlag;
+ internal bool IsHelpAvailable;
+ internal bool IsEcho;
+ internal SatTextInfo Text;
+ internal SatResponseLengthInfo RespLength;
+ internal SatTextInfo Default;
+ internal SatIconIdInfo IcnId;
+
+ internal SatGetInputData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command id represented in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Input character mode.
+ /// </summary>
+ /// <value>SMS default, UCS2.</value>
+ public SatInputAlphabetType AlphabetType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Flag to check whether input character is numeric.
+ /// </summary>
+ /// <value>Boolean value to check the nature of input character.</value>
+ public bool IsNumeric
+ {
+ get
+ {
+ return IsNumericFlag;
+ }
+ }
+
+ /// <summary>
+ /// Help info request flag.
+ /// </summary>
+ /// <value>Boolean value to check help information availability.</value>
+ public bool IsHelpInfoAvailable
+ {
+ get
+ {
+ return IsHelpAvailable;
+ }
+ }
+
+ /// <summary>
+ /// Flag that indicates whether to show input data on the screen.
+ /// </summary>
+ /// <value>Boolean value to check the availability of input data on the screen.</value>
+ public bool IsEchoInput
+ {
+ get
+ {
+ return IsEcho;
+ }
+ }
+
+ /// <summary>
+ /// Character data to display on the screen.
+ /// </summary>
+ /// <value>An instance of SatTextInfo.</value>
+ public SatTextInfo TextInfo
+ {
+ get
+ {
+ return Text;
+ }
+ }
+
+ /// <summary>
+ /// Input data min, max length.
+ /// </summary>
+ /// <value>An instance of SatResponseLengthInfo.</value>
+ public SatResponseLengthInfo ResponseLength
+ {
+ get
+ {
+ return RespLength;
+ }
+ }
+
+ /// <summary>
+ /// Default input character data.
+ /// </summary>
+ /// <value>An instance of SatTextInfo.</value>
+ public SatTextInfo DefualtText
+ {
+ get
+ {
+ return Default;
+ }
+ }
+
+ /// <summary>
+ /// Icon identifier.
+ /// </summary>
+ /// <value>An instance of SatIconIdInfo.</value>
+ public SatIconIdInfo IconId
+ {
+ get
+ {
+ return IcnId;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines expected user response length.
+ /// </summary>
+ public class SatResponseLengthInfo
+ {
+ internal byte Min;
+ internal byte Max;
+
+ internal SatResponseLengthInfo()
+ {
+ }
+
+ /// <summary>
+ /// User response length's minimum value.
+ /// </summary>
+ /// <value>Minimum value represented in byte.</value>
+ public byte Minimum
+ {
+ get
+ {
+ return Min;
+ }
+ }
+
+ /// <summary>
+ /// User response length's maximum value.
+ /// </summary>
+ /// <value>Maximum value represented in byte.</value>
+ public byte Maximum
+ {
+ get
+ {
+ return Max;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines refresh proactive command data for applications that are concerned with files residing on USIM.
+ /// </summary>
+ public class SatRefreshData
+ {
+ internal int Id;
+ internal SatRefreshAppType Type;
+ internal SatCmdQualiRefresh Mode;
+ internal byte Count;
+ internal IEnumerable<SimFileId> IdList;
+
+ internal SatRefreshData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive command number sent by USIM.
+ /// </summary>
+ /// <value>Command id represented in integer format.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Concerned application type.
+ /// </summary>
+ /// <value>Refresh app type represented in SatRefreshAppType enum.</value>
+ public SatRefreshAppType AppType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Refresh mode.
+ /// </summary>
+ /// <value>Refresh mode represented in SatCmdQualiRefresh enum.</value>
+ public SatCmdQualiRefresh RefreshMode
+ {
+ get
+ {
+ return Mode;
+ }
+ }
+
+ /// <summary>
+ /// Refresh file count.
+ /// </summary>
+ /// <value>File count represented in byte.</value>
+ public byte FileCount
+ {
+ get
+ {
+ return Count;
+ }
+ }
+
+ /// <summary>
+ /// Refresh file identifiers.
+ /// </summary>
+ /// <value>A list of SimFileId enums.</value>
+ public IEnumerable<SimFileId> FileId
+ {
+ get
+ {
+ return IdList;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines send SMS proactive command data for the SMS application.
+ /// </summary>
+ public class SatSendSmsData
+ {
+ internal int Id;
+ internal bool IsPackRequired;
+ internal SatAddressData Addr;
+ internal SatSmsTpduInfo Info;
+
+ internal SatSendSmsData()
+ {
+ }
+
+ /// <summary>
+ /// Proactive Command Number sent by USIM.
+ /// </summary>
+ /// <value>Command id represented in integer.</value>
+ public int CommandId
+ {
+ get
+ {
+ return Id;
+ }
+ }
+
+ /// <summary>
+ /// Flag to check if packing is required for SMS Tpdu.
+ /// </summary>
+ /// <value>Boolean value to check the need of packing in SMS Tpdu data.</value>
+ public bool IsPackingRequired
+ {
+ get
+ {
+ return IsPackRequired;
+ }
+ }
+
+ /// <summary>
+ /// Destination address.
+ /// </summary>
+ /// <value>An instance of SatAddressData containing the address info.</value>
+ public SatAddressData Address
+ {
+ get
+ {
+ return Addr;
+ }
+ }
+
+ /// <summary>
+ /// SMS Tpdu data.
+ /// </summary>
+ /// <value>An instance of SatSmsTpduInfo.</value>
+ public SatSmsTpduInfo TpduInfo
+ {
+ get
+ {
+ return Info;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines SAT address data object.
+ /// </summary>
+ public class SatAddressData
+ {
+ internal SimTypeOfNumber Type;
+ internal SimNumberPlanIdentity NumId;
+ internal byte NumLen;
+ internal string Number;
+
+ internal SatAddressData()
+ {
+ }
+
+ /// <summary>
+ /// Type of number.
+ /// </summary>
+ /// <value>Sim type of number represented in SimTypeOfNumber enum.</value>
+ public SimTypeOfNumber Ton
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// Number plan identity.
+ /// </summary>
+ /// <value>Sim number plan represented in SimNumberPlanIdentity enum.</value>
+ public SimNumberPlanIdentity Npi
+ {
+ get
+ {
+ return NumId;
+ }
+ }
+
+ /// <summary>
+ /// Length of dialling number.
+ /// </summary>
+ /// <value>Dialling number length represented in byte.</value>
+ public byte DiallingNumberLength
+ {
+ get
+ {
+ return NumLen;
+ }
+ }
+
+ /// <summary>
+ /// Dialling number.
+ /// </summary>
+ /// <value>Dialling number represented in string.</value>
+ public string DiallingNumber
+ {
+ get
+ {
+ return Number;
+ }
+ }
+ }
+
+ /// <summary>
+ /// A class which defines the Result data object.
+ /// </summary>
+ public class SatSmsTpduInfo
+ {
+ internal SatSmsTpduType Type;
+ internal byte Length;
+ internal byte[] Data;
+
+ internal SatSmsTpduInfo()
+ {
+ }
+
+ /// <summary>
+ /// SMS TPDU type.
+ /// </summary>
+ /// <value>Tpdu type represented in SatSmsTpduType.</value>
+ public SatSmsTpduType TpduType
+ {
+ get
+ {
+ return Type;
+ }
+ }
+
+ /// <summary>
+ /// SMS TPDU data length.
+ /// </summary>
+ /// <value>Length of Tpdu data represented in byte.</value>
+ public byte DataLength
+ {
+ get
+ {
+ return Length;
+ }
+ }
+
+ /// <summary>
+ /// SMS TPDU data.
+ /// </summary>
+ /// <value>An array of bytes representing TPDU data.</value>
+ public byte[] TpduData
+ {
+ get
+ {
+ return Data;
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for the UI display status.
+ /// </summary>
+ public enum SatUiDisplayStatus
+ {
+ /// <summary>
+ /// Infoms about UI display success.
+ /// </summary>
+ Success = 0x00,
+ /// <summary>
+ /// Informs about UI display failure.
+ /// </summary>
+ Fail = 0x01
+ }
+
+ /// <summary>
+ /// Enumeration for the command qualifier values of the refresh command.
+ /// </summary>
+ public enum SatCmdQualiRefresh
+ {
+ /// <summary>
+ /// Command qualifier for Refresh SIM Init And Full File Change Notification.
+ /// </summary>
+ SimInitAndFullFcn = 0x00,
+ /// <summary>
+ /// Command qualifier for Refresh File Change Notification.
+ /// </summary>
+ Fcn = 0x01,
+ /// <summary>
+ /// Command qualifier for Refresh SIM Init And File Change Notification.
+ /// </summary>
+ SimInitAndFcn = 0x02,
+ /// <summary>
+ /// Command qualifier for Refresh Sim Init.
+ /// </summary>
+ SimInit = 0x03,
+ /// <summary>
+ /// Command qualifier for Refresh Sim Reset.
+ /// </summary>
+ SimReset = 0x04,
+ /// <summary>
+ /// Command qualifier for Refresh 3G Application Reset.
+ /// </summary>
+ ApplicationReset3G = 0x05,
+ /// <summary>
+ /// Command qualifier for Refresh 3G Session Reset.
+ /// </summary>
+ SessionReset = 0x06,
+ /// <summary>
+ /// Command qualifier for Refresh Reserved.
+ /// </summary>
+ Reserved = 0xFF
+ }
+
+ /// <summary>
+ /// Enumeration for the icon qualifier.
+ /// </summary>
+ public enum SatIconQualifierType
+ {
+ /// <summary>
+ /// Icon Quali Self Explanatory.
+ /// </summary>
+ SelfExplanatory = 0,
+ /// <summary>
+ /// Icon Quali Not Self Explanatory.
+ /// </summary>
+ NotSelfExplanatory = 1,
+ /// <summary>
+ /// Reserved.
+ /// </summary>
+ Reserved = 0xFF
+ }
+
+ /// <summary>
+ /// Enumeration for the SIM image coding scheme type.
+ /// </summary>
+ public enum SatImageCodingScheme
+ {
+ /// <summary>
+ /// Basic coding scheme.
+ /// </summary>
+ Basic = 0x11,
+ /// <summary>
+ /// Colour coding scheme.
+ /// </summary>
+ Colour = 0x21,
+ /// <summary>
+ /// Reserved.
+ /// </summary>
+ Reserved = 0xFF
+ }
+
+ /// <summary>
+ /// Enumeration for the inkey type.
+ /// </summary>
+ public enum SatInKeyType
+ {
+ /// <summary>
+ /// Command qualifier for Inkey type character set enabled.
+ /// </summary>
+ CharacterSetEnabled = 0,
+ /// <summary>
+ /// Command qualifier for Inkey type Yes No requested.
+ /// </summary>
+ YesNoRequested = 1
+ }
+
+ /// <summary>
+ /// Enumeration for the user input type.
+ /// </summary>
+ public enum SatInputAlphabetType
+ {
+ /// <summary>
+ /// SMS default.
+ /// </summary>
+ SmsDefault = 1,
+ /// <summary>
+ /// UCS2 alphabet type.
+ /// </summary>
+ Ucs2 = 2
+ }
+
+ /// <summary>
+ /// Enumeration for the refresh application type.
+ /// </summary>
+ public enum SatRefreshAppType
+ {
+ /// <summary>
+ /// Phonebook type.
+ /// </summary>
+ Contact = 0x00,
+ /// <summary>
+ /// SMS type.
+ /// </summary>
+ Msg,
+ /// <summary>
+ /// Other.
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Maximum value.
+ /// </summary>
+ Max
+ }
+
+ /// <summary>
+ /// Enumeration for the SMS TPDU type.
+ /// </summary>
+ public enum SatSmsTpduType
+ {
+ /// <summary>
+ /// Deliver TPDU type.
+ /// </summary>
+ DeliverTpdu = 0,
+ /// <summary>
+ /// Deliver RPT type.
+ /// </summary>
+ DeliverRpt = 1,
+ /// <summary>
+ /// Submit TPDU type.
+ /// </summary>
+ SubmitTpdu = 2,
+ /// <summary>
+ /// Submit RPT type.
+ /// </summary>
+ SubmitRpt = 3,
+ /// <summary>
+ /// Status RPT type.
+ /// </summary>
+ StatusRpt = 4,
+ /// <summary>
+ /// TPDU CMD type.
+ /// </summary>
+ TpduCmd = 5
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Tizen.Tapi
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatMenuSelectionInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatEventDownloadInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatUiUserConfirmInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatMainMenuInfoStruct
+ {
+ internal int CommandId;
+ internal int IsMainMenuPresent;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
+ internal string Title;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.LPStruct)]
+ internal SatMenuInfoStruct[] MenuItem;
+ internal ushort NumOfMenuItems;
+ internal int IsMainMenuHelpInfo;
+ internal int IsUpdatedMainMenu;
+ internal SatIconIdentifierStruct IconId;
+ internal SatIconIdentifierListStruct IconIdList;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatMenuInfoStruct
+ {
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 261)]
+ internal string Item;
+ internal char ItemId;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatIconIdentifierStruct
+ {
+ internal int IsPresent;
+ internal SatIconQualifierType IconQualifier;
+ internal byte IconIdentifier;
+ internal SatIconInfoStruct IconInfo;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatIconInfoStruct
+ {
+ internal byte Width;
+ internal byte Height;
+ internal SatImageCodingScheme Ics;
+ internal ushort IconDataLength;
+ internal ushort ClutDataLength;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
+ internal string IconFile;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
+ internal string ClutFile;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatIconIdentifierListStruct
+ {
+ internal int IsPresent;
+ internal SatIconQualifierType IconListQualifier;
+ internal byte IconCount;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
+ internal string IconIdentifierList;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.LPStruct)]
+ internal SatIconInfoStruct[] IconInfoList;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatDisplayTextStruct
+ {
+ internal int CommandId;
+ internal SatTextInfoStruct Text;
+ internal uint Duration;
+ internal int IsPriorityHigh;
+ internal int IsUserResponseRequired;
+ internal int IsImmediateResponse;
+ internal SatIconIdentifierStruct IconId;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatTextInfoStruct
+ {
+ internal ushort Length;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 501)]
+ internal string DataString;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatSelectItemStruct
+ {
+ internal int commandId;
+ internal int IsHelpInfoAvailable;
+ internal SatTextInfoStruct Text;
+ internal char DefaultItemIndex;
+ internal char MenuItemCount;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.LPStruct)]
+ internal SatMenuItemInfoStruct[] MenuItems;
+ internal SatIconIdentifierStruct IconId;
+ internal SatIconIdentifierListStruct IconIdList;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatMenuItemInfoStruct
+ {
+ internal byte ItemId;
+ internal byte TextLength;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
+ internal string Text;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatGetInKeyStruct
+ {
+ internal int CommandId;
+ internal SatInKeyType KeyType;
+ internal SatInputAlphabetType InputType;
+ internal int IsNumeric;
+ internal int IsHelpInfoAvailable;
+ internal SatTextInfoStruct Text;
+ internal uint Duration;
+ internal SatIconIdentifierStruct IconId;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatGetInputStruct
+ {
+ internal int CommandId;
+ internal SatInputAlphabetType Type;
+ internal int IsNumeric;
+ internal int IsHelpInfoAvailable;
+ internal int IsEchoInput;
+ internal SatTextInfoStruct Text;
+ internal SatResponseLengthStruct RespLength;
+ internal SatTextInfoStruct DefaultText;
+ internal SatIconIdentifierStruct IconId;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatResponseLengthStruct
+ {
+ internal byte Min;
+ internal byte Max;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatRefreshStruct
+ {
+ internal int CommandId;
+ internal SatRefreshAppType AppType;
+ internal SatCmdQualiRefresh RefreshMode;
+ internal byte FileCount;
+ [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U4, SizeConst = 20)]
+ internal SimFileId[] fileId;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatSendSmsStruct
+ {
+ internal int CommandId;
+ internal int IsPackingRequired;
+ internal SatAddressStruct Address;
+ internal SatSmsTpduStruct SmsTpdu;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatAddressStruct
+ {
+ internal SimTypeOfNumber Ton;
+ internal SimNumberPlanIdentity Npi;
+ internal byte DiallingNumLength;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 200)]
+ internal string DiallingNumber;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatSmsTpduStruct
+ {
+ internal SatSmsTpduType TpduType;
+ internal byte DataLength;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 175)]
+ internal string Data;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SatResultDataStruct
+ {
+ }
+
+ internal static class SatStructConversions
+ {
+ internal static SatTextInfo ConvertSatTextInfoStruct(SatTextInfoStruct textStruct)
+ {
+ SatTextInfo textInfo = new SatTextInfo();
+ textInfo.Length = textStruct.Length;
+ textInfo.Data = Encoding.ASCII.GetBytes(textStruct.DataString);
+ return textInfo;
+ }
+
+ internal static SatIconInfo ConvertSatIconInfoStruct(SatIconInfoStruct iconStruct)
+ {
+ SatIconInfo iconInfo = new SatIconInfo();
+ iconInfo.IconWidth = iconStruct.Width;
+ iconInfo.IconHeight = iconStruct.Height;
+ iconInfo.Scheme = iconStruct.Ics;
+ iconInfo.IconLength = iconStruct.IconDataLength;
+ iconInfo.ClutLength = iconStruct.ClutDataLength;
+ iconInfo.IcnFile = iconStruct.IconFile;
+ iconInfo.CltFile = iconStruct.ClutFile;
+ return iconInfo;
+ }
+
+ internal static SatIconIdInfo ConvertSatIconIdentifierStruct(SatIconIdentifierStruct idStruct)
+ {
+ SatIconIdInfo iconId = new SatIconIdInfo();
+ if (idStruct.IsPresent == 1)
+ {
+ iconId.IsPresent = true;
+ }
+
+ else if (idStruct.IsPresent == 0)
+ {
+ iconId.IsPresent = false;
+ }
+
+ iconId.Qualifier = idStruct.IconQualifier;
+ iconId.Id = idStruct.IconIdentifier;
+ iconId.Info = ConvertSatIconInfoStruct(idStruct.IconInfo);
+ return iconId;
+ }
+
+ internal static SatIconIdListInfo ConvertSatIconIdListStruct(SatIconIdentifierListStruct listStruct)
+ {
+ SatIconIdListInfo iconIdList = new SatIconIdListInfo();
+ if (listStruct.IsPresent == 1)
+ {
+ iconIdList.IsPresent = true;
+ }
+
+ else if (listStruct.IsPresent == 0)
+ {
+ iconIdList.IsPresent = false;
+ }
+
+ iconIdList.Qualifier = listStruct.IconListQualifier;
+ iconIdList.Count = listStruct.IconCount;
+ iconIdList.IconList = Encoding.ASCII.GetBytes(listStruct.IconIdentifierList);
+ List<SatIconInfo> iconInfoList = new List<SatIconInfo>();
+ foreach (SatIconInfoStruct info in listStruct.IconInfoList)
+ {
+ iconInfoList.Add(ConvertSatIconInfoStruct(info));
+ }
+
+ iconIdList.Info = iconInfoList;
+ return iconIdList;
+ }
+
+ internal static SatMainMenuInfo ConvertSatMainMenuInfoStruct(SatMainMenuInfoStruct infoStruct)
+ {
+ SatMainMenuInfo mainMenuInfo = new SatMainMenuInfo();
+ mainMenuInfo.Id = infoStruct.CommandId;
+ if (infoStruct.IsMainMenuPresent == 1)
+ {
+ mainMenuInfo.IsPresent = true;
+ }
+
+ else if (infoStruct.IsMainMenuPresent == 0)
+ {
+ mainMenuInfo.IsPresent = false;
+ }
+
+ mainMenuInfo.Title = infoStruct.Title;
+ List<SatMenuInfo> menuInfoList = new List<SatMenuInfo>();
+ foreach (SatMenuInfoStruct menu in infoStruct.MenuItem)
+ {
+ SatMenuInfo menuInfo = new SatMenuInfo();
+ menuInfo.Item = menu.Item;
+ menuInfo.Id = menu.ItemId;
+ menuInfoList.Add(menuInfo);
+ }
+
+ mainMenuInfo.Items = menuInfoList;
+ mainMenuInfo.Num = infoStruct.NumOfMenuItems;
+ if (infoStruct.IsMainMenuHelpInfo == 1)
+ {
+ mainMenuInfo.IsHelpInfo = true;
+ }
+
+ else if (infoStruct.IsMainMenuHelpInfo == 0)
+ {
+ mainMenuInfo.IsHelpInfo = false;
+ }
+
+ if (infoStruct.IsUpdatedMainMenu == 1)
+ {
+ mainMenuInfo.IsUpdated = true;
+ }
+
+ else if (infoStruct.IsUpdatedMainMenu == 0)
+ {
+ mainMenuInfo.IsUpdated = false;
+ }
+
+ mainMenuInfo.IcnId = ConvertSatIconIdentifierStruct(infoStruct.IconId);
+ mainMenuInfo.IdList = ConvertSatIconIdListStruct(infoStruct.IconIdList);
+ return mainMenuInfo;
+ }
+
+ internal static SatDisplayTextData ConvertSatDisplayTextStruct(SatDisplayTextStruct textStruct)
+ {
+ SatDisplayTextData textData = new SatDisplayTextData();
+ textData.Id = textStruct.CommandId;
+ textData.Text = ConvertSatTextInfoStruct(textStruct.Text);
+ textData.Drtn = textStruct.Duration;
+ if (textStruct.IsPriorityHigh == 1)
+ {
+ textData.IsPrtyHigh = true;
+ }
+
+ else if (textStruct.IsPriorityHigh == 0)
+ {
+ textData.IsPrtyHigh = false;
+ }
+
+ if (textStruct.IsUserResponseRequired == 1)
+ {
+ textData.IsRespRequired = true;
+ }
+
+ else if (textStruct.IsUserResponseRequired == 0)
+ {
+ textData.IsRespRequired = false;
+ }
+
+ if (textStruct.IsImmediateResponse == 1)
+ {
+ textData.IsImmediateResp = true;
+ }
+
+ else if (textStruct.IsImmediateResponse == 0)
+ {
+ textData.IsImmediateResp = false;
+ }
+
+ textData.IcnId = ConvertSatIconIdentifierStruct(textStruct.IconId);
+ return textData;
+ }
+
+ internal static SatSelectItemData ConvertSatSelectItemStruct(SatSelectItemStruct itemStruct)
+ {
+ SatSelectItemData itemData = new SatSelectItemData();
+ itemData.Id = itemStruct.commandId;
+ if (itemStruct.IsHelpInfoAvailable == 1)
+ {
+ itemData.IsHelpAvailable = true;
+ }
+
+ else if (itemStruct.IsHelpInfoAvailable == 0)
+ {
+ itemData.IsHelpAvailable = false;
+ }
+
+ itemData.Text = ConvertSatTextInfoStruct(itemStruct.Text);
+ itemData.DefaultIndex = itemStruct.DefaultItemIndex;
+ itemData.ItemCount = itemStruct.MenuItemCount;
+
+ List<SatMenuItemInfo> items = new List<SatMenuItemInfo>();
+ foreach(SatMenuItemInfoStruct infoStruct in itemStruct.MenuItems)
+ {
+ SatMenuItemInfo menuItem = new SatMenuItemInfo();
+ menuItem.Id = infoStruct.ItemId;
+ menuItem.Length = infoStruct.TextLength;
+ menuItem.Txt = Encoding.ASCII.GetBytes(infoStruct.Text);
+ items.Add(menuItem);
+ }
+
+ itemData.Items = items;
+ itemData.IcnId = ConvertSatIconIdentifierStruct(itemStruct.IconId);
+ itemData.IdList = ConvertSatIconIdListStruct(itemStruct.IconIdList);
+ return itemData;
+ }
+
+ internal static SatGetInKeyData ConvertSatGetInKeyStruct(SatGetInKeyStruct inKeyStruct)
+ {
+ SatGetInKeyData inKeyData = new SatGetInKeyData();
+ inKeyData.Id = inKeyStruct.CommandId;
+ inKeyData.Type = inKeyStruct.KeyType;
+ inKeyData.AlphabetType = inKeyStruct.InputType;
+ if (inKeyStruct.IsNumeric == 1)
+ {
+ inKeyData.IsNumericFlag = true;
+ }
+
+ else if (inKeyStruct.IsNumeric == 0)
+ {
+ inKeyData.IsNumericFlag = false;
+ }
+
+ if (inKeyStruct.IsHelpInfoAvailable == 1)
+ {
+ inKeyData.IsHelpAvailable = true;
+ }
+
+ else if (inKeyStruct.IsHelpInfoAvailable == 0)
+ {
+ inKeyData.IsHelpAvailable = false;
+ }
+
+ inKeyData.Text = ConvertSatTextInfoStruct(inKeyStruct.Text);
+ inKeyData.Duratn = inKeyStruct.Duration;
+ inKeyData.IcnId = ConvertSatIconIdentifierStruct(inKeyStruct.IconId);
+ return inKeyData;
+ }
+
+ internal static SatGetInputData ConvertSatGetInputStruct(SatGetInputStruct inputStruct)
+ {
+ SatGetInputData inputData = new SatGetInputData();
+ inputData.Id = inputStruct.CommandId;
+ inputData.Type = inputStruct.Type;
+ if (inputStruct.IsNumeric == 1)
+ {
+ inputData.IsNumericFlag = true;
+ }
+
+ else if (inputStruct.IsNumeric == 0)
+ {
+ inputData.IsNumericFlag = false;
+ }
+
+ if (inputStruct.IsHelpInfoAvailable == 1)
+ {
+ inputData.IsHelpAvailable = true;
+ }
+
+ else if (inputStruct.IsHelpInfoAvailable == 0)
+ {
+ inputData.IsHelpAvailable = false;
+ }
+
+ if (inputStruct.IsEchoInput == 1)
+ {
+ inputData.IsEcho = true;
+ }
+
+ else if (inputStruct.IsEchoInput == 0)
+ {
+ inputData.IsEcho = false;
+ }
+
+ inputData.Text = ConvertSatTextInfoStruct(inputStruct.Text);
+
+ SatResponseLengthInfo responseLength = new SatResponseLengthInfo();
+ responseLength.Min = inputStruct.RespLength.Min;
+ responseLength.Max = inputStruct.RespLength.Max;
+
+ inputData.RespLength = responseLength;
+ inputData.Default = ConvertSatTextInfoStruct(inputStruct.DefaultText);
+ inputData.IcnId = ConvertSatIconIdentifierStruct(inputStruct.IconId);
+ return inputData;
+ }
+
+ internal static SatRefreshData ConvertSatRefreshStruct(SatRefreshStruct refreshStruct)
+ {
+ SatRefreshData refreshData = new SatRefreshData();
+ refreshData.Id = refreshStruct.CommandId;
+ refreshData.Type = refreshStruct.AppType;
+ refreshData.Mode = refreshStruct.RefreshMode;
+ refreshData.Count = refreshStruct.FileCount;
+ List<SimFileId> fileId = new List<SimFileId>();
+ foreach(SimFileId id in refreshStruct.fileId)
+ {
+ fileId.Add(id);
+ }
+ refreshData.IdList = fileId;
+ return refreshData;
+ }
+
+ internal static SatAddressData ConvertSatAddressStruct(SatAddressStruct addressStruct)
+ {
+ SatAddressData addressData = new SatAddressData();
+ addressData.Type = addressStruct.Ton;
+ addressData.NumId = addressStruct.Npi;
+ addressData.NumLen = addressStruct.DiallingNumLength;
+ addressData.Number = addressStruct.DiallingNumber;
+ return addressData;
+ }
+
+ internal static SatSmsTpduInfo ConvertSatSmsTpduStruct(SatSmsTpduStruct tpduStruct)
+ {
+ SatSmsTpduInfo tpduInfo = new SatSmsTpduInfo();
+ tpduInfo.Type = tpduStruct.TpduType;
+ tpduInfo.Length = tpduStruct.DataLength;
+ tpduInfo.Data = Encoding.ASCII.GetBytes(tpduStruct.Data);
+ return tpduInfo;
+ }
+
+ internal static SatSendSmsData ConvertSatSendSmsStruct(SatSendSmsStruct smsStruct)
+ {
+ SatSendSmsData smsData = new SatSendSmsData();
+ smsData.Id = smsStruct.CommandId;
+ if (smsStruct.IsPackingRequired == 1)
+ {
+ smsData.IsPackRequired = true;
+ }
+
+ else if (smsStruct.IsPackingRequired == 0)
+ {
+ smsData.IsPackRequired = false;
+ }
+
+ smsData.Addr = ConvertSatAddressStruct(smsStruct.Address);
+ smsData.Info = ConvertSatSmsTpduStruct(smsStruct.SmsTpdu);
+ return smsData;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for the SIM card status.
+ /// </summary>
+ public enum SimCardStatus
+ {
+ /// <summary>
+ /// Bad card / On the fly SIM gone bad.
+ /// </summary>
+ Error = 0x00,
+ /// <summary>
+ /// Card not present.
+ /// </summary>
+ NotPresent = 0x01,
+ /// <summary>
+ /// SIM is in the Initializing state.
+ /// </summary>
+ Initializing = 0x02,
+ /// <summary>
+ /// SIM Initialization ok.
+ /// </summary>
+ InitCompleted = 0x03,
+ /// <summary>
+ /// PIN required state.
+ /// </summary>
+ PinRequired = 0x04,
+ /// <summary>
+ /// PUK required state.
+ /// </summary>
+ PukRequired = 0x05,
+ /// <summary>
+ /// PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed).
+ /// </summary>
+ Blocked = 0x06,
+ /// <summary>
+ /// Network Control Key required state.
+ /// </summary>
+ NckRequired = 0x07,
+ /// <summary>
+ /// Network Subset Control Key required state.
+ /// </summary>
+ NsckRequired = 0x08,
+ /// <summary>
+ /// Service Provider Control Key required state.
+ /// </summary>
+ SpckRequired = 0x09,
+ /// <summary>
+ /// Corporate Control Key required state.
+ /// </summary>
+ CckRequired = 0x0a,
+ /// <summary>
+ /// Card removed.
+ /// </summary>
+ Removed = 0x0b,
+ /// <summary>
+ /// PH-SIM (phone-SIM) locked state.
+ /// </summary>
+ LockRequired = 0x0c,
+ /// <summary>
+ /// Runtime SIM card error.
+ /// </summary>
+ Crashed = 0x0d,
+ /// <summary>
+ /// SIM card Powered OFF.
+ /// </summary>
+ PowerOff = 0x0e,
+ /// <summary>
+ /// Unknown status. It can be the initial status.
+ /// </summary>
+ Unknown = 0xff
+ }
+
+ /// <summary>
+ /// Enumeration for the SIM card type.
+ /// </summary>
+ public enum SimType
+ {
+ /// <summary>
+ /// Unknown card.
+ /// </summary>
+ Unknown,
+ /// <summary>
+ /// SIM(GSM) card.
+ /// </summary>
+ Gsm,
+ /// <summary>
+ /// USIM card.
+ /// </summary>
+ Usim,
+ /// <summary>
+ /// CDMA card.
+ /// </summary>
+ Ruim,
+ /// <summary>
+ /// CDMA NV SIM.
+ /// </summary>
+ Nvsim,
+ /// <summary>
+ /// IMS card.
+ /// </summary>
+ Ims
+ }
+
+ /// <summary>
+ /// Enumeration for the language preference code.
+ /// </summary>
+ public enum SimLanguagePreference
+ {
+ /// <summary>
+ /// German.
+ /// </summary>
+ German = 0x00,
+ /// <summary>
+ /// English.
+ /// </summary>
+ English = 0x01,
+ /// <summary>
+ /// Italian.
+ /// </summary>
+ Italian = 0x02,
+ /// <summary>
+ /// French.
+ /// </summary>
+ French = 0x03,
+ /// <summary>
+ /// Spanish.
+ /// </summary>
+ Spanish = 0x04,
+ /// <summary>
+ /// Dutch.
+ /// </summary>
+ Dutch = 0x05,
+ /// <summary>
+ /// Swedish.
+ /// </summary>
+ Swedish = 0x06,
+ /// <summary>
+ /// Danish.
+ /// </summary>
+ Danish = 0x07,
+ /// <summary>
+ /// Portuguese.
+ /// </summary>
+ Portuguese = 0x08,
+ /// <summary>
+ /// Finnish.
+ /// </summary>
+ Finnish = 0x09,
+ /// <summary>
+ /// Norwegian.
+ /// </summary>
+ Norwegian = 0x0A,
+ /// <summary>
+ /// Greek.
+ /// </summary>
+ Greek = 0x0B,
+ /// <summary>
+ /// Turkish.
+ /// </summary>
+ Turkish = 0x0C,
+ /// <summary>
+ /// Hungarian.
+ /// </summary>
+ Hungarian = 0x0D,
+ /// <summary>
+ /// Polish.
+ /// </summary>
+ Polish = 0x0E,
+ /// <summary>
+ /// Korean.
+ /// </summary>
+ Korean = 0x0F,
+ /// <summary>
+ /// Chinese.
+ /// </summary>
+ Chinese = 0x10,
+ /// <summary>
+ /// Russian.
+ /// </summary>
+ Russian = 0x11,
+ /// <summary>
+ /// Japanese.
+ /// </summary>
+ Japanese = 0x12,
+ /// <summary>
+ /// Unspecified.
+ /// </summary>
+ Unspecified = 0xFF
+ }
+
+ /// <summary>
+ /// Enumeration for the security lock type.
+ /// </summary>
+ public enum SimLockType
+ {
+ /// <summary>
+ /// PH-SIM (phone-SIM) locked. Lock Phone to SIM/UICC card.
+ /// </summary>
+ PS = 0x01,
+ /// <summary>
+ /// PH-FSIM (phone-first-SIM) Lock Phone to the very first inserted SIM/UICC card.
+ /// </summary>
+ PF,
+ /// <summary>
+ /// SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card.
+ /// </summary>
+ SC,
+ /// <summary>
+ /// FDN - SIM card or active application in the UICC (GSM or USIM).
+ /// </summary>
+ FD,
+ /// <summary>
+ /// Network Personalization.
+ /// </summary>
+ PN,
+ /// <summary>
+ /// Network subset Personalization.
+ /// </summary>
+ PU,
+ /// <summary>
+ /// Service Provider Personalization.
+ /// </summary>
+ PP,
+ /// <summary>
+ /// Corporate Personalization.
+ /// </summary>
+ PC
+ }
+
+ /// <summary>
+ /// Enumeration for the power state of the SIM.
+ /// </summary>
+ public enum SimPowerState
+ {
+ /// <summary>
+ /// Off state.
+ /// </summary>
+ Off = 0x00,
+ /// <summary>
+ /// On state.
+ /// </summary>
+ On = 0x01,
+ /// <summary>
+ /// Unspecified state.
+ /// </summary>
+ Unspecified = 0xFF
+ }
+ /// <summary>
+ /// Enumeration for the file ID.
+ /// </summary>
+ public enum SimFileId
+ {
+ /// <summary>
+ /// Root Directory for the USIM.
+ /// </summary>
+ Dir = 0x2F00,
+ /// <summary>
+ /// The ICC Identification file.
+ /// </summary>
+ IccId = 0x2FE2,
+ /// <summary>
+ /// The IMSI file.
+ /// </summary>
+ Imsi = 0x6F07,
+ /// <summary>
+ /// The SIM Service Table file.
+ /// </summary>
+ Sst = 0x6F38,
+ /// <summary>
+ /// The Enabled Service Table file.
+ /// </summary>
+ Est = 0x6F56,
+ /// <summary>
+ /// The OPLMN List file.
+ /// </summary>
+ OplmnAct = 0x6F61,
+ /// <summary>
+ /// The Group Identifier Level 1.
+ /// </summary>
+ Gid1 = 0x6F3E,
+ /// <summary>
+ /// The Group Identifier Level 2.
+ /// </summary>
+ Gid2 = 0x6F3F,
+ /// <summary>
+ /// The Extended Language Preference file.
+ /// </summary>
+ Elp = 0x2F05,
+ /// <summary>
+ /// SIM: Language preference.
+ /// </summary>
+ Lp = 0x6F05,
+ /// <summary>
+ /// The Emergency Call Codes.
+ /// </summary>
+ Ecc = 0x6FB7,
+ /// <summary>
+ /// The Service Provider Name.
+ /// </summary>
+ Spn = 0x6F46,
+ /// <summary>
+ /// The Service provider display information.
+ /// </summary>
+ Spdi = 0x6FCD,
+ /// <summary>
+ /// The PLMN Network Name File.
+ /// </summary>
+ Pnn = 0x6FC5,
+ /// <summary>
+ /// The Operator PLMN List File.
+ /// </summary>
+ Opl = 0x6FC6,
+ /// <summary>
+ /// MSISDN.
+ /// </summary>
+ Msisdn = 0x6F40,
+ /// <summary>
+ /// Short Messages file.
+ /// </summary>
+ Sms = 0x6F3C,
+ /// <summary>
+ /// SMS Parameter.
+ /// </summary>
+ Smsp = 0x6F42,
+ /// <summary>
+ /// SMS Status.
+ /// </summary>
+ Smss = 0x6F43,
+ /// <summary>
+ /// Cell Broadcast Message Identifier.
+ /// </summary>
+ Cbmi = 0x6F45,
+ /// <summary>
+ /// SIM Mail Box Dialing Number file.
+ /// </summary>
+ Mbdn = 0x6FC7,
+ /// <summary>
+ /// Mailbox Identifier - linear fixed.
+ /// </summary>
+ UsimMbi = 0x6FC9,
+ /// <summary>
+ /// Message Waiting Indication Status - linear fixed.
+ /// </summary>
+ UsimMwis = 0x6FCA,
+ /// <summary>
+ /// Call forward indication status - linear fixed.
+ /// </summary>
+ UsimCfis = 0x6FCB,
+ /// <summary>
+ /// CPHS voice MSG waiting indication.
+ /// </summary>
+ CphsVoiceMsgWaiting = 0x6F11,
+ /// <summary>
+ /// CPHS service string table.
+ /// </summary>
+ CphsServiceStringTable = 0x6F12,
+ /// <summary>
+ /// CPHS call forward flags.
+ /// </summary>
+ CphsCallForwardFlags = 0x6F13,
+ /// <summary>
+ /// CPHS operator name string.
+ /// </summary>
+ CphsOperatorNameString = 0x6F14,
+ /// <summary>
+ /// CPHS customer service profile.
+ /// </summary>
+ CphsCustomerServiceProfile = 0x6F15,
+ /// <summary>
+ /// CPHS information.
+ /// </summary>
+ CphsInfo = 0x6F16,
+ /// <summary>
+ /// CPHS mail box numbers.
+ /// </summary>
+ CphsMailboxNumbers = 0x6F17,
+ /// <summary>
+ /// CPHS operator name short form string.
+ /// </summary>
+ CphsOperatorNameShortFormString = 0x6F18,
+ /// <summary>
+ /// CPHS information numbers.
+ /// </summary>
+ CphsInformationNumbers = 0x6F19,
+ /// <summary>
+ /// CPHS Dynamics flags.
+ /// </summary>
+ CphsDynamicFlags = 0x6F9F,
+ /// <summary>
+ /// CPHS Dynamics2 flags.
+ /// </summary>
+ CphsDynamic2Flag = 0x6F92,
+ /// <summary>
+ /// CPHS CSP2.
+ /// </summary>
+ CphsCustomerServiceProfileLine2 = 0x6F98,
+ /// <summary>
+ /// Invalid file.
+ /// </summary>
+ Invalid = 0xFFFF,
+ /// <summary>
+ /// Element to indicate an unknown file.
+ /// </summary>
+ Others
+ }
+
+ /// <summary>
+ /// Enumeration for the sim number type.
+ /// </summary>
+ public enum SimTypeOfNumber
+ {
+ /// <summary>
+ /// Unknown.
+ /// </summary>
+ Unknown = 0,
+ /// <summary>
+ /// International number.
+ /// </summary>
+ International,
+ /// <summary>
+ /// National number.
+ /// </summary>
+ National,
+ /// <summary>
+ /// Network specific number.
+ /// </summary>
+ NetworkSpecific,
+ /// <summary>
+ /// Subscriber number.
+ /// </summary>
+ DedicatedAccess,
+ /// <summary>
+ /// Alphanumeric, GSM 7-bit default alphabet.
+ /// </summary>
+ AlphaNumeric,
+ /// <summary>
+ /// Abbreviated number
+ /// </summary>
+ AbbreviatedNumber,
+ /// <summary>
+ /// Reserved for extension.
+ /// </summary>
+ ReservedForExt
+ }
+
+ /// <summary>
+ /// Enumeration for the numbering plan identifier.
+ /// </summary>
+ public enum SimNumberPlanIdentity
+ {
+ /// <summary>
+ /// Unknown.
+ /// </summary>
+ Unknown,
+ /// <summary>
+ /// ISDN/Telephone numbering plan.
+ /// </summary>
+ IsdnTelephone,
+ /// <summary>
+ /// Data numbering plan
+ /// </summary>
+ Data,
+ /// <summary>
+ /// Telex numbering plan
+ /// </summary>
+ Telex,
+ /// <summary>
+ /// Service Center Specific plan.
+ /// </summary>
+ ServiceCenterSpecific,
+ /// <summary>
+ /// Service Center Specific plan 2.
+ /// </summary>
+ ServiceCenterSpecific2,
+ /// <summary>
+ /// National numbering plan.
+ /// </summary>
+ National,
+ /// <summary>
+ /// Private numbering plan.
+ /// </summary>
+ Private,
+ /// <summary>
+ /// ERMES numbering plan.
+ /// </summary>
+ Ermes,
+ /// <summary>
+ /// Reserved for extension.
+ /// </summary>
+ ReservedForExt
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.InteropServices;
+
+namespace Tizen.Tapi
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimImsiInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimEccInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimCallForwardRequestStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimMessageWaitingRequestStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimMailboxNumberStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimAuthenticationDataStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimPinDataStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimFacilityStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SimApduStruct
+ {
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumeration for the SS class type.
+ /// </summary>
+ public enum SsClass
+ {
+ /// <summary>
+ /// All Teleservices.
+ /// </summary>
+ AllTele = 0x10,
+ /// <summary>
+ /// Voice (Telephony).
+ /// </summary>
+ Voice = 0x11,
+ /// <summary>
+ /// All Data Teleservices.
+ /// </summary>
+ AllDataTele = 0x12,
+ /// <summary>
+ /// Fax Service.
+ /// </summary>
+ Fax = 0x13,
+ /// <summary>
+ /// SMS Service.
+ /// </summary>
+ Sms = 0x16,
+ /// <summary>
+ /// Voice Group Call Service.
+ /// </summary>
+ Vgcs = 0x17,
+ /// <summary>
+ /// Voice Broadcast.
+ /// </summary>
+ Vbs = 0x18,
+ /// <summary>
+ /// All teleservices except SMS.
+ /// </summary>
+ AllTeleExceptSms = 0x19,
+ /// <summary>
+ /// All Bearer services.
+ /// </summary>
+ AllBearer = 0x20,
+ /// <summary>
+ /// All Async services.
+ /// </summary>
+ AllAsync = 0x21,
+ /// <summary>
+ /// All Sync services.
+ /// </summary>
+ AllSync = 0x22,
+ /// <summary>
+ /// All Circuit switched sync services.
+ /// </summary>
+ AllCsSync = 0x24,
+ /// <summary>
+ /// All Circuit switched async services.
+ /// </summary>
+ AllCsAsync = 0x25,
+ /// <summary>
+ /// All Dedicated Packet Access.
+ /// </summary>
+ AllDedicatedPacketAccess = 0x26,
+ /// <summary>
+ /// All Dedicated PAD Access.
+ /// </summary>
+ AllDedicatedPadAccess = 0x27,
+ /// <summary>
+ /// All Data CDA.
+ /// </summary>
+ AllDataCda = 0x28,
+ /// <summary>
+ /// All PLMN specific teleservices.
+ /// </summary>
+ PlmnTeleAll = 0x50,
+ /// <summary>
+ /// PLMN specific teleservice 1.
+ /// </summary>
+ PlmnTele1 = 0x51,
+ /// <summary>
+ /// PLMN specific teleservice 2.
+ /// </summary>
+ PlmnTele2 = 0x52,
+ /// <summary>
+ /// PLMN specific teleservice 3.
+ /// </summary>
+ PlmnTele3 = 0x53,
+ /// <summary>
+ /// PLMN specific teleservice 4.
+ /// </summary>
+ PlmnTele4 = 0x54,
+ /// <summary>
+ /// PLMN specific teleservice 5.
+ /// </summary>
+ PlmnTele5 = 0x55,
+ /// <summary>
+ /// PLMN specific teleservice 6.
+ /// </summary>
+ PlmnTele6 = 0x56,
+ /// <summary>
+ /// PLMN specific teleservice 7.
+ /// </summary>
+ PlmnTele7 = 0x57,
+ /// <summary>
+ /// PLMN specific teleservice 8.
+ /// </summary>
+ PlmnTele8 = 0x58,
+ /// <summary>
+ /// PLMN specific teleservice 9.
+ /// </summary>
+ PlmnTele9 = 0x59,
+ /// <summary>
+ /// PLMN specific teleservice 10.
+ /// </summary>
+ PlmnTeleA = 0x60,
+ /// <summary>
+ /// PLMN specific teleservice 11.
+ /// </summary>
+ PlmnTeleB = 0x61,
+ /// <summary>
+ /// PLMN specific teleservice 12.
+ /// </summary>
+ PlmnTeleC = 0x62,
+ /// <summary>
+ /// PLMN specific teleservice 13.
+ /// </summary>
+ PlmnTeleD = 0x63,
+ /// <summary>
+ /// PLMN specific teleservice 14.
+ /// </summary>
+ PlmnTeleE = 0x64,
+ /// <summary>
+ /// PLMN specific teleservice 15.
+ /// </summary>
+ PlmnTeleF = 0x65,
+ /// <summary>
+ /// All PLMN specific bearer services.
+ /// </summary>
+ PlmnBearAll = 0x70,
+ /// <summary>
+ /// PLMN specific bearer service 1.
+ /// </summary>
+ PlmnBear1 = 0x71,
+ /// <summary>
+ /// PLMN specific bearer service 2.
+ /// </summary>
+ PlmnBear2 = 0x72,
+ /// <summary>
+ /// PLMN specific bearer service 3.
+ /// </summary>
+ PlmnBear3 = 0x73,
+ /// <summary>
+ /// PLMN specific bearer service 4.
+ /// </summary>
+ PlmnBear4 = 0x74,
+ /// <summary>
+ /// PLMN specific bearer service 5.
+ /// </summary>
+ PlmnBear5 = 0x75,
+ /// <summary>
+ /// PLMN specific bearer service 6.
+ /// </summary>
+ PlmnBear6 = 0x76,
+ /// <summary>
+ /// PLMN specific bearer service 7.
+ /// </summary>
+ PlmnBear7 = 0x77,
+ /// <summary>
+ /// PLMN specific bearer service 8.
+ /// </summary>
+ PlmnBear8 = 0x78,
+ /// <summary>
+ /// PLMN specific bearer service 9.
+ /// </summary>
+ PlmnBear9 = 0x79,
+ /// <summary>
+ /// PLMN specific bearer service 10.
+ /// </summary>
+ PlmnBearA = 0x80,
+ /// <summary>
+ /// PLMN specific bearer service 11.
+ /// </summary>
+ PlmnBearB = 0x81,
+ /// <summary>
+ /// PLMN specific bearer service 12.
+ /// </summary>
+ PlmnBearC = 0x82,
+ /// <summary>
+ /// PLMN specific bearer service 13.
+ /// </summary>
+ PlmnBearD = 0x83,
+ /// <summary>
+ /// PLMN specific bearer service 14.
+ /// </summary>
+ PlmnBearE = 0x84,
+ /// <summary>
+ /// PLMN specific bearer service 15.
+ /// </summary>
+ PlmnBearF = 0x85,
+ /// <summary>
+ /// Auxiliary Voice (Auxiliary telephony).
+ /// </summary>
+ AuxVoice = 0x89,
+ /// <summary>
+ /// All GPRS bearer services.
+ /// </summary>
+ AllGprsBearer = 0x99,
+ /// <summary>
+ /// All tele and bearer services.
+ /// </summary>
+ AllTeleBearer = 0xFF
+ }
+
+ /// <summary>
+ /// Enumeration for various types of call barring.
+ /// </summary>
+ public enum SsBarringType
+ {
+ /// <summary>
+ /// Barring All Outgoing Calls.
+ /// </summary>
+ Baoc = 0x01,
+ /// <summary>
+ /// Barring Outgoing International Calls.
+ /// </summary>
+ Boic,
+ /// <summary>
+ /// Barring Outgoing International Calls except Home Country.
+ /// </summary>
+ BoicNotHc,
+ /// <summary>
+ /// Barring All Incoming Calls.
+ /// </summary>
+ Baic,
+ /// <summary>
+ /// Barring Incoming Calls when roaming outside the Home Country.
+ /// </summary>
+ BicRoam,
+ /// <summary>
+ /// All Barring Services.
+ /// </summary>
+ Ab,
+ /// <summary>
+ /// All Outgoing Barring Services.
+ /// </summary>
+ Aob,
+ /// <summary>
+ /// All Incoming Barring Services.
+ /// </summary>
+ Aib,
+ /// <summary>
+ /// Barring Incoming Calls which is not stored in the SIM memory.
+ /// </summary>
+ BicNotSim,
+ /// <summary>
+ /// Maximum Barring type.
+ /// </summary>
+ Max
+ }
+
+ /// <summary>
+ /// Enumeration for the CLI service type.
+ /// </summary>
+ public enum SsCliType
+ {
+ /// <summary>
+ /// Calling Line Identification Presentation.
+ /// </summary>
+ Clip = 0x01,
+ /// <summary>
+ /// Calling Line Identification Restriction.
+ /// </summary>
+ Clir = 0x02,
+ /// <summary>
+ /// Connected Line Identification Presentation. 3GPP(GSM/UMTS/LTE) Specific.
+ /// </summary>
+ Colp = 0x03,
+ /// <summary>
+ /// Connected Line Identification Restriction. 3GPP(GSM/UMTS/LTE) Specific.
+ /// </summary>
+ Colr = 0x04,
+ /// <summary>
+ /// Called Line Identification Presentation. 3GPP(GSM/UMTS/LTE) Specific.
+ /// </summary>
+ Cdip = 0x05,
+ /// <summary>
+ /// Calling Name Presentation. 3GPP(GSM/UMTS/LTE) Specific.
+ /// </summary>
+ Cnap = 0x06
+ }
+
+ /// <summary>
+ /// Enumeration for the CLI service status.
+ /// </summary>
+ public enum SsCliStatus
+ {
+ /// <summary>
+ /// Service not provided by the service provider.
+ /// </summary>
+ NotProvisioned = 0x01,
+ /// <summary>
+ /// Service is provided by the service provider.
+ /// </summary>
+ Provisioned,
+ /// <summary>
+ /// Service is activated at the network.
+ /// </summary>
+ Activated,
+ /// <summary>
+ /// Service status is unknown.
+ /// </summary>
+ Unknown,
+ /// <summary>
+ /// Service is temporarily restricted.
+ /// </summary>
+ TempRestricted,
+ /// <summary>
+ /// Service is temporarily allowed.
+ /// </summary>
+ TempAllowed
+ }
+
+ /// <summary>
+ /// Enumeration for the call forwarding condition.
+ /// </summary>
+ public enum SsForwardCondition
+ {
+ /// <summary>
+ /// Call Forwarding Unconditional.
+ /// </summary>
+ Unconditional = 0x01,
+ /// <summary>
+ /// Call Forwarding Mobile Busy.
+ /// </summary>
+ MobileBusy,
+ /// <summary>
+ /// Call Forwarding No Reply.
+ /// </summary>
+ NoReply,
+ /// <summary>
+ /// Call Forwarding Not Reachable.
+ /// </summary>
+ NotReachable,
+ /// <summary>
+ /// All Call Forwarding.
+ /// </summary>
+ All,
+ /// <summary>
+ /// All Conditional Call Forwarding.
+ /// </summary>
+ AllConditional,
+ /// <summary>
+ /// Max.
+ /// </summary>
+ Max
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.InteropServices;
+
+namespace Tizen.Tapi
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SsBarringInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SsUssdMsgInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SsWaitingInfoStruct
+ {
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct SsForwardInfoStruct
+ {
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// Enumerations for the types of Notification.
+ /// </summary>
+ public enum Notification
+ {
+ /// <summary>
+ /// Voice call idle status notification.
+ /// </summary>
+ IdleVoiceCall,
+ /// <summary>
+ /// Voice call active status notification.
+ /// </summary>
+ ActiveVoiceCall,
+ /// <summary>
+ /// Voice call held status notification.
+ /// </summary>
+ HeldVoiceCall,
+ /// <summary>
+ /// Voice call dialing status notification.
+ /// </summary>
+ DialingVoiceCall,
+ /// <summary>
+ /// Voice call alerting status notification.
+ /// </summary>
+ AlertVoiceCall,
+ /// <summary>
+ /// Voice call incoming status notification.
+ /// </summary>
+ IncomingVoiceCall,
+ /// <summary>
+ /// Video call idle status notification.
+ /// </summary>
+ IdleVideoCall,
+ /// <summary>
+ /// Video call active status notification.
+ /// </summary>
+ ActiveVideoCall,
+ /// <summary>
+ /// Video call dialing status notification.
+ /// </summary>
+ DialingVideoCall,
+ /// <summary>
+ /// Video call alerting status notification.
+ /// </summary>
+ AlertVideoCall,
+ /// <summary>
+ /// Video call incoming status notification.
+ /// </summary>
+ IncomingVideoCall,
+ /// <summary>
+ /// Outgoing call waiting nofificaiton.
+ /// </summary>
+ WaitingCallInfo,
+ /// <summary>
+ /// Outgoing call forwarded notification.
+ /// </summary>
+ ForwardCallInfo,
+ /// <summary>
+ /// Incoming call barred notification.
+ /// </summary>
+ BarredIncomingCallInfo,
+ /// <summary>
+ /// Outgoing call barred notification.
+ /// </summary>
+ BarredOutgoingCallInfo,
+ /// <summary>
+ /// Mo call deflected notification.
+ /// </summary>
+ DeflectCallInfo,
+ /// <summary>
+ /// CLIR suppression reject notification.
+ /// </summary>
+ ClirCallInfo,
+ /// <summary>
+ /// Unconditional call forward active notification.
+ /// </summary>
+ ForwardUnconditionalCallInfo,
+ /// <summary>
+ /// Conditional call forward active notification.
+ /// </summary>
+ ForwardConditionalCallInfo,
+ /// <summary>
+ /// Incoming call forwarded notification.
+ /// </summary>
+ ForwardedCallInfo,
+ /// <summary>
+ /// MT deflected call notification.
+ /// </summary>
+ DeflectedCallInfo,
+ /// <summary>
+ /// MT transferred call notification.
+ /// </summary>
+ TransferredCallInfo,
+ /// <summary>
+ /// Call is in held notification.
+ /// </summary>
+ HeldCallInfo,
+ /// <summary>
+ /// Call is in retrieved notificaiton.
+ /// </summary>
+ ActiveCallInfo,
+ /// <summary>
+ /// Call in in multiparty notificaiton.
+ /// </summary>
+ JoinedCallInfo,
+ /// <summary>
+ /// Call transfer alerting notificaiton.
+ /// </summary>
+ TransferAlertCallInfo,
+ /// <summary>
+ /// Call forward check message notification.
+ /// </summary>
+ CfCheckMessageCallInfo,
+ /// <summary>
+ /// New call information notification (CDMA only).
+ /// </summary>
+ RecCallInfo,
+ /// <summary>
+ /// Call info fallback notification.
+ /// </summary>
+ FallbackCallInfo,
+ /// <summary>
+ /// Voice privacy mode change notification (CDMA only).
+ /// </summary>
+ PrivacyModeCall,
+ /// <summary>
+ /// OTASP(Over The Air Service Provisioning) status notification (CDMA only).
+ /// </summary>
+ OtaspCall,
+ /// <summary>
+ /// OTAPA(Over The Air Parameter Administration) status notification (CDMA only).
+ /// </summary>
+ OtapaCall,
+ /// <summary>
+ /// Call signal information notification (CDMA only).
+ /// </summary>
+ CallSignalInfo,
+ /// <summary>
+ /// Call sound patch change notification.
+ /// </summary>
+ CallSoundPath,
+ /// <summary>
+ /// Call ringback tone sound patch change notification.
+ /// </summary>
+ CallSoundRingbackTone,
+ /// <summary>
+ /// Call sound WB-AMR(Wide Band Adaptive Multi-Rate) status notification.
+ /// </summary>
+ CallSoundWbamr,
+ /// <summary>
+ /// Call sound noise reduction notification.
+ /// </summary>
+ CallSoundNoiceReduction,
+ /// <summary>
+ /// Call sound clock status notification.
+ /// </summary>
+ CallSoundClock,
+ /// <summary>
+ /// Preferred voice subscription notification.
+ /// </summary>
+ CallPreferredVoiceSubscription,
+ /// <summary>
+ /// VoLTE call which can provide upgrade/downgrade - caller/callee are all in VoLTE call.
+ /// </summary>
+ CallModifiableInfo,
+ /// <summary>
+ /// VoLTE call for which upgrade call request is initiated from MT.
+ /// </summary>
+ CallupgradeRequested,
+ /// <summary>
+ /// VoLTE call for which downgrade call request is initiated from MT.
+ /// </summary>
+ CallDowngraded,
+ /// <summary>
+ /// Modem power notification.
+ /// </summary>
+ ModemPower,
+ /// <summary>
+ /// SIM status notification.
+ /// </summary>
+ SimStatus,
+ /// <summary>
+ /// SIM refresh notification.
+ /// </summary>
+ SimRefreshed,
+ /// <summary>
+ /// Sap card status notification.
+ /// </summary>
+ SapStatus,
+ /// <summary>
+ /// Sap disconnect type notification.
+ /// </summary>
+ SapDisconnect,
+ /// <summary>
+ /// Sat setup menu notification.
+ /// </summary>
+ SatSetupMenu,
+ /// <summary>
+ /// Sat display text notification.
+ /// </summary>
+ SatDisplayText,
+ /// <summary>
+ /// Sat select item notification.
+ /// </summary>
+ SatSelectItem,
+ /// <summary>
+ /// Sat get inkey notification.
+ /// </summary>
+ SatGetInKey,
+ /// <summary>
+ /// Sat get input notification.
+ /// </summary>
+ SatGetInput,
+ /// <summary>
+ /// Sat refresh notification.
+ /// </summary>
+ SatRefresh,
+ /// <summary>
+ /// Sat send sms notification.
+ /// </summary>
+ SatSendSms,
+ /// <summary>
+ /// Sat setup event list notification.
+ /// </summary>
+ SatSetupEventList,
+ /// <summary>
+ /// Sat send dtmf notification.
+ /// </summary>
+ SatSendDtmf,
+ /// <summary>
+ /// Sat end proactive session notification.
+ /// </summary>
+ SatEndProactiveSession,
+ /// <summary>
+ /// Sat call control result notification.
+ /// </summary>
+ SatCallControlResult,
+ /// <summary>
+ /// Sat mo sms control result notification.
+ /// </summary>
+ SatMoSmControlResult,
+ /// <summary>
+ /// Sat setup call notification.
+ /// </summary>
+ SatSetupCall,
+ /// <summary>
+ /// Sat send SS notification.
+ /// </summary>
+ SatSendSs,
+ /// <summary>
+ /// Sat setup USSD notification.
+ /// </summary>
+ SatSetupUssd,
+ /// <summary>
+ /// Phonebook status notification.
+ /// </summary>
+ PhonebookStatus,
+ /// <summary>
+ /// Phonebook change notification.
+ /// </summary>
+ PhonebookContactChange,
+ /// <summary>
+ /// Network registration status notification.
+ /// </summary>
+ NetworkRegistrationStatus,
+ /// <summary>
+ /// Network cell information notification.
+ /// </summary>
+ NetworkCellInfo,
+ /// <summary>
+ /// Network change notification.
+ /// </summary>
+ NetworkChange,
+ /// <summary>
+ /// Network time information notification.
+ /// </summary>
+ NetworkTimeInfo,
+ /// <summary>
+ /// Network identity notification.
+ /// </summary>
+ NetworkIdentity,
+ /// <summary>
+ /// Network signal strength notification.
+ /// </summary>
+ NetworkSignalStrength,
+ /// <summary>
+ /// Network emergency callback mode notification.
+ /// </summary>
+ NetworkEmergencyCallbackMode,
+ /// <summary>
+ /// Network default data subscription notification.
+ /// </summary>
+ NetworkDefaultDataSubscription,
+ /// <summary>
+ /// Network default subscription notification.
+ /// </summary>
+ NetworkDefaultSubscription,
+ /// <summary>
+ /// Network cell ID.
+ /// </summary>
+ NetworkCellId,
+ /// <summary>
+ /// Network LAC (Location Area Code).
+ /// </summary>
+ NetworkLac,
+ /// <summary>
+ /// Network TAC (Tracking Area Code).
+ /// </summary>
+ NetworkTac,
+ /// <summary>
+ /// Network system ID.
+ /// </summary>
+ NetworkSystemId,
+ /// <summary>
+ /// Network network ID.
+ /// </summary>
+ NetworkNetworkId,
+ /// <summary>
+ /// Network base station ID.
+ /// </summary>
+ NetworkBsId,
+ /// <summary>
+ /// Network base station latitude.
+ /// </summary>
+ NetworkBsLatitude,
+ /// <summary>
+ /// Network base station longitude.
+ /// </summary>
+ NetworkBsLongitude,
+ /// <summary>
+ /// Network VoLTE status notification.
+ /// </summary>
+ NetworkVolteStatus,
+ /// <summary>
+ /// Network EPDG status notification.
+ /// </summary>
+ NetworkEpdgStatus,
+ /// <summary>
+ /// Ss ussd receive notification.
+ /// </summary>
+ SsUssd,
+ /// <summary>
+ /// Ss release complete notification.
+ /// </summary>
+ SsReleaseComplete,
+ /// <summary>
+ /// Ss call forwarding status notification.
+ /// </summary>
+ SsNotifyForwarding,
+ /// <summary>
+ /// Ss call barring status notification.
+ /// </summary>
+ SsNotifyBarring,
+ /// <summary>
+ /// Ss call waiting status notification.
+ /// </summary>
+ SsNotifyWaiting,
+ /// <summary>
+ /// Ss information notification.
+ /// </summary>
+ SsNotifyInfo,
+ /// <summary>
+ /// Sms incoming message notification.
+ /// </summary>
+ SmsIncomingMsg,
+ /// <summary>
+ /// Sms cell broadcast message incoming notification.
+ /// </summary>
+ SmsIncomingCbMsg,
+ /// <summary>
+ /// Sms ETWS(Earthquake and Tsunami Warning System) message incoming notification.
+ /// </summary>
+ SmsIncomingEtwsMsg,
+ /// <summary>
+ /// Sms device memory status notification.
+ /// </summary>
+ SmsMemoryStatus,
+ /// <summary>
+ /// Sms ready notification.
+ /// </summary>
+ SmsReady,
+ /// <summary>
+ /// Oem data notification.
+ /// </summary>
+ OemData
+ }
+
+ /// <summary>
+ /// Enumerations for the types of property definition.
+ /// </summary>
+ public enum Property
+ {
+ /// <summary>
+ /// Modem power property.
+ /// </summary>
+ ModemPower,
+ /// <summary>
+ /// Modem dongle status property.
+ /// </summary>
+ ModemDongleStatus,
+ /// <summary>
+ /// Modem dongle login property.
+ /// </summary>
+ ModemDongleLogin,
+ /// <summary>
+ /// SIM call forward state property.
+ /// </summary>
+ SimCallForwardState,
+ /// <summary>
+ /// Network LAC (Location Area Code) property.
+ /// </summary>
+ NetworkLac,
+ /// <summary>
+ /// Network TAC (Tracking Area Code) property (for LTE network).
+ /// </summary>
+ NetworkTac,
+ /// <summary>
+ /// Network PLMN property.
+ /// </summary>
+ NetworkPlmn,
+ /// <summary>
+ /// Network cell-id property.
+ /// </summary>
+ NetworkCellId,
+ /// <summary>
+ /// Network physical cell-id property.
+ /// </summary>
+ NetworkPhysicalCellId,
+ /// <summary>
+ /// Network service type property.
+ /// </summary>
+ NetworkServiceType,
+ /// <summary>
+ /// Network access technology property.
+ /// </summary>
+ NetworkAct,
+ /// <summary>
+ /// Network ps type property.
+ /// </summary>
+ NetworkPsType,
+ /// <summary>
+ /// Network circuit status property.
+ /// </summary>
+ NetworkCircuitStatus,
+ /// <summary>
+ /// Network packet status property.
+ /// </summary>
+ NetworkPacketStatus,
+ /// <summary>
+ /// Network roaming status property.
+ /// </summary>
+ NetworkRoamingStatus,
+ /// <summary>
+ /// Network name option property.
+ /// </summary>
+ NetworkNameOption,
+ /// <summary>
+ /// Network name property.
+ /// </summary>
+ NetworkName,
+ /// <summary>
+ /// SPN name property stored in SIM card.
+ /// </summary>
+ NetworkSpnName,
+ /// <summary>
+ /// Network signal dbm property.
+ /// </summary>
+ NetworkSignalDbm,
+ /// <summary>
+ /// Network signal level property.
+ /// </summary>
+ NetworkSignalLevel,
+ /// <summary>
+ /// Network ims voice support status property.
+ /// </summary>
+ NetworkImsVoiceStatus,
+ /// <summary>
+ /// Network volte enable status notification.
+ /// </summary>
+ NetworkVolteEnable,
+ /// <summary>
+ /// Network serving LTE band property.
+ /// </summary>
+ NetworkLteBand
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// An extended EventArgs class which contains changed tapi state.
+ /// </summary>
+ public class StateChangedEventArgs : EventArgs
+ {
+ private int _state;
+
+ internal StateChangedEventArgs(int state)
+ {
+ _state = state;
+ }
+
+ /// <summary>
+ /// Tapi ready state.
+ /// </summary>
+ public int State
+ {
+ get
+ {
+ return _state;
+ }
+ }
+ }
+
+ /// <summary>
+ /// An extended EventArgs class which contains changed TAPI notification.
+ /// </summary>
+ public class NotificationChangedEventArgs : EventArgs
+ {
+ private Notification _id;
+ private object _data;
+
+ internal NotificationChangedEventArgs(Notification id, object data)
+ {
+ _id = id;
+ _data = data;
+ }
+
+ /// <summary>
+ /// Notification Id.
+ /// </summary>
+ public Notification Id
+ {
+ get
+ {
+ return _id;
+ }
+ }
+
+ /// <summary>
+ /// Notification data.
+ /// </summary>
+ public object Data
+ {
+ get
+ {
+ return _data;
+ }
+ }
+ }
+
+ /// <summary>
+ /// An extended EventArgs class which contains changed TAPI property.
+ /// </summary>
+ public class PropertyChangedEventArgs : EventArgs
+ {
+ private Property _property;
+ private object _data;
+
+ internal PropertyChangedEventArgs(Property property, object data)
+ {
+ _property = property;
+ _data = data;
+ }
+
+ /// <summary>
+ /// Property definition type.
+ /// </summary>
+ public Property Property
+ {
+ get
+ {
+ return _property;
+ }
+ }
+
+ /// <summary>
+ /// Property data.
+ /// </summary>
+ public object Data
+ {
+ get
+ {
+ return _data;
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// This class is used for managing event callbacks for notifications and properties.
+ /// </summary>
+ public class TapiHandle
+ {
+ internal IntPtr _handle = IntPtr.Zero;
+ private event EventHandler<NotificationChangedEventArgs> _notificationChanged;
+ private event EventHandler<PropertyChangedEventArgs> _propertyChanged;
+
+ private Interop.Tapi.TapiNotificationCallback _notificationChangedCb;
+
+ /// <summary>
+ /// This event is called for the TAPI notification change.
+ /// </summary>
+ public event EventHandler<NotificationChangedEventArgs> NotificationChanged
+ {
+ add
+ {
+ _notificationChanged += value;
+ }
+
+ remove
+ {
+ _notificationChanged -= value;
+ }
+ }
+
+ /// <summary>
+ /// This event is called for the TAPI property change.
+ /// </summary>
+ public event EventHandler<PropertyChangedEventArgs> PropertyChanged
+ {
+ add
+ {
+ _propertyChanged += value;
+ }
+
+ remove
+ {
+ _propertyChanged -= value;
+ }
+ }
+
+ internal TapiHandle(IntPtr handle)
+ {
+ _handle = handle;
+ }
+
+ /// <summary>
+ /// Registers a notification callback for notification change events on DBus interface.
+ /// </summary>
+ /// <param name="id">Notification id for which a callback has to be registered.</param>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public void RegisterNotiEvent(Notification id)
+ {
+ _notificationChangedCb = (IntPtr handle, string notiId, IntPtr data, IntPtr userData) =>
+ {
+ if (_notificationChanged != null)
+ {
+ object notiData = null;
+ Notification noti = default(Notification);
+ if (notiId != null)
+ {
+ foreach (Notification n in Enum.GetValues(typeof(Notification)))
+ {
+ if (notiId == TapiUtility.ConvertNotiToString(n))
+ {
+ noti = n;
+ break;
+ }
+ }
+ }
+
+ switch (noti)
+ {
+ case Notification.IdleVoiceCall:
+ CallIdleStatusNotiStruct voiceIdleStatusNoti = Marshal.PtrToStructure<CallIdleStatusNotiStruct>(data);
+ notiData = CallStructConversions.ConvertCallIdleStatusNoti(voiceIdleStatusNoti);
+ break;
+ case Notification.ActiveVoiceCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.HeldVoiceCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.DialingVoiceCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.AlertVoiceCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.IncomingVoiceCall:
+ CallIncomingInfoStruct callIncomingInfo = Marshal.PtrToStructure<CallIncomingInfoStruct>(data);
+ notiData = CallStructConversions.ConvertIncomingCallInfo(callIncomingInfo);
+ break;
+ case Notification.IdleVideoCall:
+ CallIdleStatusNotiStruct videoIdleStatus = Marshal.PtrToStructure<CallIdleStatusNotiStruct>(data);
+ notiData = CallStructConversions.ConvertCallIdleStatusNoti(videoIdleStatus);
+ break;
+ case Notification.ActiveVideoCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.DialingVideoCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.AlertVideoCall:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.IncomingVideoCall:
+ CallIncomingInfoStruct videoIncomingInfo = Marshal.PtrToStructure<CallIncomingInfoStruct>(data);
+ notiData = CallStructConversions.ConvertIncomingCallInfo(videoIncomingInfo);
+ break;
+ case Notification.WaitingCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.ForwardCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.BarredIncomingCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.BarredOutgoingCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.ForwardUnconditionalCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.ForwardConditionalCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.ForwardedCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.HeldCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.ActiveCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.JoinedCallInfo:
+ notiData = (uint)Marshal.ReadInt32(data);
+ break;
+ case Notification.RecCallInfo:
+ CallRecordStruct recordStruct = Marshal.PtrToStructure<CallRecordStruct>(data);
+ notiData = CallStructConversions.ConvertCallRecordStruct(recordStruct);
+ break;
+ case Notification.PrivacyModeCall:
+ notiData = (CallPrivacyMode)Marshal.ReadInt32(data);
+ break;
+ case Notification.OtaspCall:
+ notiData = (CallOtaspStatus)Marshal.ReadInt32(data);
+ break;
+ case Notification.OtapaCall:
+ notiData = (CallOtapaStatus)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallSignalInfo:
+ CallSignalInfoStruct signalInfoStruct = Marshal.PtrToStructure<CallSignalInfoStruct>(data);
+ notiData = CallStructConversions.ConvertCallSignalInfo(signalInfoStruct);
+ break;
+ case Notification.CallSoundPath:
+ notiData = (SoundPath)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallSoundRingbackTone:
+ notiData = (CallSoundRingbackNoti)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallSoundWbamr:
+ notiData = (CallSoundWbamrNoti)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallSoundNoiceReduction:
+ notiData = (CallSoundNoiseReduction)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallSoundClock:
+ notiData = Marshal.ReadInt32(data);
+ break;
+ case Notification.CallPreferredVoiceSubscription:
+ notiData = (CallPreferredVoiceSubscription)Marshal.ReadInt32(data);
+ break;
+ case Notification.CallupgradeRequested:
+ CallUpgradeDowngradeNotiStruct upgradeNotiStruct = Marshal.PtrToStructure<CallUpgradeDowngradeNotiStruct>(data);
+ notiData = CallStructConversions.ConvertCallUpgradeNoti(upgradeNotiStruct);
+ break;
+ case Notification.CallDowngraded:
+ CallUpgradeDowngradeNotiStruct downgradeNotiStruct = Marshal.PtrToStructure<CallUpgradeDowngradeNotiStruct>(data);
+ notiData = CallStructConversions.ConvertCallUpgradeNoti(downgradeNotiStruct);
+ break;
+ case Notification.ModemPower:
+ notiData = (PhonePowerStatus)Marshal.ReadInt32(data);
+ break;
+ case Notification.SimStatus:
+ notiData = (SimCardStatus)Marshal.ReadInt32(data);
+ break;
+ case Notification.SimRefreshed:
+ notiData = (SatCmdQualiRefresh)Marshal.ReadInt32(data);
+ break;
+ case Notification.SatSetupMenu:
+ SatMainMenuInfoStruct mainMenuStruct = Marshal.PtrToStructure<SatMainMenuInfoStruct>(data);
+ notiData = SatStructConversions.ConvertSatMainMenuInfoStruct(mainMenuStruct);
+ break;
+ case Notification.SatDisplayText:
+ SatDisplayTextStruct textStruct = Marshal.PtrToStructure<SatDisplayTextStruct>(data);
+ notiData = SatStructConversions.ConvertSatDisplayTextStruct(textStruct);
+ break;
+ case Notification.SatSelectItem:
+ SatSelectItemStruct itemStruct = Marshal.PtrToStructure<SatSelectItemStruct>(data);
+ notiData = SatStructConversions.ConvertSatSelectItemStruct(itemStruct);
+ break;
+ case Notification.SatGetInKey:
+ SatGetInKeyStruct inKeyStruct = Marshal.PtrToStructure<SatGetInKeyStruct>(data);
+ notiData = SatStructConversions.ConvertSatGetInKeyStruct(inKeyStruct);
+ break;
+ case Notification.SatGetInput:
+ SatGetInputStruct inputStruct = Marshal.PtrToStructure<SatGetInputStruct>(data);
+ notiData = SatStructConversions.ConvertSatGetInputStruct(inputStruct);
+ break;
+ case Notification.SatRefresh:
+ SatRefreshStruct refreshStruct = Marshal.PtrToStructure<SatRefreshStruct>(data);
+ notiData = SatStructConversions.ConvertSatRefreshStruct(refreshStruct);
+ break;
+ case Notification.SatSendSms:
+ SatSendSmsStruct smsStruct = Marshal.PtrToStructure<SatSendSmsStruct>(data);
+ notiData = SatStructConversions.ConvertSatSendSmsStruct(smsStruct);
+ break;
+ }
+
+ _notificationChanged(null, new NotificationChangedEventArgs(noti, notiData));
+ }
+ };
+ int ret = Interop.Tapi.RegisterNotiEvent(_handle, TapiUtility.ConvertNotiToString(id), _notificationChangedCb, IntPtr.Zero);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to register notification event, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle);
+ }
+ }
+
+ /// <summary>
+ /// Registers a notification callback for property change events on DBus interface.
+ /// </summary>
+ /// <param name="property">Property definition for which a callback has to be registered.</param>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public void RegisterPropEvent(Property property)
+ {
+ _notificationChangedCb = (IntPtr handle, string prop, IntPtr data, IntPtr userData) =>
+ {
+
+ };
+ int ret = Interop.Tapi.RegisterNotiEvent(_handle, TapiUtility.ConvertPropToString(property), _notificationChangedCb, IntPtr.Zero);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to register notification event for property change, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle);
+ }
+ }
+
+ /// <summary>
+ /// Deregisters notification callback for notification change events on DBus interface.
+ /// </summary>
+ /// <param name="id">Notification id for which the callback has to be de-registered.</param>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public void DeregisterNotiEvent(Notification id)
+ {
+ int ret = Interop.Tapi.DeregisterNotiEvent(_handle, TapiUtility.ConvertNotiToString(id));
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to deregister notification event, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle);
+ }
+ }
+
+ /// <summary>
+ /// Deregisters notification callback for property change events on DBus interface.
+ /// </summary>
+ /// <param name="property">Property definition for which the callback has to be de-registered.</param>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public void DeregisterPropEvent(Property property)
+ {
+ int ret = Interop.Tapi.DeregisterNotiEvent(_handle, TapiUtility.ConvertPropToString(property));
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to deregister notification event for property change, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle);
+ }
+ }
+
+ /// <summary>
+ /// Gets the property value in an integer format for the given property.
+ /// </summary>
+ /// <param name="property">The property to be retrieved from Dbus.</param>
+ /// <returns>The property value in integer format.</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <privilege>http://tizen.org/privilege/telephony</privilege>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public int GetIntProperty(Property property)
+ {
+ int result;
+ int ret = Interop.Tapi.GetIntProperty(_handle, TapiUtility.ConvertPropToString(property), out result);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to get property in integer format, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle, "http://tizen.org/privilege/telephony");
+ }
+
+ return result;
+ }
+
+ /// <summary>
+ /// Gets the property value in a string format for the given property.
+ /// </summary>
+ /// <param name="property">The property to be retrieved from Dbus.</param>
+ /// <returns>The property value in string format.</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <privilege>http://tizen.org/privilege/telephony</privilege>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public string GetStringProperty(Property property)
+ {
+ string result;
+ int ret = Interop.Tapi.GetStringProperty(_handle, TapiUtility.ConvertPropToString(property), out result);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to get property in string format, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, _handle, "http://tizen.org/privilege/telephony");
+ }
+
+ return result;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.Tapi
+{
+ /// <summary>
+ /// This class is used for initializing/deinitializing Tapi and manages the state of it.
+ /// </summary>
+ public static class TapiManager
+ {
+ private static event EventHandler<StateChangedEventArgs> s_stateChanged;
+ private static Interop.Tapi.TapiStateCallback s_stateChangedCb;
+
+ /// <summary>
+ /// Gets the state value if tapi is ready.
+ /// </summary>
+ /// <value>The State value in integer format - 0 is False and 1 is True. Returns -1 in case of error.</value>
+ public static int State
+ {
+ get
+ {
+ int state;
+ int ret = Interop.Tapi.GetReadyState(out state);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to get ready state of tapi, Error: " + (TapiError)ret);
+ return -1;
+ }
+
+ return state;
+ }
+ }
+
+ /// <summary>
+ /// This event is raised when Tapi ready state changes.
+ /// </summary>
+ public static event EventHandler<StateChangedEventArgs> StateChanged
+ {
+ add
+ {
+ if (s_stateChanged == null)
+ {
+ RegisterStateChangedEvent();
+ }
+
+ s_stateChanged += value;
+ }
+
+ remove
+ {
+ s_stateChanged -= value;
+ if (s_stateChanged == null)
+ {
+ UnregisterStateChangedEvent();
+ }
+ }
+ }
+
+ private static void RegisterStateChangedEvent()
+ {
+ s_stateChangedCb = (int state, IntPtr userData) =>
+ {
+ s_stateChanged?.Invoke(null, new StateChangedEventArgs(state));
+ };
+ int ret = Interop.Tapi.RegisterReadyStateCb(s_stateChangedCb, IntPtr.Zero);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to register tapi state changed callback, Error: " + (TapiError)ret);
+ }
+ }
+
+ private static void UnregisterStateChangedEvent()
+ {
+ int ret = Interop.Tapi.DeregisterReadyStateCb(s_stateChangedCb);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to deregister tapi state changed callback, Error: " + (TapiError)ret);
+ }
+ }
+
+ /// <summary>
+ /// Fetches a list of available CPs.
+ /// </summary>
+ /// <returns>List of available CPs in case of success. Null in case of failure.</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ public static string[] GetCpNames()
+ {
+ return Interop.Tapi.GetCpNames();
+ }
+
+ /// <summary>
+ /// Acquires a TAPI Handle for the specified CP name.
+ /// </summary>
+ /// <param name="cpName">The CP Name against which a TAPI handle is required (A NULL CP Name will return a #TapiHandle bound to the first CP in the list of available CPs).</param>
+ /// <returns>Instance of TapiHandle on success, null on failure.</returns>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ public static TapiHandle InitTapi(string cpName)
+ {
+ IntPtr handle = Interop.Tapi.InitTapi(cpName);
+ if (handle == IntPtr.Zero)
+ {
+ return null;
+ }
+
+ return new TapiHandle(handle);
+ }
+
+ /// <summary>
+ /// Deinitializes the TAPI Handle.
+ /// </summary>
+ /// <feature>http://tizen.org/feature/network.telephony</feature>
+ /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
+ public static void DeinitTapi(TapiHandle handle)
+ {
+ int ret = Interop.Tapi.DeinitTapi(handle._handle);
+ if (ret != (int)TapiError.Success)
+ {
+ Log.Error(TapiUtility.LogTag, "Failed to deinitialize tapi, Error: " + (TapiError)ret);
+ TapiUtility.ThrowTapiException(ret, handle._handle);
+ }
+
+ handle._handle = IntPtr.Zero;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.Tapi
+{
+ internal enum TapiError
+ {
+ Success = 0,
+ InvalidInput = -1,
+ InvalidPtr = -2,
+ NotSupported = -3,
+ Depricated = -4,
+ SystemOutOfMemory = -5,
+ SystemRpcLinkDown = -6,
+ ServiceNotReady = -7,
+ ServerFailure = -8,
+ OemPluginFailure = -9,
+ TransportLayerFailure = -10,
+ InvalidDataLength = -11,
+ RequestMaxInProgress = -12,
+ OfflineModeError = -13,
+ EventClassUnknown = -14,
+ EventUnknown = -15,
+ RegistrationOpFailed = -16,
+ OperationFailed = -17,
+ InvalidOperation = -18,
+ AccessDenied = -19,
+ SystemRpcLinkNotEst = -100,
+ ApiNotSupported = -101,
+ ServerLayerFailure = -102,
+ InvalidCallId = -200,
+ CallContextOverflow = -201,
+ CouldNotGetCallContext = -202,
+ ContextSearchRetNonCallContext = -203,
+ CouldNotDestroyContext = -204,
+ InvalidLineId = -205,
+ InvalidCallHandle = -206,
+ InvalidCallState = -207,
+ CallPreCondFailed = -208,
+ CallSameReqPending = -209,
+ ModemPoweredOff = -300,
+ ModemAlreadyOn = -301,
+ ModemAlreadyOff = -302,
+ NetTextDeviceNotReady = -400,
+ NetTextScaAddrNotSet = -401,
+ NetTextInvalidDataLength = -402,
+ NetTextScaAddressNotSet = -403,
+ SimCardError = -500,
+ SimNotFound = -501,
+ SimNotInitialized = -502,
+ SimLocked = -503,
+ SimPermBlocked = -504,
+ SimServiceDisabled = -505,
+ SatInvalidCommandId = -600,
+ SatCommandTypeMismatch = -601,
+ SatEventNotRequiredByUsim = -602,
+ NetworkInvalidContext = -700,
+ NetworkPlmnNotAllowed = -701,
+ NetworkRoamingNotAllowed = -702,
+ MiscReturnNull = -800,
+ MiscvalidityError = -801,
+ MiscInputParamError = -802,
+ MiscOutParamNull = -803
+ }
+
+ internal static class TapiUtility
+ {
+ internal const string LogTag = "Tizen.Tapi";
+
+ internal static string ConvertNotiToString(Notification noti)
+ {
+ switch(noti)
+ {
+ case Notification.IdleVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusIdle";
+ case Notification.ActiveVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusActive";
+ case Notification.HeldVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusHeld";
+ case Notification.DialingVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusDialing";
+ case Notification.AlertVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusAlert";
+ case Notification.IncomingVoiceCall:
+ return "org.tizen.telephony.Call:VoiceCallStatusIncoming";
+ case Notification.IdleVideoCall:
+ return "org.tizen.telephony.Call:VideoCallStatusIdle";
+ case Notification.ActiveVideoCall:
+ return "org.tizen.telephony.Call:VideoCallStatusActive";
+ case Notification.DialingVideoCall:
+ return "org.tizen.telephony.Call:VideoCallStatusDialing";
+ case Notification.AlertVideoCall:
+ return "org.tizen.telephony.Call:VideoCallStatusAlert";
+ case Notification.IncomingVideoCall:
+ return "org.tizen.telephony.Call:VideoCallStatusIncoming";
+ case Notification.WaitingCallInfo:
+ return "org.tizen.telephony.Call:Waiting";
+ case Notification.ForwardCallInfo:
+ return "org.tizen.telephony.Call:Forwarded";
+ case Notification.BarredIncomingCallInfo:
+ return "org.tizen.telephony.Call:BarredIncoming";
+ case Notification.BarredOutgoingCallInfo:
+ return "org.tizen.telephony.Call:BarredOutgoing";
+ case Notification.DeflectCallInfo:
+ return "org.tizen.telephony.Call:Deflected";
+ case Notification.ClirCallInfo:
+ return "org.tizen.telephony.Call:ClirSuppressionReject";
+ case Notification.ForwardUnconditionalCallInfo:
+ return "org.tizen.telephony.Call:ForwardUnconditional";
+ case Notification.ForwardConditionalCallInfo:
+ return "org.tizen.telephony.Call:ForwardConditional";
+ case Notification.ForwardedCallInfo:
+ return "org.tizen.telephony.Call:ForwardedCall";
+ case Notification.DeflectedCallInfo:
+ return "org.tizen.telephony.Call:DeflectedCall";
+ case Notification.TransferredCallInfo:
+ return "org.tizen.telephony.Call:TransferedCall";
+ case Notification.HeldCallInfo:
+ return "org.tizen.telephony.Call:CallHeld";
+ case Notification.ActiveCallInfo:
+ return "org.tizen.telephony.Call:CallActive";
+ case Notification.JoinedCallInfo:
+ return "org.tizen.telephony.Call:CallJoined";
+ case Notification.TransferAlertCallInfo:
+ return "org.tizen.telephony.Call:TransferAlert";
+ case Notification.CfCheckMessageCallInfo:
+ return "org.tizen.telephony.Call:CfCheckMessage";
+ case Notification.RecCallInfo:
+ return "org.tizen.telephony.Call:CallInfoRec";
+ case Notification.FallbackCallInfo:
+ return "org.tizen.telephony.Call:CallFallback";
+ case Notification.PrivacyModeCall:
+ return "org.tizen.telephony.Call:CallPrivacyMode";
+ case Notification.OtaspCall:
+ return "org.tizen.telephony.Call:CallOtaspStatus";
+ case Notification.OtapaCall:
+ return "org.tizen.telephony.Call:CallOtapaStatus";
+ case Notification.CallSignalInfo:
+ return "org.tizen.telephony.Call:CallSignalInfo";
+ case Notification.CallSoundPath:
+ return "org.tizen.telephony.Call:CallSoundPath";
+ case Notification.CallSoundRingbackTone:
+ return "org.tizen.telephony.Call:CallSoundRingbackTone";
+ case Notification.CallSoundWbamr:
+ return "org.tizen.telephony.Call:CallSoundWbamr";
+ case Notification.CallSoundNoiceReduction:
+ return "org.tizen.telephony.Call:CallSoundNoiseReduction";
+ case Notification.CallSoundClock:
+ return "org.tizen.telephony.Call:CallSoundClockStatus";
+ case Notification.CallPreferredVoiceSubscription:
+ return "org.tizen.telephony.Call:CallPreferredVoiceSubscription";
+ case Notification.CallModifiableInfo:
+ return "org.tizen.telephony.Call:Modifiable";
+ case Notification.CallupgradeRequested:
+ return "org.tizen.telephony.Call:CallUpgradeRequested";
+ case Notification.CallDowngraded:
+ return "org.tizen.telephony.Call:CallDowngraded";
+ case Notification.ModemPower:
+ return "org.tizen.telephony.Modem:Power";
+ case Notification.SimStatus:
+ return "org.tizen.telephony.Sim:Status";
+ case Notification.SimRefreshed:
+ return "org.tizen.telephony.Sim:Refreshed";
+ case Notification.SapStatus:
+ return "org.tizen.telephony.Sap:Status";
+ case Notification.SapDisconnect:
+ return "org.tizen.telephony.Sap:Disconnect";
+ case Notification.SatSetupMenu:
+ return "org.tizen.telephony.SAT:SetupMenu";
+ case Notification.SatDisplayText:
+ return "org.tizen.telephony.SAT:DisplayText";
+ case Notification.SatSelectItem:
+ return "org.tizen.telephony.SAT:SelectItem";
+ case Notification.SatGetInKey:
+ return "org.tizen.telephony.SAT:GetInkey";
+ case Notification.SatGetInput:
+ return "org.tizen.telephony.SAT:GetInput";
+ case Notification.SatRefresh:
+ return "org.tizen.telephony.SAT:Refresh";
+ case Notification.SatSendSms:
+ return "org.tizen.telephony.SAT:SendSMS";
+ case Notification.SatSetupEventList:
+ return "org.tizen.telephony.SAT:SetupEventList";
+ case Notification.SatSendDtmf:
+ return "org.tizen.telephony.SAT:SendDtmf";
+ case Notification.SatEndProactiveSession:
+ return "org.tizen.telephony.SAT:EndProactiveSession";
+ case Notification.SatCallControlResult:
+ return "org.tizen.telephony.SAT:CallControlResult";
+ case Notification.SatMoSmControlResult:
+ return "org.tizen.telephony.SAT:MoSmControlResult";
+ case Notification.SatSetupCall:
+ return "org.tizen.telephony.SAT:SetupCall";
+ case Notification.SatSendSs:
+ return "org.tizen.telephony.SAT:SendSS";
+ case Notification.SatSetupUssd:
+ return "org.tizen.telephony.SAT:SetupUSSD";
+ case Notification.PhonebookStatus:
+ return "org.tizen.telephony.Phonebook:Status";
+ case Notification.PhonebookContactChange:
+ return "org.tizen.telephony.Phonebook:ContactChange";
+ case Notification.NetworkRegistrationStatus:
+ return "org.tizen.telephony.Network:RegistrationStatus";
+ case Notification.NetworkCellInfo:
+ return "org.tizen.telephony.Network:CellInfo";
+ case Notification.NetworkChange:
+ return "org.tizen.telephony.Network:Change";
+ case Notification.NetworkTimeInfo:
+ return "org.tizen.telephony.Network:TimeInfo";
+ case Notification.NetworkIdentity:
+ return "org.tizen.telephony.Network:Identity";
+ case Notification.NetworkSignalStrength:
+ return "org.tizen.telephony.Network:SignalStrength";
+ case Notification.NetworkEmergencyCallbackMode:
+ return "org.tizen.telephony.Network:EmergencyCallbackMode";
+ case Notification.NetworkDefaultDataSubscription:
+ return "org.tizen.telephony.Network:DefaultDataSubscription";
+ case Notification.NetworkDefaultSubscription:
+ return "org.tizen.telephony.Network:DefaultSubscription";
+ case Notification.NetworkCellId:
+ return "org.tizen.telephony.Network:CellId";
+ case Notification.NetworkLac:
+ return "org.tizen.telephony.Network:Lac";
+ case Notification.NetworkTac:
+ return "org.tizen.telephony.Network:Tac";
+ case Notification.NetworkSystemId:
+ return "org.tizen.telephony.Network:SystemId";
+ case Notification.NetworkNetworkId:
+ return "org.tizen.telephony.Network:NetworkId";
+ case Notification.NetworkBsId:
+ return "org.tizen.telephony.Network:BsId";
+ case Notification.NetworkBsLatitude:
+ return "org.tizen.telephony.Network:BsLatitude";
+ case Notification.NetworkBsLongitude:
+ return "org.tizen.telephony.Network:BsLongitude";
+ case Notification.NetworkVolteStatus:
+ return "org.tizen.telephony.Network:VolteStatus";
+ case Notification.NetworkEpdgStatus:
+ return "org.tizen.telephony.Network:EpdgStatus";
+ case Notification.SsUssd:
+ return "org.tizen.telephony.Ss:NotifyUSSD";
+ case Notification.SsReleaseComplete:
+ return "org.tizen.telephony.Ss:ReleaseComplete";
+ case Notification.SsNotifyForwarding:
+ return "org.tizen.telephony.Ss:NotifyForwarding";
+ case Notification.SsNotifyBarring:
+ return "org.tizen.telephony.Ss:NotifyBarring";
+ case Notification.SsNotifyWaiting:
+ return "org.tizen.telephony.Ss:NotifyWaiting";
+ case Notification.SsNotifyInfo:
+ return "org.tizen.telephony.Ss:NotifySsInfo";
+ case Notification.SmsIncomingMsg:
+ return "org.tizen.telephony.sms:IncommingMsg";
+ case Notification.SmsIncomingCbMsg:
+ return "org.tizen.telephony.sms:IncommingCbMsg";
+ case Notification.SmsIncomingEtwsMsg:
+ return "org.tizen.telephony.sms:IncommingEtwsMsg";
+ case Notification.SmsMemoryStatus:
+ return "org.tizen.telephony.sms:MemoryStatus";
+ case Notification.SmsReady:
+ return "org.tizen.telephony.sms:SmsReady";
+ case Notification.OemData:
+ return "org.tizen.telephony.OEM:OemData";
+ default:
+ return null;
+ }
+ }
+
+ internal static string ConvertPropToString(Property prop)
+ {
+ switch(prop)
+ {
+ case Property.ModemPower:
+ return "org.tizen.telephony.Modem:power";
+ case Property.ModemDongleStatus:
+ return "org.tizen.telephony.Modem:dongle_status";
+ case Property.ModemDongleLogin:
+ return "org.tizen.telephony.Modem:dongle_login";
+ case Property.SimCallForwardState:
+ return "org.tizen.telephony.Sim:cf_state";
+ case Property.NetworkLac:
+ return "org.tizen.telephony.Network:lac";
+ case Property.NetworkTac:
+ return "org.tizen.telephony.Network:tac";
+ case Property.NetworkPlmn:
+ return "org.tizen.telephony.Network:plmn";
+ case Property.NetworkCellId:
+ return ".tizen.telephony.Network:cell_id";
+ case Property.NetworkPhysicalCellId:
+ return "org.tizen.telephony.Network:physical_cell_id";
+ case Property.NetworkServiceType:
+ return "org.tizen.telephony.Network:service_type";
+ case Property.NetworkAct:
+ return "org.tizen.telephony.Network:access_technology";
+ case Property.NetworkPsType:
+ return "org.tizen.telephony.Network:ps_type";
+ case Property.NetworkCircuitStatus:
+ return "org.tizen.telephony.Network:circuit_status";
+ case Property.NetworkPacketStatus:
+ return "org.tizen.telephony.Network:packet_status";
+ case Property.NetworkRoamingStatus:
+ return "org.tizen.telephony.Network:roaming_status";
+ case Property.NetworkNameOption:
+ return "org.tizen.telephony.Network:name_option";
+ case Property.NetworkName:
+ return "org.tizen.telephony.Network:network_name";
+ case Property.NetworkSpnName:
+ return "org.tizen.telephony.Network:spn_name";
+ case Property.NetworkSignalDbm:
+ return "org.tizen.telephony.Network:sig_dbm";
+ case Property.NetworkSignalLevel:
+ return "org.tizen.telephony.Network:sig_level";
+ case Property.NetworkImsVoiceStatus:
+ return "org.tizen.telephony.Network:ims_voice_status";
+ case Property.NetworkVolteEnable:
+ return "org.tizen.telephony.Network:volte_enable";
+ case Property.NetworkLteBand:
+ return "org.tizen.telephony.Network:lte_band_type";
+ default:
+ return null;
+ }
+ }
+
+ internal static void ThrowTapiException(int exception, IntPtr handle)
+ {
+ ThrowException(exception, (handle == IntPtr.Zero), "");
+ }
+
+ internal static void ThrowTapiException(int exception, IntPtr handle, string message)
+ {
+ ThrowException(exception, (handle == IntPtr.Zero), message);
+ }
+
+ private static void ThrowException(int exception, bool isHandleNull, string message)
+ {
+ TapiError _error = (TapiError)exception;
+ switch (_error)
+ {
+ case TapiError.NotSupported:
+ throw new NotSupportedException("Unsupported feature http://tizen.org/feature/network.telephony");
+ case TapiError.AccessDenied:
+ throw new UnauthorizedAccessException("Permission denied " + message);
+ case TapiError.SystemOutOfMemory:
+ throw new OutOfMemoryException("System out of memory");
+ case TapiError.InvalidInput:
+ if (isHandleNull)
+ {
+ throw new InvalidOperationException("Invalid instance (object may have been disposed or released)");
+ }
+ else
+ throw new ArgumentException("Invalid parameter");
+ default:
+ throw new InvalidOperationException(_error.ToString());
+ }
+ }
+ }
+}