Initial commit
authorKyeonghun Lee <kh9090.lee@samsung.com>
Mon, 3 Apr 2017 07:53:27 +0000 (16:53 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Mon, 3 Apr 2017 10:17:07 +0000 (19:17 +0900)
Change-Id: I6e470bbe0b9e95c8a9833a10f0b800bfc325517a
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
13 files changed:
LICENSE [new file with mode: 0644]
packaging/csapi-phonenumber-utils.manifest [new file with mode: 0644]
packaging/csapi-phonenumber-utils.spec [new file with mode: 0644]
src/Tizen.PhonenumberUtils/Interop/Interop.Libraries.cs [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Interop/Interop.PhonenumberUtils.cs [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Properties/AssemblyInfo.cs [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.csproj [new file with mode: 0644]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.project.json [new file with mode: 0644]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.sln [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.snk [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs [new file with mode: 0644]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs [new file with mode: 0755]
src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsErrorFactory.cs [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 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.
diff --git a/packaging/csapi-phonenumber-utils.manifest b/packaging/csapi-phonenumber-utils.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/csapi-phonenumber-utils.spec b/packaging/csapi-phonenumber-utils.spec
new file mode 100644 (file)
index 0000000..08fcdca
--- /dev/null
@@ -0,0 +1,44 @@
+Name:       csapi-phonenumber-utils
+Summary:    Tizen Phonenumber Utils API for C#
+Version:    1.0.0
+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 %ix86
+
+BuildRequires: dotnet-build-tools
+
+# C# API Requires
+BuildRequires: csapi-tizen-nuget
+
+%define Assemblies Tizen.PhonenumberUtils
+
+%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}
diff --git a/src/Tizen.PhonenumberUtils/Interop/Interop.Libraries.cs b/src/Tizen.PhonenumberUtils/Interop/Interop.Libraries.cs
new file mode 100755 (executable)
index 0000000..82c7dc1
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * 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 PhonenumberUtils = "libphonenumber-utils.so.0";
+    }
+}
diff --git a/src/Tizen.PhonenumberUtils/Interop/Interop.PhonenumberUtils.cs b/src/Tizen.PhonenumberUtils/Interop/Interop.PhonenumberUtils.cs
new file mode 100755 (executable)
index 0000000..614b41a
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+internal static partial class Interop
+{
+    internal static partial class PhonenumberUtils
+    {
+        [DllImport(Libraries.PhonenumberUtils, EntryPoint = "phone_number_connect")]
+        internal static extern int Connect();
+
+        [DllImport(Libraries.PhonenumberUtils, EntryPoint = "phone_number_disconnect")]
+        internal static extern int Disconnect();
+
+        [DllImport(Libraries.PhonenumberUtils, EntryPoint = "phone_number_get_location_from_number")]
+        internal static extern int GetLocationFromNumber(string number, int region, int language, out string location);
+
+        [DllImport(Libraries.PhonenumberUtils, EntryPoint = "phone_number_get_formatted_number")]
+        internal static extern int GetFormmatedNumber(string number, int region, out string normalizedNumber);
+
+        [DllImport(Libraries.PhonenumberUtils, EntryPoint = "phone_number_get_normalized_number")]
+        internal static extern int GetNormailizedNumber(string number, out string normalizedNumber);
+    }
+}
diff --git a/src/Tizen.PhonenumberUtils/Properties/AssemblyInfo.cs b/src/Tizen.PhonenumberUtils/Properties/AssemblyInfo.cs
new file mode 100755 (executable)
index 0000000..916fbda
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tizen.PhonenumberUtils")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Samsung Electronics")]
+[assembly: AssemblyProduct("Tizen.PhonenumberUtils")]
+[assembly: AssemblyCopyright("Copyright (c) 2016 Samsung Electronics Co., Ltd")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("6b8ec773-abdf-4e51-8158-71c56ce25bb9")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.csproj b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.csproj
new file mode 100644 (file)
index 0000000..8d1a6ea
--- /dev/null
@@ -0,0 +1,81 @@
+<?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
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>8.0.30703</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{6B8EC773-ABDF-4E51-8158-71C56CE25BB9}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>Tizen.PhonenumberUtils</RootNamespace>\r
+    <AssemblyName>Tizen.PhonenumberUtils</AssemblyName>\r
+    <FileAlignment>512</FileAlignment>\r
+    <DefaultLanguage>en-US</DefaultLanguage>\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</NoWarn>\r
+    <UseVSHostingProcess>false</UseVSHostingProcess>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>portable</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>portable</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.PhonenumberUtils.snk</AssemblyOriginatorKeyFile>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <None Include="Tizen.PhonenumberUtils.project.json" />\r
+    <None Include="Tizen.PhonenumberUtils.snk" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="Interop\Interop.Libraries.cs" />\r
+    <Compile Include="Interop\Interop.PhonenumberUtils.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <Compile Include="Tizen.PhonenumberUtils\PhonenumberUtilsEnumerations.cs" />\r
+    <Compile Include="Tizen.PhonenumberUtils\PhonenumberUtilsErrorFactory.cs" />\r
+    <Compile Include="Tizen.PhonenumberUtils\PhonenumberUtils.cs" />\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
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.project.json b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.project.json
new file mode 100644 (file)
index 0000000..d2a3aab
--- /dev/null
@@ -0,0 +1,9 @@
+{\r
+  "dependencies": {\r
+    "NETStandard.Library": "1.6.0",\r
+    "Tizen.System": "1.0.8"\r
+  },\r
+  "frameworks": {\r
+    "netstandard1.3": {}\r
+  }\r
+}
\ No newline at end of file
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.sln b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.sln
new file mode 100755 (executable)
index 0000000..62d130b
--- /dev/null
@@ -0,0 +1,22 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 14\r
+VisualStudioVersion = 14.0.25420.1\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.PhonenumberUtils", "Tizen.PhonenumberUtils.csproj", "{6B8EC773-ABDF-4E51-8158-71C56CE25BB9}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {6B8EC773-ABDF-4E51-8158-71C56CE25BB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {6B8EC773-ABDF-4E51-8158-71C56CE25BB9}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {6B8EC773-ABDF-4E51-8158-71C56CE25BB9}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {6B8EC773-ABDF-4E51-8158-71C56CE25BB9}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.snk b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.snk
new file mode 100755 (executable)
index 0000000..2d8e2b6
Binary files /dev/null and b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils.snk differ
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs
new file mode 100644 (file)
index 0000000..6bf00fb
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * 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.PhonenumberUtils
+{
+    /// <summary>
+    /// This class makes applications can use phonenumber utils.
+    /// </summary>
+    public class PhonenumberUtils : IDisposable
+    {
+        private bool disposed = false;
+
+        public PhonenumberUtils()
+        {
+            int ret;
+
+            ret = Interop.PhonenumberUtils.Connect();
+            if (ret != (int)PhonenumberUtilsError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to connect, Error - " + (PhonenumberUtilsError)ret);
+                PhonenumberUtilsErrorFactory.ThrowPhonenumberUtilsException(ret);
+            }
+        }
+
+        ~PhonenumberUtils()
+        {
+            Dispose(false);
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        private void Dispose(bool disposing)
+        {
+            if (disposed)
+                return;
+
+            if (disposing)
+            {
+                // Free managed objects
+            }
+
+            // Free unmanaged objects
+            int ret;
+
+            ret = Interop.PhonenumberUtils.Disconnect();
+            if (ret != (int)PhonenumberUtilsError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to disconnect, Error - " + (PhonenumberUtilsError)ret);
+                PhonenumberUtilsErrorFactory.ThrowPhonenumberUtilsException(ret);
+            }
+
+            disposed = true;
+        }
+
+        /// <summary>
+        /// Gets the location string from number, region, and language.
+        /// </summary>
+        /// <param name="number">The number</param>
+        /// <param name="region">The region of number</param>
+        /// <param name="language">The language of location</param>
+        /// <returns>The location string</returns>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        public string GetLocationFromNumber(string number, Region region, Language language)
+        {
+            int ret;
+            string result;
+
+            ret = Interop.PhonenumberUtils.GetLocationFromNumber(number, (int)region, (int)language, out result);
+            if (ret != (int)PhonenumberUtilsError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to get location, Error - " + (PhonenumberUtilsError)ret);
+                PhonenumberUtilsErrorFactory.ThrowPhonenumberUtilsException(ret);
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Gets the formatted number.
+        /// </summary>
+        /// <param name="number">The number</param>
+        /// <param name="region">The region of number</param>
+        /// <returns>The formatted number string</returns>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        public string GetFormattedNumber(string number, Region region)
+        {
+            int ret;
+            string result;
+
+            ret = Interop.PhonenumberUtils.GetFormmatedNumber(number, (int)region, out result);
+            if (ret != (int)PhonenumberUtilsError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to get formatted number, Error - " + (PhonenumberUtilsError)ret);
+                PhonenumberUtilsErrorFactory.ThrowPhonenumberUtilsException(ret);
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Gets the normalized number.
+        /// </summary>
+        /// <privilege>http://tizen.org/privilege/telephony</privilege>
+        /// <param name="number">The number</param>
+        /// <returns>The normalized number</returns>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when phonenumber-utils is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when input coordinates are invalid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+        public string GetNormalizedNumber(string number)
+        {
+            int ret;
+            string result;
+
+            ret = Interop.PhonenumberUtils.GetNormailizedNumber(number, out result);
+            if (ret != (int)PhonenumberUtilsError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to get normalized number, Error - " + (PhonenumberUtilsError)ret);
+                PhonenumberUtilsErrorFactory.ThrowPhonenumberUtilsException(ret);
+            }
+
+            return result;
+        }
+    }
+}
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs
new file mode 100755 (executable)
index 0000000..d08c3f5
--- /dev/null
@@ -0,0 +1,1138 @@
+/*
+* 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.PhonenumberUtils
+{
+    /// <summary>
+    /// Enumeration for language type.
+    /// </summary>
+    public enum Language
+    {
+        /// <summary>
+        /// Amharic
+        /// </summary>
+        Amharic,
+        /// <summary>
+        /// Arabic
+        /// </summary>
+        Arabic,
+        /// <summary>
+        /// Belarusian
+        /// </summary>
+        Belarusian,
+        /// <summary>
+        /// Bulgarian
+        /// </summary>
+        Bulgarian,
+        /// <summary>
+        /// Chinese
+        /// </summary>
+        Chinese,
+        /// <summary>
+        /// Chinese(Traditional)
+        /// </summary>
+        ChineseTranditional,
+        /// <summary>
+        /// Czech
+        /// </summary>
+        Czech,
+        /// <summary>
+        /// Dutch
+        /// </summary>
+        Dutch,
+        /// <summary>
+        /// English
+        /// </summary>
+        English,
+        /// <summary>
+        /// Finnish
+        /// </summary>
+        Finnish,
+        /// <summary>
+        /// French
+        /// </summary>
+        French,
+        /// <summary>
+        /// German
+        /// </summary>
+        German,
+        /// <summary>
+        /// Greek
+        /// </summary>
+        Greek,
+        /// <summary>
+        /// Hungarian
+        /// </summary>
+        Hungarian,
+        /// <summary>
+        /// Indonesian
+        /// </summary>
+        Indonesian,
+        /// <summary>
+        /// Italian
+        /// </summary>
+        Italian,
+        /// <summary>
+        /// Japanese
+        /// </summary>
+        Japanese,
+        /// <summary>
+        /// Korean
+        /// </summary>
+        Korean,
+        /// <summary>
+        /// Nothern Sami
+        /// </summary>
+        NorthernSami,
+        /// <summary>
+        /// Persian
+        /// </summary>
+        Persian,
+        /// <summary>
+        /// Polish
+        /// </summary>
+        Polish,
+        /// <summary>
+        /// Portuguese
+        /// </summary>
+        Portuguese,
+        /// <summary>
+        /// Romanian
+        /// </summary>
+        Romanian,
+        /// <summary>
+        /// Russian
+        /// </summary>
+        Russian,
+        /// <summary>
+        /// Serbian
+        /// </summary>
+        Serbian,
+        /// <summary>
+        /// Spanish
+        /// </summary>
+        Spanish,
+        /// <summary>
+        /// Swdish
+        /// </summary>
+        Swedish,
+        /// <summary>
+        /// Thai
+        /// </summary>
+        Thai,
+        /// <summary>
+        /// Turkish
+        /// </summary>
+        Turkish,
+        /// <summary>
+        /// Vietnamese
+        /// </summary>
+        Vietnamese,
+        /// <summary>
+        /// Current System Value
+        /// </summary>
+        System,
+        Max
+    }
+
+    /// <summary>
+    /// Enumeration for region type.
+    /// </summary>
+    public enum Region
+    {
+        /// <summary>
+        /// Aland Islands
+        /// </summary>
+        AlandIslands,
+        /// <summary>
+        /// Albania
+        /// </summary>
+        Albania,
+        /// <summary>
+        /// Algeria
+        /// </summary>
+        Algeria,
+        /// <summary>
+        /// American Samoa
+        /// </summary>
+        AmericanSamoa,
+        /// <summary>
+        /// Angola
+        /// </summary>
+        Angola,
+        /// <summary>
+        /// Anguilla
+        /// </summary>
+        Anguilla,
+        /// <summary>
+        /// Argentina
+        /// </summary>
+        Argentina,
+        /// <summary>
+        /// Aremenia
+        /// </summary>
+        Armenia,
+        /// <summary>
+        /// Ascension Island
+        /// </summary>
+        AscensionIsland,
+        /// <summary>
+        /// Atigua and Barbuda
+        /// </summary>
+        AtiguaAndBarbuda,
+        /// <summary>
+        /// Autstria
+        /// </summary>
+        Austria,
+        /// <summary>
+        /// Bahamas
+        /// </summary>
+        Bahamas,
+        /// <summary>
+        /// Barbados
+        /// </summary>
+        Barbados,
+        /// <summary>
+        /// Belarus
+        /// </summary>
+        Belarus,
+        /// <summary>
+        /// Belgium
+        /// </summary>
+        Belgium,
+        /// <summary>
+        /// Benin
+        /// </summary>
+        Benin,
+        /// <summary>
+        /// Bermuda
+        /// </summary>
+        Bermuda,
+        /// <summary>
+        /// Bonaire, Sint Eustatius and Saba
+        /// </summary>
+        BonaireSintEustatiusAndSaba,
+        /// <summary>
+        /// Botswana
+        /// </summary>
+        Botswana,
+        /// <summary>
+        /// Brazil
+        /// </summary>
+        Brazil,
+        /// <summary>
+        /// Bulgaria
+        /// </summary>
+        Bulgaria,
+        /// <summary>
+        /// Burkina Faso
+        /// </summary>
+        BurkinaFaso,
+        /// <summary>
+        /// Burundi
+        /// </summary>
+        Burundi,
+        /// <summary>
+        /// Cabo Verde
+        /// </summary>
+        CaboVerde,
+        /// <summary>
+        /// Cameroon
+        /// </summary>
+        Cameroon,
+        /// <summary>
+        /// Canada
+        /// </summary>
+        Canada,
+        /// <summary>
+        /// Cayman Island
+        /// </summary>
+        CaymanIsland,
+        /// <summary>
+        /// Chile
+        /// </summary>
+        Chile,
+        /// <summary>
+        /// China
+        /// </summary>
+        China,
+        /// <summary>
+        /// Colombia
+        /// </summary>
+        Colombia,
+        /// <summary>
+        /// Comoros
+        /// </summary>
+        Comoros,
+        /// <summary>
+        /// Congo
+        /// </summary>
+        Congo,
+        /// <summary>
+        /// Cote d'Ivoire
+        /// </summary>
+        CoteDIvoire,
+        /// <summary>
+        /// Cuba
+        /// </summary>
+        Cuba,
+        /// <summary>
+        /// Curacao
+        /// </summary>
+        Curacao,
+        /// <summary>
+        /// Czech Republic
+        /// </summary>
+        CzechRepublic,
+        /// <summary>
+        /// Congo (Democratic Republic of the)
+        /// </summary>
+        DemocraticRepublicOfTheCongo,
+        /// <summary>
+        /// Dominica
+        /// </summary>
+        Dominica,
+        /// <summary>
+        /// Dominican Republic
+        /// </summary>
+        DominicanRepublic,
+        /// <summary>
+        /// Egypt
+        /// </summary>
+        Egypt,
+        /// <summary>
+        /// Estonia
+        /// </summary>
+        Estonia,
+        /// <summary>
+        /// Ethiopia
+        /// </summary>
+        Ethiopia,
+        /// <summary>
+        /// Finland
+        /// </summary>
+        Finland,
+        /// <summary>
+        /// France
+        /// </summary>
+        France,
+        /// <summary>
+        /// Gabon
+        /// </summary>
+        Gabon,
+        /// <summary>
+        /// Gambia
+        /// </summary>
+        Gambia,
+        /// <summary>
+        /// Germany
+        /// </summary>
+        Germany,
+        /// <summary>
+        /// Ghana
+        /// </summary>
+        Ghana,
+        /// <summary>
+        /// Greece
+        /// </summary>
+        Greece,
+        /// <summary>
+        /// Greenland
+        /// </summary>
+        Greenland,
+        /// <summary>
+        /// Grenada
+        /// </summary>
+        Grenada,
+        /// <summary>
+        /// Guam
+        /// </summary>
+        Guam,
+        /// <summary>
+        /// Guernsey
+        /// </summary>
+        Guernsey,
+        /// <summary>
+        /// guinea
+        /// </summary>
+        Guinea,
+        /// <summary>
+        /// Guinea-Bissau
+        /// </summary>
+        GuineaBissau,
+        /// <summary>
+        /// Hungary
+        /// </summary>
+        Hungary,
+        /// <summary>
+        /// Iceland
+        /// </summary>
+        Iceland,
+        /// <summary>
+        /// India
+        /// </summary>
+        India,
+        /// <summary>
+        /// Indonesia
+        /// </summary>
+        Indonesia,
+        /// <summary>
+        /// Ireland
+        /// </summary>
+        Ireland,
+        /// <summary>
+        /// Iran (Islamic Republic of)
+        /// </summary>
+        IslamicRepublicOfIran,
+        /// <summary>
+        /// Isle of Man
+        /// </summary>
+        IsleOfMan,
+        /// <summary>
+        /// Italy
+        /// </summary>
+        Italy,
+        /// <summary>
+        /// Jamaica
+        /// </summary>
+        Jamaica,
+        /// <summary>
+        /// Japan
+        /// </summary>
+        Japan,
+        /// <summary>
+        /// Jersey
+        /// </summary>
+        Jersey,
+        /// <summary>
+        /// Jordan
+        /// </summary>
+        Jordan,
+        /// <summary>
+        /// Kazakhstan
+        /// </summary>
+        Kazakhstan,
+        /// <summary>
+        /// Kenya
+        /// </summary>
+        Kenya,
+        /// <summary>
+        /// Kiribati
+        /// </summary>
+        Kiribati,
+        /// <summary>
+        /// Latvia
+        /// </summary>
+        Latvia,
+        /// <summary>
+        /// Lesotho
+        /// </summary>
+        Lesotho,
+        /// <summary>
+        /// Lithuania
+        /// </summary>
+        Lithuania,
+        /// <summary>
+        /// Luxembourg
+        /// </summary>
+        Luxembourg,
+        /// <summary>
+        /// Madagascar
+        /// </summary>
+        Madagascar,
+        /// <summary>
+        /// Mauritania
+        /// </summary>
+        Mauritania,
+        /// <summary>
+        /// Mauritius
+        /// </summary>
+        Mauritius,
+        /// <summary>
+        /// Monteserrat
+        /// </summary>
+        Montserrat,
+        /// <summary>
+        /// Morocco
+        /// </summary>
+        Morocco,
+        /// <summary>
+        /// Mozambique
+        /// </summary>
+        Mozambique,
+        /// <summary>
+        /// Namibia
+        /// </summary>
+        Namibia,
+        /// <summary>
+        /// Netherlands
+        /// </summary>
+        Netherlands,
+        /// <summary>
+        /// Nigeria
+        /// </summary>
+        Nigeria,
+        /// <summary>
+        /// Northern Mariana Island
+        /// </summary>
+        NorthernMarianaIslands,
+        /// <summary>
+        /// Norway
+        /// </summary>
+        Norway,
+        /// <summary>
+        /// Peru
+        /// </summary>
+        Peru,
+        /// <summary>
+        /// Poland
+        /// </summary>
+        Poland,
+        /// <summary>
+        /// Portugal
+        /// </summary>
+        Portugal,
+        /// <summary>
+        /// Puerto Rico
+        /// </summary>
+        PuertoRico,
+        /// <summary>
+        /// Korea (Republic of)
+        /// </summary>
+        RepublicOfKorea,
+        /// <summary>
+        /// Moldova (Republic of)
+        /// </summary>
+        RepublicOfMoldova,
+        /// <summary>
+        /// Romania
+        /// </summary>
+        Romania,
+        /// <summary>
+        /// Russian Federation
+        /// </summary>
+        RussianFederation,
+        /// <summary>
+        /// Saint Helena, Ascension and Tristan da Cunha
+        /// </summary>
+        SaintHelena,
+        /// <summary>
+        /// Saint Kitts and Nevis
+        /// </summary>
+        SaintKittsAndNevis,
+        /// <summary>
+        /// Saint Lucia
+        /// </summary>
+        SaintLucia,
+        /// <summary>
+        /// Saint Vincent and the Grenadines
+        /// </summary>
+        SaintVicentAndTheGrenadines,
+        /// <summary>
+        /// Sao Tome and Principe
+        /// </summary>
+        SaoTomeAndPrincipe,
+        /// <summary>
+        /// Saudi Arabia
+        /// </summary>
+        SaudiArabia,
+        /// <summary>
+        /// Senegal
+        /// </summary>
+        Senegal,
+        /// <summary>
+        /// Serbia
+        /// </summary>
+        Serbia,
+        /// <summary>
+        /// Sierra Leone
+        /// </summary>
+        SierraLeone,
+        /// <summary>
+        /// Sint Maarten (Dutch part)
+        /// </summary>
+        SintMaarten,
+        /// <summary>
+        /// Slovakia
+        /// </summary>
+        Slovakia,
+        /// <summary>
+        /// Somalia
+        /// </summary>
+        Somalia,
+        /// <summary>
+        /// South Africa
+        /// </summary>
+        SouthAfrica,
+        /// <summary>
+        /// Spain
+        /// </summary>
+        Spain,
+        /// <summary>
+        /// Sri Lanka
+        /// </summary>
+        SriLanka,
+        /// <summary>
+        /// Sudan
+        /// </summary>
+        Sudan,
+        /// <summary>
+        /// Svalbard and Jan Mayen
+        /// </summary>
+        SvalbardAndJanMayen,
+        /// <summary>
+        /// Swaziland
+        /// </summary>
+        Swaziland,
+        /// <summary>
+        /// Sweden
+        /// </summary>
+        Sweden,
+        /// <summary>
+        /// Switzerland
+        /// </summary>
+        Switzerland,
+        /// <summary>
+        /// Taiwan Province of China
+        /// </summary>
+        TaiwanProvinceOfChina,
+        /// <summary>
+        /// Thailand
+        /// </summary>
+        Thailand,
+        /// <summary>
+        /// Macedonia (the Former Yugoslav Republic of)
+        /// </summary>
+        TheFormerYugoslavRepublicOfMacedonia,
+        /// <summary>
+        /// Togo
+        /// </summary>
+        Togo,
+        /// <summary>
+        /// Trinidad and Tobago
+        /// </summary>
+        TrinidadAndTobago,
+        /// <summary>
+        /// Tristan da Cunha
+        /// </summary>
+        TristanDaCunha,
+        /// <summary>
+        /// Tunisia
+        /// </summary>
+        Tunisia,
+        /// <summary>
+        /// Turkey
+        /// </summary>
+        Turkey,
+        /// <summary>
+        /// Turks and Caicos Islands
+        /// </summary>
+        TurksAndCaicosIslands,
+        /// <summary>
+        /// Uganda
+        /// </summary>
+        Uganda,
+        /// <summary>
+        /// United Kingdom
+        /// </summary>
+        UnitedKingdom,
+        /// <summary>
+        /// United States of America
+        /// </summary>
+        UnitedStatesOfAmerica,
+        /// <summary>
+        /// Venezuela
+        /// </summary>
+        Venezuela,
+        /// <summary>
+        /// Viet Nam
+        /// </summary>
+        VietNam,
+        /// <summary>
+        /// Virgin Island (British)
+        /// </summary>
+        VirginIslandBritish,
+        /// <summary>
+        /// Virgin Island (U.S.)
+        /// </summary>
+        VirginIslandUs,
+        /// <summary>
+        /// Western Sahara
+        /// </summary>
+        WesternSahara,
+        /// <summary>
+        /// Zambia
+        /// </summary>
+        Zambia,
+        /// <summary>
+        /// Zimbabwe
+        /// </summary>
+        Zimbabwe,
+        /// <summary>
+        /// Andorra
+        /// </summary>
+        Andorra,
+        /// <summary>
+        /// United Arab Emirates
+        /// </summary>
+        UnitedArabEmirates,
+        /// <summary>
+        /// Afghanistan
+        /// </summary>
+        Afghanistan,
+        /// <summary>
+        /// Australia
+        /// </summary>
+        Australia,
+        /// <summary>
+        /// Aruba
+        /// </summary>
+        Aruba,
+        /// <summary>
+        /// Azerbaijan
+        /// </summary>
+        Azerbaijan,
+        /// <summary>
+        /// Bosnia and Herzegovina
+        /// </summary>
+        BosniaAndHerzegovina,
+        /// <summary>
+        /// Bangladesh
+        /// </summary>
+        Bangladesh,
+        /// <summary>
+        /// Bahrain
+        /// </summary>
+        Bahrain,
+        /// <summary>
+        /// Saint Barthelemy, French Antilles
+        /// </summary>
+        SaintBarthelemy,
+        /// <summary>
+        /// Brunei Darussalam
+        /// </summary>
+        BruneiDarussalam,
+        /// <summary>
+        /// Bolivia
+        /// </summary>
+        Bolivia,
+        /// <summary>
+        /// Bhutan
+        /// </summary>
+        Bhutan,
+        /// <summary>
+        /// Belize
+        /// </summary>
+        Belize,
+        /// <summary>
+        /// Cocos Islands
+        /// </summary>
+        CocosIslands,
+        /// <summary>
+        /// Central African Republic
+        /// </summary>
+        CentralAfricanRepublic,
+        /// <summary>
+        /// Cook Islands
+        /// </summary>
+        CookIslands,
+        /// <summary>
+        /// Costa Rica
+        /// </summary>
+        CostaRica,
+        /// <summary>
+        /// Christmas Islands
+        /// </summary>
+        ChristmasIslands,
+        /// <summary>
+        /// Cyprus
+        /// </summary>
+        Cyprus,
+        /// <summary>
+        /// Djibouti
+        /// </summary>
+        Djibouti,
+        /// <summary>
+        /// Denmark
+        /// </summary>
+        Denmark,
+        /// <summary>
+        /// Ecuador
+        /// </summary>
+        Ecuador,
+        /// <summary>
+        /// Eritrea
+        /// </summary>
+        Eritrea,
+        /// <summary>
+        /// Fiji
+        /// </summary>
+        Fiji,
+        /// <summary>
+        /// Falkland Islands
+        /// </summary>
+        FalklandIslands,
+        /// <summary>
+        /// Micronesia, Federated States of
+        /// </summary>
+        Micronesia,
+        /// <summary>
+        /// Faroe Islands
+        /// </summary>
+        FaroeIslands,
+        /// <summary>
+        /// Georgia
+        /// </summary>
+        Georgia,
+        /// <summary>
+        /// French Guiana
+        /// </summary>
+        FrenchGuiana,
+        /// <summary>
+        /// Gibraltar
+        /// </summary>
+        Gibraltar,
+        /// <summary>
+        /// Guadeloupe
+        /// </summary>
+        Guadeloupe,
+        /// <summary>
+        /// Equatorial Guinea
+        /// </summary>
+        EquatorialGuinea,
+        /// <summary>
+        /// Guatemala
+        /// </summary>
+        Guatemala,
+        /// <summary>
+        /// Guyana
+        /// </summary>
+        Guyana,
+        /// <summary>
+        /// Hong Kong
+        /// </summary>
+        HongKong,
+        /// <summary>
+        /// Honduras
+        /// </summary>
+        Honduras,
+        /// <summary>
+        /// Croatia
+        /// </summary>
+        Croatia,
+        /// <summary>
+        /// Haiti
+        /// </summary>
+        Haiti,
+        /// <summary>
+        /// Israel
+        /// </summary>
+        Israel,
+        /// <summary>
+        /// British Indian Ocean Territory / Diego Garcia
+        /// </summary>
+        DiegoGarcia,
+        /// <summary>
+        /// Iraq
+        /// </summary>
+        Iraq,
+        /// <summary>
+        /// Kyrgyzstan
+        /// </summary>
+        Kyrgyzstan,
+        /// <summary>
+        /// Cambodia
+        /// </summary>
+        Cambodia,
+        /// <summary>
+        /// Korea, Dem. People's Rep. of
+        /// </summary>
+        NorthKorea,
+        /// <summary>
+        /// Kuwait
+        /// </summary>
+        Kuwait,
+        /// <summary>
+        /// Lao People's Dem. Rep.
+        /// </summary>
+        Laos,
+        /// <summary>
+        /// Lebanon
+        /// </summary>
+        Lebanon,
+        /// <summary>
+        /// Liechtenstein
+        /// </summary>
+        Liechtenstein,
+        /// <summary>
+        /// Liberia
+        /// </summary>
+        Liberia,
+        /// <summary>
+        /// Libya (Soc. People's Libyan Arab Jamahiriva)
+        /// </summary>
+        Libya,
+        /// <summary>
+        /// Monaco
+        /// </summary>
+        Monaco,
+        /// <summary>
+        /// Montenegro
+        /// </summary>
+        Montenegro,
+        /// <summary>
+        /// Saint-Martin, French Antilles
+        /// </summary>
+        SaintMartin,
+        /// <summary>
+        /// Marshall Islands
+        /// </summary>
+        MarshallIslands,
+        /// <summary>
+        /// Mali
+        /// </summary>
+        Mali,
+        /// <summary>
+        /// Myanmar
+        /// </summary>
+        Myanmar,
+        /// <summary>
+        /// Mongolia
+        /// </summary>
+        Mongolia,
+        /// <summary>
+        /// Macao, China
+        /// </summary>
+        Macao,
+        /// <summary>
+        /// Martinique (French Dept. of)
+        /// </summary>
+        Martinique,
+        /// <summary>
+        /// Malta
+        /// </summary>
+        Malta,
+        /// <summary>
+        /// Maldives
+        /// </summary>
+        Maldives,
+        /// <summary>
+        /// Malawi
+        /// </summary>
+        Malawi,
+        /// <summary>
+        /// Mexico
+        /// </summary>
+        Mexico,
+        /// <summary>
+        /// Malaysia
+        /// </summary>
+        Malaysia,
+        /// <summary>
+        /// New Caledonia (Territoire francais d'outre-mer)
+        /// </summary>
+        NewCaledonia,
+        /// <summary>
+        /// Niger
+        /// </summary>
+        Niger,
+        /// <summary>
+        /// Norfolk Island
+        /// </summary>
+        NorfolkIsland,
+        /// <summary>
+        /// Nicaragua
+        /// </summary>
+        Nicaragua,
+        /// <summary>
+        /// Nepal
+        /// </summary>
+        Nepal,
+        /// <summary>
+        /// Naura
+        /// </summary>
+        Nauru,
+        /// <summary>
+        /// Niue
+        /// </summary>
+        Niue,
+        /// <summary>
+        /// New Zealand
+        /// </summary>
+        NewZealand,
+        /// <summary>
+        /// Oman
+        /// </summary>
+        Oman,
+        /// <summary>
+        /// Panama
+        /// </summary>
+        Panama,
+        /// <summary>
+        /// French Polynesia (Tahiti) (Territoire francais d'outre-mer)
+        /// </summary>
+        FrenchPolynesia,
+        /// <summary>
+        /// Papua New Guinea
+        /// </summary>
+        PapuaNewGuinea,
+        /// <summary>
+        /// Philippines
+        /// </summary>
+        Philippines,
+        /// <summary>
+        /// Pakistan
+        /// </summary>
+        Pakistan,
+        /// <summary>
+        /// Saint Pierre and Miquelon (Collectivite territoriale de la Republique francaise)
+        /// </summary>
+        SaintPierreAndMiquelon,
+        /// <summary>
+        /// Palestinian Authority
+        /// </summary>
+        PalestinianAuthority,
+        /// <summary>
+        /// Palau
+        /// </summary>
+        Palau,
+        /// <summary>
+        /// Paraguay
+        /// </summary>
+        Paraguay,
+        /// <summary>
+        /// Qatar
+        /// </summary>
+        Qatar,
+        /// <summary>
+        /// Reunion (French Departments and Territories in the Indian Ocean)
+        /// </summary>
+        Reunion,
+        /// <summary>
+        /// Rwanda
+        /// </summary>
+        Rwanda,
+        /// <summary>
+        /// Solomon Islands
+        /// </summary>
+        SolomonIslands,
+        /// <summary>
+        /// Seychelles
+        /// </summary>
+        Seychelles,
+        /// <summary>
+        /// Singapore
+        /// </summary>
+        Singapore,
+        /// <summary>
+        /// Slovenia
+        /// </summary>
+        Slovenia,
+        /// <summary>
+        /// San Marino
+        /// </summary>
+        SanMarino,
+        /// <summary>
+        /// Suriname
+        /// </summary>
+        Suriname,
+        /// <summary>
+        /// South Sudan
+        /// </summary>
+        SouthSudan,
+        /// <summary>
+        /// El Salvador
+        /// </summary>
+        ElSalvadore,
+        /// <summary>
+        /// Syrian Arab Republic
+        /// </summary>
+        SyrianArabRepublic,
+        /// <summary>
+        /// Chad
+        /// </summary>
+        Chad,
+        /// <summary>
+        /// Tajikistan
+        /// </summary>
+        Tajikistan,
+        /// <summary>
+        /// Tokelau
+        /// </summary>
+        Tokelau,
+        /// <summary>
+        /// Timor-Leste (East Timor)
+        /// </summary>
+        TimorLeste,
+        /// <summary>
+        /// Turkmenistan
+        /// </summary>
+        Turkmenistan,
+        /// <summary>
+        /// Tonga
+        /// </summary>
+        Tonga,
+        /// <summary>
+        /// Tuvalu
+        /// </summary>
+        Tuvalu,
+        /// <summary>
+        /// Tanzania
+        /// </summary>
+        Tanzania,
+        /// <summary>
+        /// Ukraine
+        /// </summary>
+        Ukraine,
+        /// <summary>
+        /// Uruguay
+        /// </summary>
+        Uruguay,
+        /// <summary>
+        /// Uzbekistan
+        /// </summary>
+        Uzbekistan,
+        /// <summary>
+        /// Vatican City
+        /// </summary>
+        VaticanCity,
+        /// <summary>
+        /// Vanuatu
+        /// </summary>
+        Vanuatu,
+        /// <summary>
+        /// Wallis and Futuna (Territoire francais d'outre-mer)
+        /// </summary>
+        WallisAndFutuna,
+        /// <summary>
+        /// Samoa
+        /// </summary>
+        Samoa,
+        /// <summary>
+        /// Yemen
+        /// </summary>
+        Yemen,
+        /// <summary>
+        /// Mayotte
+        /// </summary>
+        Mayotte,
+        /// <summary>
+        /// Current System Value
+        /// </summary>
+        System,
+        Max
+    }
+}
diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsErrorFactory.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsErrorFactory.cs
new file mode 100644 (file)
index 0000000..afac3ef
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * 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 Tizen.Internals.Errors;
+
+namespace Tizen.PhonenumberUtils
+{
+    internal enum PhonenumberUtilsError
+    {
+        None = ErrorCode.None,
+        IoError = ErrorCode.IoError,
+        OutOfMemory = ErrorCode.OutOfMemory,
+        InvalidParameter = ErrorCode.InvalidParameter,
+        FileNoSpaceOnDevice = ErrorCode.FileNoSpaceOnDevice,
+        PermissionDenied = ErrorCode.PermissionDenied,
+        NotSupported = ErrorCode.NotSupported,
+        NoData = ErrorCode.NoData,
+        System = -0x02020000 | 0xEF,
+    }
+
+    static internal class Globals
+    {
+        internal const string LogTag = "Tizen.PhonenumberUtils";
+    }
+
+    internal static class PhonenumberUtilsErrorFactory
+    {
+        static internal void ThrowPhonenumberUtilsException(int e)
+        {
+            PhonenumberUtilsError err = (PhonenumberUtilsError)e;
+
+            switch (err)
+            {
+                case PhonenumberUtilsError.InvalidParameter:
+                    throw new ArgumentException(err.ToString());
+                case PhonenumberUtilsError.NotSupported:
+                    throw new NotSupportedException(err.ToString());
+                case PhonenumberUtilsError.PermissionDenied:
+                    throw new UnauthorizedAccessException(err.ToString());
+                case PhonenumberUtilsError.OutOfMemory:
+                    throw new OutOfMemoryException(err.ToString());
+                default:
+                    throw new InvalidOperationException(err.ToString());
+            }
+        }
+    }
+}