--- /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
+%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
+%{!?dotnet_core_path: %define dotnet_core_path %{_datadir}/tizen.net/ref}
+
+%if 0%{?tizen_build_devel_mode}
+%define BUILDCONF Debug
+%else
+%define BUILDCONF Release
+%endif
+
+Name: csapi-contacts-service
+Summary: Tizen Contacts Service 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
+
+BuildRequires: mono-compiler
+BuildRequires: mono-devel
+
+BuildRequires: dotnet-build-tools
+
+# C# API Requires
+BuildRequires: csapi-tizen-nuget
+
+%description
+Tizen Contacts Service API for C#
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%define Assemblies Tizen.Pims.Contacts
+
+%build
+for ASM in %{Assemblies}; do
+# NuGet Restore
+find $ASM/*.project.json -exec nuget restore {} \;
+# Build
+find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
+# NuGet Pack
+nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
+done
+
+%install
+# Runtime Binary
+mkdir -p %{buildroot}%{dotnet_assembly_path}
+for ASM in %{Assemblies}; do
+%if 0%{?_with_corefx}
+ install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+%else
+ install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+%endif
+done
+
+# NuGet
+mkdir -p %{buildroot}/nuget
+install -p -m 644 *.nupkg %{buildroot}/nuget
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%attr(644,root,root) %{dotnet_assembly_path}/*.dll
+
+%package nuget
+Summary: NuGet package for %{name}
+Group: Development/Libraries
+
+%description nuget
+NuGet package for %{name}
+
+%files nuget
+/nuget/*.nupkg
--- /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;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ internal static class Activity
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_activity_delete_by_contact_id")]
+ internal static extern int DeleteByContactId(int contactId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_activity_delete_by_account_id")]
+ internal static extern int DeleteByAccountId(int accountId);
+ }
+}
--- /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;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ /// <summary>
+ /// Contacts Interop Class
+ /// </summary>
+ internal static class Contacts
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_connect")]
+ internal static extern int Connect();
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_disconnect")]
+ internal static extern int Disconnect();
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_connect_on_thread")]
+ internal static extern int OnThreadConnect();
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_disconnect_on_thread")]
+ internal static extern int OnThreadDisconnect();
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_connect_with_flags")]
+ internal static extern int DisconnectWithFlags(uint flags);
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal enum ContactsChanged
+ {
+ Inserted,
+ Updated,
+ Deleted
+ }
+
+ internal static partial class Database
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_insert_record")]
+ internal static extern int Insert(IntPtr recordHandle, out int recordId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_record")]
+ internal static extern int Get(string uri, int recordId, out IntPtr recordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_update_record")]
+ internal static extern int Update(IntPtr recordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_delete_record")]
+ internal static extern int Delete(string uri, int recordId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_replace_record")]
+ internal static extern int Replace(IntPtr recordHandle, int recordId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_all_records")]
+ internal static extern int GetRecords(string uri, int offset, int limit, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_records_with_query")]
+ internal static extern int GetRecords(IntPtr queryHandle, int offset, int limit, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_insert_records")]
+ internal static extern int InsertRecords(IntPtr listHandle, out IntPtr ids, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_update_records")]
+ internal static extern int UpdateRecords(IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_delete_records")]
+ internal static extern int DeleteRecords(string uri, int[] recordIdArray, int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_replace_records")]
+ internal static extern int ReplaceRecords(IntPtr listHandle, int[] recordIdArray, int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_current_version")]
+ internal static extern int GetVersion(out int contactsDbVersion);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_add_changed_cb")]
+ internal static extern int AddChangedCb(string uri, ContactsDbChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_remove_changed_cb")]
+ internal static extern int RemoveChangedCb(string uri, ContactsDbChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_changes_by_version")]
+ internal static extern int GetChangesByVersion(string uri, int addressBookId, int contactsDbVersion, out IntPtr changeRecordList, out int currentContactsDbVersion);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records")]
+ internal static extern int Search(string uri, string keyword, int offset, int limit, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records_with_query")]
+ internal static extern int Search(IntPtr queryHandle, string keyword, int offset, int limit, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records_with_range")]
+ internal static extern int Search(string uri, string keyword, int offset, int limit, int range, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records_for_snippet")]
+ internal static extern int Search(string uri, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records_with_query_for_snippet")]
+ internal static extern int Search(IntPtr queryHandle, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records_with_range_for_snippet")]
+ internal static extern int Search(string uri, string keyword, int offset, int limit, int range, string startMatch, string endMatch, int tokenNumber, out IntPtr listHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_count")]
+ internal static extern int GetCount(string uri, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_count_with_query")]
+ internal static extern int GetCount(IntPtr queryHandle, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_last_change_version")]
+ internal static extern int GetLastChangeVersion(out int version);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_status")]
+ internal static extern int GetStatus(out Tizen.Pims.Contacts.ContactsDatabase.DbStatus status);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_add_changed_cb")]
+ internal static extern int AddStatusChangedCb(ContactsDbStatusChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_remove_changed_cb")]
+ internal static extern int RemoveStatusChangedCb(ContactsDbStatusChangedCallback callback, IntPtr userData);
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate void ContactsDbChangedCallback(string uri, IntPtr userData);
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate void ContactsDbStatusChangedCallback(Tizen.Pims.Contacts.ContactsDatabase.DbStatus status, IntPtr userData);
+ }
+}
--- /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 static Tizen.Pims.Contacts.ContactsFilter;
+
+internal static partial class Interop
+{
+ internal static partial class Filter
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_create")]
+ internal static extern int ContactsFilterCreate(string uri, out IntPtr filterHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_destroy")]
+ internal static extern int ContactsFilterDestroy(IntPtr filterHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_str")]
+ internal static extern int ContactsFilterAddStr(IntPtr filterHandle, uint propertyId, StringMatchType match, string matchValue);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_int")]
+ internal static extern int ContactsFilterAddInt(IntPtr filterHandle, uint propertyId, IntegerMatchType match, int matchValue);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_lli")]
+ internal static extern int ContactsFilterAddLli(IntPtr filterHandle, uint propertyId, IntegerMatchType match, long matchValue);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_double")]
+ internal static extern int ContactsFilterAddDouble(IntPtr filterHandle, uint propertyId, IntegerMatchType match, double matchValue);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_bool")]
+ internal static extern int ContactsFilterAddBool(IntPtr filterHandle, uint propertyId, bool matchValue);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_operator")]
+ internal static extern int ContactsFilterAddOperator(IntPtr filterHandle, LogicalOperator operatorType);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_filter_add_filter")]
+ internal static extern int ContactsFilterAddFilter(IntPtr parentFilter, IntPtr childFilter);
+
+
+ }
+}
--- /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;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ /// <summary>
+ /// Contacts Interop Class
+ /// </summary>
+ internal static class Group
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_group_add_contact")]
+ internal static extern int AddContact(int groupId, int contactId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_group_remove_contact")]
+ internal static extern int RemoveContact(int groupId, int contactId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_group_set_group_order")]
+ internal static extern int SetGroupOrder(int groupId, int previousGroupId, int nextGroupId);
+ }
+}
\ No newline at end of file
--- /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.
+ */
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ internal static partial class Libraries
+ {
+ public const string Contacts = "libcontacts-service2.so.0";
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal static partial class List
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_create")]
+ internal static extern int ContactsListCreate(out IntPtr contactsList);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_destroy")]
+ internal static extern int ContactsListDestroy(IntPtr contactsList, bool deleteChild);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_get_count")]
+ internal static extern int ContactsListGetCount(IntPtr contactsList, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_add")]
+ internal static extern int ContactsListAdd(IntPtr contactsList, IntPtr recordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_remove")]
+ internal static extern int ContactsListRemove(IntPtr contactsList, IntPtr recordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_get_current_record_p")]
+ internal static extern int ContactsListGetCurrentRecordP(IntPtr contactsList, out IntPtr recordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_prev")]
+ internal static extern int ContactsListPrev(IntPtr contactsList);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_next")]
+ internal static extern int ContactsListNext(IntPtr contactsList);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_first")]
+ internal static extern int ContactsListFirst(IntPtr contactsList);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_list_last")]
+ internal static extern int ContactsListLast(IntPtr contactsList);
+
+
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal enum ContactsPersonProperty
+ {
+ NameContact, // Default contacts record
+ Number, // Default number record
+ Email, // Default Email record
+ Image // Default image record
+ };
+
+ internal enum ContactsUsageType
+ {
+ None, /**< None */
+ OutgoingCall, /**< Outgoing Call */
+ OutgoingMsg, /**< Outgoing message */
+ OutgoingEmail, /**< Outgoing Email (Since 3.0) */
+ IncomingCall, /**< Incoming Call (Since 3.0) */
+ IncomingMsg, /**< Incoming message (Since 3.0) */
+ IncomingEmail,/**< Incoming Email (Since 3.0) */
+ MissedCall, /**< Missed Call (Since 3.0) */
+ RejectedCall, /**< Rejected Call (Since 3.0) */
+ BlockedCall, /**< Blocked Call (Since 3.0) */
+ BlockedMsg /**< Blocked message (Since 3.0) */
+ };
+
+ internal static partial class Person
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_link_person")]
+ internal static extern int ContactsPersonLinkPerson(int basePersonId, int personId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_unlink_contact")]
+ internal static extern int ContactsPersonUnlinkContact(int personId, int contactId, out int unlinkedPersonId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_reset_usage")]
+ internal static extern int ContactsPersonResetUsage(int personId, ContactsUsageType type);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_favorite_order")]
+ internal static extern int ContactsPersonSetFavoriteOrder(int personId, int previousPersonId, int nextPersonId);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_default_property")]
+ internal static extern int ContactsPersonSetDefaultProperty(ContactsPersonProperty property, int personId, int id);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_default_property")]
+ internal static extern int ContactsPersonGetDefaultProperty(ContactsPersonProperty property, int personId, out int id);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_aggregation_suggestions")]
+ internal static extern int ContactsPersonGetAggregationSuggestions(int personId, int limit, out IntPtr listHandle);
+
+
+ }
+}
--- /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;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ internal static class PhoneLog
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_phone_log_reset_statistics")]
+ internal static extern int resetStatistics();
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_phone_log_reset_statistics_by_sim")]
+ internal static extern int resetStatisticsBySim(int simSlotNo);
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal static partial class Query
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_create")]
+ internal static extern int ContactsQueryCreate(string uri, out IntPtr queryHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_destroy")]
+ internal static extern int ContactsQueryDestroy(IntPtr queryHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_set_projection")]
+ internal static extern int ContactsQuerySetProjection(IntPtr queryHandle, uint[] propertyIdArray, int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_set_distinct")]
+ internal static extern int ContactsQuerySetDistinct(IntPtr queryHandle, bool set);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_set_filter")]
+ internal static extern int ContactsQuerySetFilter(IntPtr queryHandle, IntPtr filterHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_query_set_sort")]
+ internal static extern int ContactsQuerySetSort(IntPtr queryHandle, uint propertyId, bool isAscending);
+
+
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal static partial class Record
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_create")]
+ internal static extern int Create(string uri, out IntPtr recordIdHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_destroy")]
+ internal static extern int Destroy(IntPtr recordHandle, bool deleteChild);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone")]
+ internal static extern int Clone(IntPtr recordHandle, out IntPtr clonedRecordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str")]
+ internal static extern int GetStr(IntPtr recordHandle, uint propertyId, out string value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str_p")]
+ internal static extern int GetStrP(IntPtr recordHandle, uint propertyId, out string value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_str")]
+ internal static extern int SetStr(IntPtr recordHandle, uint propertyId, string value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_int")]
+ internal static extern int GetInt(IntPtr recordHandle, uint propertyId, out int value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_int")]
+ internal static extern int SetInt(IntPtr recordHandle, uint propertyId, int value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_lli")]
+ internal static extern int GetLli(IntPtr recordHandle, uint propertyId, out long value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_lli")]
+ internal static extern int SetLli(IntPtr recordHandle, uint propertyId, long value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_bool")]
+ internal static extern int GetBool(IntPtr recordHandle, uint propertyId, out bool value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_bool")]
+ internal static extern int SetBool(IntPtr recordHandle, uint propertyId, bool value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_double")]
+ internal static extern int GetDouble(IntPtr recordHandle, uint propertyId, out double value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_double")]
+ internal static extern int SetDouble(IntPtr recordHandle, uint propertyId, double value);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_add_child_record")]
+ internal static extern int AddChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_remove_child_record")]
+ internal static extern int RemoveChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_child_record_count")]
+ internal static extern int GetChildRecordCount(IntPtr recordHandle, uint propertyId, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_child_record_at_p")]
+ internal static extern int GetChildRecordAtP(IntPtr recordHandle, uint propertyId, int index, out IntPtr childRecordHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone_child_record_list")]
+ internal static extern int CloneChildRecordList(IntPtr recordHandle, uint propertyId, out IntPtr clonedListHandle);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_uri_p")]
+ internal static extern int GetUriP(IntPtr recordHandle, out IntPtr uri);
+ }
+}
--- /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.Pims.Contacts;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ internal static class Setting
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_get_name_display_order")]
+ internal static extern int GetNameDisplayOrder(out ContactDisplayOrder nameDisplayOrder);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_set_name_display_order")]
+ internal static extern int SetNameDisplayOrder(ContactDisplayOrder nameDisplayOrder);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_get_name_sorting_order")]
+ internal static extern int GetNameSortingOrder(out ContactSortingOrder nameSortingOrder);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_set_name_sorting_order")]
+ internal static extern int SetNameSortingOrder(ContactSortingOrder nameSortingOrder);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_add_name_display_order_changed_cb")]
+ internal static extern int AddNameDisplayOrderChangedCB(DisplayOrderChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_remove_name_display_order_changed_cb")]
+ internal static extern int RemoveNameDisplayOrderChangedCB(DisplayOrderChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_add_name_sorting_order_changed_cb")]
+ internal static extern int AddNameSortingOrderChangedCB(SortingOrderChangedCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_setting_remove_name_sorting_order_changed_cb")]
+ internal static extern int RemoveNameSortingOrderChangedCB(SortingOrderChangedCallback callback, IntPtr userData);
+
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate void DisplayOrderChangedCallback(ContactDisplayOrder nameDisplayOrder, IntPtr userData);
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate void SortingOrderChangedCallback(ContactSortingOrder nameSortingOrder, IntPtr userData);
+ }
+}
--- /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;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ internal static class Sim
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_sim_import_all_contacts_by_sim_slot_no")]
+ internal static extern int ImportAllContactsBySimSlotNo(int sim_slot_no, ContactsSimImportProgressCallback callback, IntPtr userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_sim_get_initialization_status_by_sim_slot_no")]
+ internal static extern int GetInitializatOnStatusBySimSlotNo(int sim_slot_no, out bool completed);
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate void ContactsSimImportProgressCallback(string uri, IntPtr userData);
+ }
+}
--- /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;
+
+internal static partial class Interop
+{
+ internal static partial class Vcard
+ {
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_parse_to_contact_foreach")]
+ internal static extern int ContactsVcardParseToContactForeach(string vcardFilePath, ContactsVcardParseCallback callback, IntPtr /* void */ userData);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_parse_to_contacts")]
+ internal static extern int ContactsVcardParseToContacts(string vcardStream, out IntPtr contactsList);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_make_from_contact")]
+ internal static extern int ContactsVcardMakeFromContact(IntPtr contact, out string vcardStream);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_make_from_my_profile")]
+ internal static extern int ContactsVcardMakeFromMyProfile(IntPtr myProfile, out string vcardStream);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_make_from_person")]
+ internal static extern int ContactsVcardMakeFromPerson(IntPtr person, out string vcardStream);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_get_entity_count")]
+ internal static extern int ContactsVcardGetEntityCount(string vcardFilePath, out int count);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_get_limit_size_of_photo")]
+ internal static extern int ContactsVcardGetLimitSizeOfPhoto(out uint limitSize);
+
+ [DllImport(Libraries.Contacts, EntryPoint = "contacts_vcard_set_limit_size_of_photo")]
+ internal static extern int ContactsVcardSetLimitSizeOfPhoto(uint limitSize);
+
+ [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+ internal delegate bool ContactsVcardParseCallback(IntPtr recordHandle, IntPtr /* void */ userData);
+ }
+}
--- /dev/null
+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.Pims.Contacts")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tizen.Pims.Contacts")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[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("4096f513-b77a-4319-9406-caf715e01561")]
+
+// 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")]
--- /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
+ <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>{4096F513-B77A-4319-9406-CAF715E01561}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>Tizen.Pims.Contacts</RootNamespace>\r
+ <AssemblyName>Tizen.Pims.Contacts</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>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
+ <ItemGroup>\r
+ <None Include="Tizen.Pims.Contacts.project.json" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsErrorFactory.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsList.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsVcard.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\DBStatusChangedEventArgs.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsQuery.cs" />\r
+ <Compile Include="Interop\Interop.Activity.cs" />\r
+ <Compile Include="Interop\Interop.Contacts.cs" />\r
+ <Compile Include="Interop\Interop.Database.cs" />\r
+ <Compile Include="Interop\Interop.Filter.cs" />\r
+ <Compile Include="Interop\Interop.Group.cs" />\r
+ <Compile Include="Interop\Interop.Libraries.cs" />\r
+ <Compile Include="Interop\Interop.List.cs" />\r
+ <Compile Include="Interop\Interop.Person.cs" />\r
+ <Compile Include="Interop\Interop.PhoneLog.cs" />\r
+ <Compile Include="Interop\Interop.Query.cs" />\r
+ <Compile Include="Interop\Interop.Record.cs" />\r
+ <Compile Include="Interop\Interop.Setting.cs" />\r
+ <Compile Include="Interop\Interop.Sim.cs" />\r
+ <Compile Include="Interop\Interop.Vcard.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsDatabase.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsFilter.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsManager.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsRecord.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\ContactsViews.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\NameDisplayOrderChangedEventArgs.cs" />\r
+ <Compile Include="Tizen.Pims.Contacts\NameSortingOrderChangedEventArgs.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
+ <ProjectExtensions>\r
+ <VisualStudio>\r
+ <UserProperties Tizen_1Pims_1Contacts_1project_1json__JSONSchema="" />\r
+ </VisualStudio>\r
+ </ProjectExtensions>\r
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<package>
+ <metadata>
+ <id>Tizen.Pims.Contacts</id>
+ <version>$version$</version>
+ <authors>Tizen Developers</authors>
+ <description>Contacts Service API for Tizen.Net</description>
+ <dependencies>
+ <dependency id="Tizen" version="1.0.0" />
+ </dependencies>
+ </metadata>
+</package>
--- /dev/null
+{
+ "dependencies": {
+ "NETStandard.Library": "1.6.0",
+ "Tizen": "1.0.2"
+ },
+ "frameworks": {
+ "netstandard1.3": {}
+ }
+}
\ No newline at end of file
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Pims.Contacts", "Tizen.Pims.Contacts.csproj", "{4096F513-B77A-4319-9406-CAF715E01561}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4096F513-B77A-4319-9406-CAF715E01561}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4096F513-B77A-4319-9406-CAF715E01561}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4096F513-B77A-4319-9406-CAF715E01561}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4096F513-B77A-4319-9406-CAF715E01561}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
--- /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.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// ContactsDatabase class is the interface class for managing contacts information from/to the database.
+ /// This class allows user to access/create/update db operations for contacts information.
+ /// </summary>
+ public class ContactsDatabase
+ {
+ /// <summary>
+ /// Called when the designated view changes.
+ /// </summary>
+ /// <param name="uri">The contacts view URI</param>
+ /// <remarks>
+ /// The delegate must be registered using AddDBChangedDelegate.
+ /// </remarks>
+ /// <see cref="AddDBChangedDelegate"/>
+ public delegate void ContactsDbChangedDelegate(string uri);
+ private Object thisLock = new Object();
+ private Interop.Database.ContactsDbStatusChangedCallback _contactsDbStatusChangedCallback;
+ private event EventHandler<DBStatusChangedEventArgs> _dbStatusChanged;
+ private Dictionary<string, ContactsDbChangedDelegate> _callbackMap = new Dictionary<string, ContactsDbChangedDelegate>();
+ private Dictionary<string, Interop.Database.ContactsDbChangedCallback> _delegateMap = new Dictionary<string, Interop.Database.ContactsDbChangedCallback>();
+ private Interop.Database.ContactsDbChangedCallback _dbChangedDelegate;
+
+ internal ContactsDatabase()
+ {
+ //To be created in ContactsManager only.
+ }
+
+ /// <summary>
+ /// Enumeration for contacts database status.
+ /// </summary>
+ public enum DbStatus
+ {
+ /// <summary>
+ /// Normal
+ /// </summary>
+ Normal,
+ /// <summary>
+ /// Enumeration for contact DB status.
+ /// </summary>
+ ChangingCollation
+ }
+
+ /// <summary>
+ /// Enumeration for Contacts search range.
+ /// </summary>
+ public enum SearchRange
+ {
+ /// <summary>
+ /// Search record from name
+ /// </summary>
+ Name = 0x00000001,
+ /// <summary>
+ /// Search record from name and number
+ /// </summary>
+ Number = 0x00000002,
+ /// <summary>
+ /// Search record from name,number and data
+ /// </summary>
+ Data = 0x00000004,
+ /// <summary>
+ /// Search record from name,number,data and email. Now, support only PersonEmail view
+ /// </summary>
+ Email = 0x00000008,
+ }
+
+ /// <summary>
+ /// (event) DBStatusChanged is raised when changing contacts database status.
+ /// </summary>
+ public event EventHandler<DBStatusChangedEventArgs> DBStatusChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _contactsDbStatusChangedCallback = (DbStatus status, IntPtr userData) =>
+ {
+ DBStatusChangedEventArgs args = new DBStatusChangedEventArgs(status);
+ _dbStatusChanged?.Invoke(this, args);
+ };
+
+ int error = Interop.Database.AddStatusChangedCb(_contactsDbStatusChangedCallback, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Add StatusChanged Failed with error " + error);
+ }
+ else
+ {
+ _dbStatusChanged += value;
+ }
+ }
+
+ }
+
+ remove
+ {
+ lock (thisLock)
+ {
+ int error = Interop.Database.RemoveStatusChangedCb(_contactsDbStatusChangedCallback, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Remove StatusChanged Failed with error " + error);
+ }
+
+ _dbStatusChanged -= value;
+ }
+ }
+
+ }
+
+
+ /// <summary>
+ /// The current contacts database version.
+ /// </summary>
+ public int Version
+ {
+ get
+ {
+ int version = -1;
+ int error = Interop.Database.GetVersion(out version);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Version Failed with error " + error);
+ }
+ return version;
+ }
+ }
+
+ /// <summary>
+ /// The last successful changed contacts database version on the current connection.
+ /// </summary>
+ public int LastChangeVersion
+ {
+ get
+ {
+ int version = -1;
+ int error = Interop.Database.GetLastChangeVersion(out version);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "LastChangeVersion Failed with error " + error);
+ }
+ return version;
+ }
+ }
+
+ /// <summary>
+ /// The contacts database status.
+ /// </summary>
+ public DbStatus Status
+ {
+ get
+ {
+ DbStatus status;
+ int error = Interop.Database.GetStatus(out status);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetStatus Failed with error " + error);
+ }
+ return status;
+ }
+ }
+
+ /// <summary>
+ /// Inserts a record into the contacts database.
+ /// </summary>
+ /// <param name="record">The record to insert</param>
+ /// <returns>The ID of inserted record</returns>
+ public int Insert(ContactsRecord record)
+ {
+ int id = -1;
+ int error = Interop.Database.Insert(record._recordHandle, out id);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Insert Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return id;
+ }
+
+ /// <summary>
+ /// Inserts multiple records into the contacts database as a batch operation.
+ /// </summary>
+ /// <param name="list">The record list</param>
+ /// <returns>The inserted record ID array</returns>
+ public int[] Insert(ContactsList list)
+ {
+ IntPtr ids;
+ int count;
+ int error = Interop.Database.InsertRecords(list._listHandle, out ids, out count);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Insert Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ int[] idArr = new int[count];
+ Marshal.Copy(ids, idArr, 0, count);
+
+ return idArr;
+ }
+
+ /// <summary>
+ /// Gets a record from the contacts database.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a record</param>
+ /// <param name="recordId">The record ID</param>
+ /// <returns>The record associated with the record ID</returns>
+ public ContactsRecord Get(string viewUri, int recordId)
+ {
+ IntPtr handle;
+ int error = Interop.Database.Get(viewUri, recordId, out handle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsRecord(handle);
+ }
+
+ /// <summary>
+ /// Updates a record in the contacts database.
+ /// </summary>
+ /// <param name="record">The record to update</param>
+ public void Update(ContactsRecord record)
+ {
+ int error = Interop.Database.Update(record._recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Update Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Updates multiple records in the contacts database as a batch operation.
+ /// </summary>
+ /// <param name="list">The record list</param>
+ public void Update(ContactsList list)
+ {
+ int error = Interop.Database.UpdateRecords(list._listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Update Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Deletes a record from the contacts database with related child records.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a record</param>
+ /// <param name="recordId">The record ID to delete</param>
+ public void Delete(string viewUri, int recordId)
+ {
+ int error = Interop.Database.Delete(viewUri, recordId);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Delete Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Deletes multiple records with related child records from the contacts database as a batch operation.
+ /// </summary>
+ /// <param name="viewUri">The view URI of the records to delete</param>
+ /// <param name="idArray">The record IDs to delete</param>
+ public void Delete(string viewUri, int[] idArray)
+ {
+ int error = Interop.Database.DeleteRecords(viewUri, idArray, idArray.Length);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Delete Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Replaces a record in the contacts database.
+ /// </summary>
+ /// <param name="record">The record to replace</param>
+ /// <param name="id">the record ID</param>
+ public void Replace(ContactsRecord record, int recordId)
+ {
+ int error = Interop.Database.Replace(record._recordHandle, recordId);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Replace Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Replaces multiple records in the contacts database as a batch operation.
+ /// </summary>
+ /// <param name="list">The record list to replace</param>
+ /// <param name="idArray">The record IDs</param>
+ public void Replace(ContactsList list, int[] idArray)
+ {
+ int error = Interop.Database.ReplaceRecords(list._listHandle, idArray, idArray.Length);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Replace Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Retrieves all records as a list.
+ /// </summary>
+ /// <param name="viewUri">The view URI to get records</param>
+ /// <param name="offset">The index from which results</param>
+ /// <param name="limit">The number to limit results(value 0 is used for all records)</param>
+ /// <returns>
+ /// The record list
+ /// </returns>
+ public ContactsList GetAll(string viewUri, int offset, int limit)
+ {
+ IntPtr handle;
+ int error = Interop.Database.GetRecords(viewUri, offset, limit, out handle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetAll Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(handle);
+ }
+
+ /// <summary>
+ /// Retrieves records using a query.
+ /// </summary>
+ /// <param name="query">The query to filter the results</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
+ /// <returns>
+ /// The record list
+ /// </returns>
+ public ContactsList GetRecordsWithQuery(ContactsQuery query, int offset, int limit)
+ {
+ IntPtr handle;
+ int error = Interop.Database.GetRecords(query._queryHandle, offset, limit, out handle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetAllWithQuery Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(handle);
+ }
+
+ /// <summary>
+ /// Retrieves records changes since the given database version.
+ /// </summary>
+ /// <param name="viewUri">The view URI to get records</param>
+ /// <param name="addressbookId">The address book ID to filter</param>
+ /// <param name="contactsDBVersion">The contacts database version</param>
+ /// <param name="currentDBVersion">The current contacts database version</param>
+ /// <returns>
+ /// The record list
+ /// </returns>
+ public ContactsList GetChangesByVersion(string viewUri, int addressbookId, int contactsDBVersion, out int currentDBVersion)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.GetChangesByVersion(viewUri, addressbookId, contactsDBVersion, out recordList,out currentDBVersion);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetChangesByVersion Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on a given keyword.
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
+ /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned.
+ /// </remarks>
+ /// <param name="viewUri">The view URI to find records</param>
+ /// <param name="keywrod">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
+ /// <returns></returns>
+ public ContactsList Search(string viewUri, string keywrod, int offset, int limit)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(viewUri, keywrod, offset, limit, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on given query and keyword.
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
+ /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned.
+ /// </remarks>
+ /// <param name="query">The query to filter</param>
+ /// <param name="keyword">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 used for get all records)</param>
+ /// <returns>The record list</returns>
+ public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(query._queryHandle, keyword, offset, limit, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on a keyword and range.
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA.
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL.
+ /// </remarks>
+ /// <param name="viewUri">The view URI</param>
+ /// <param name="keyword">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
+ /// <param name="range">The search range</param>
+ /// <returns>The record list</returns>
+ public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(viewUri, keyword, offset, limit, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on a given keyword for snippet
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
+ /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned
+ /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records().
+ /// </remarks>
+ /// <param name="viewUri">The view URI to find records</param>
+ /// <param name="keyword">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 used for get all records)</param>
+ /// <param name="startMatch">The text which is inserted into the fragment before the keyword(If NULL, default is "[")</param>
+ /// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
+ /// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
+ /// <returns>The record list</returns>
+ public ContactsList Search(string viewUri, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(viewUri, keyword, offset, limit, startMatch, endMatch, tokenNumber, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on given query and keyword for snippet.
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
+ /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned
+ /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_query().
+ /// </remarks>
+ /// <param name="query">The query to filter</param>
+ /// <param name="keyword">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 used for get all records)</param>
+ /// <param name="startMatch">The text which is inserted into the fragment before the keyword(If NULL, default is "[")</param>
+ /// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
+ /// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
+ /// <returns>The record list</returns>
+ public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(query._queryHandle, keyword, offset, limit, startMatch, endMatch, tokenNumber, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Finds records based on a keyword and range for snippet.
+ /// </summary>
+ /// <remarks>
+ /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned,
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA.
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.
+ /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL.
+ /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_range().
+ /// </remarks>
+ /// <param name="viewUri">The view URI</param>
+ /// <param name="keyword">The keyword</param>
+ /// <param name="offset">The index from which to get results</param>
+ /// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
+ /// <param name="range">The search range</param>
+ /// <param name="startMatch">The text which is inserted into the fragment before the keyword(If NULL, default is "[")</param>
+ /// <param name="endMatch">The text which is inserted into the fragment after the keyword(If NULL, default is "]")</param>
+ /// <param name="tokenNumber">The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home")</param>
+ /// <returns>The record list</returns>
+ public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range, string startMatch, string endMatch, int tokenNumber)
+ {
+ IntPtr recordList;
+ int error = Interop.Database.Search(viewUri, keyword, offset, limit, range, startMatch, endMatch, tokenNumber, out recordList);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Search Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsList(recordList);
+ }
+
+ /// <summary>
+ /// Gets the number of records in a specific view
+ /// </summary>
+ /// <param name="viewUri">The view URI</param>
+ /// <returns>The count of records</returns>
+ public int GetCount(string viewUri)
+ {
+ int count = -1;
+ int error = Interop.Database.GetCount(viewUri, out count);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetCount Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return count;
+ }
+
+ /// <summary>
+ /// Gets the number of records matching a query.
+ /// </summary>
+ /// <param name="query">The query used for filtering the results</param>
+ /// <returns>The count of records</returns>
+ public int GetCount(ContactsQuery query)
+ {
+ int count = -1;
+ int error = Interop.Database.GetCount(query._queryHandle, out count);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetCount Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return count;
+ }
+
+ /// <summary>
+ /// Registers a callback function to be invoked when a record changes.
+ /// </summary>
+ /// <param name="viewUri">The view URI of records whose changes are monitored</param>
+ /// <param name="callback">The callback function to register</param>
+ public void AddDBChangedDelegate(string viewUri, ContactsDbChangedDelegate callback)
+ {
+ _dbChangedDelegate = (string uri, IntPtr userData) =>
+ {
+ _callbackMap[uri](uri);
+ };
+ int error = Interop.Database.AddChangedCb(viewUri, _dbChangedDelegate, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddDBChangedDelegate Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _callbackMap[viewUri] = callback;
+ _delegateMap[viewUri] = _dbChangedDelegate;
+ }
+
+ /// <summary>
+ /// Unregisters a callback function.
+ /// </summary>
+ /// <param name="viewUri">The view URI of records whose changes are monitored</param>
+ /// <param name="callback">The callback function to register</param>
+ public void RemoveDBChangedDelegate(string viewUri, ContactsDbChangedDelegate callback)
+ {
+ int error = Interop.Database.RemoveChangedCb(viewUri, _delegateMap[viewUri], IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "RemoveDBChangedDelegate Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _callbackMap.Remove(viewUri);
+ _delegateMap.Remove(viewUri);
+ }
+ }
+}
--- /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 Tizen.Internals.Errors;
+
+namespace Tizen.Pims.Contacts
+{
+ internal enum ContactsError
+ {
+ None = (int)ErrorCode.None,
+ InvalidParameter = (int)ErrorCode.InvalidParameter,
+ NotSupported = (int)ErrorCode.NotSupported,
+ PermissionDenied = (int)ErrorCode.PermissionDenied,
+ OutOfMemory = (int)ErrorCode.OutOfMemory,
+ FileNoSpaceOnDevice = (int)ErrorCode.FileNoSpaceOnDevice,
+ NoData = (int)ErrorCode.NoData,
+
+ DatabaseLocked = -0x02010000 | 0x81,
+ Database = -0x02010000 | 0x9F,
+ IpcNotAvaliable = -0x02010000 | 0xB1,
+ Ipc = -0x02010000 | 0xBF,
+ System = -0x02010000 | 0xEF
+ }
+
+ internal static class Globals
+ {
+ internal const string LogTag = "Tizen.Pims.Contacts";
+ }
+
+ internal static class ContactsErrorFactory
+ {
+ static internal Exception CheckAndCreateException(int error)
+ {
+ ContactsError e = (ContactsError)error;
+ switch (e)
+ {
+ case ContactsError.None:
+ return null;
+ case ContactsError.InvalidParameter:
+ return new ArgumentException("Invalid Parameters Provided");
+ case ContactsError.NotSupported:
+ return new NotSupportedException("Not Supported");
+ case ContactsError.PermissionDenied:
+ return new UnauthorizedAccessException("Permission Denied");
+ case ContactsError.OutOfMemory:
+ return new OutOfMemoryException("Out of Memory");
+ case ContactsError.FileNoSpaceOnDevice:
+ return new InvalidOperationException("File System is Full");
+ case ContactsError.NoData:
+ return new InvalidOperationException("No Data");
+ case ContactsError.DatabaseLocked:
+ return new InvalidOperationException("Database Locked");
+ case ContactsError.Database:
+ return new InvalidOperationException("Database Failed");
+ case ContactsError.IpcNotAvaliable:
+ return new InvalidOperationException("IPC Not Avaliable");
+ case ContactsError.Ipc:
+ return new InvalidOperationException("IPC failed");
+ case ContactsError.System:
+ return new InvalidOperationException("Internal system error");
+ default:
+ return new InvalidOperationException("Unknown Error Code");
+ }
+ }
+ }
+}
--- /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.Collections.Generic;
+using static Interop.Contacts;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// </summary>
+ public class ContactsFilter:IDisposable
+ {
+ internal IntPtr _filterHandle;
+
+ /// <summary>
+ /// Creates a filter with a condition for a string type property.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a filter</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public ContactsFilter(string viewUri, uint propertyId, StringMatchType matchType, string matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddStr(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Creates a filter with a condition for an integer type property.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a filter</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddInt(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Creates a filter with a condition for a long type property.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a filter</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, long matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddLli(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Creates a filter with a condition for a double type property.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a filter</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, double matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddDouble(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Creates a filter with a condition for a boolean type property.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a filter</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public ContactsFilter(string viewUri, uint propertyId, bool matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddBool(_filterHandle, propertyId, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ ~ContactsFilter()
+ {
+ Dispose(false);
+ }
+
+ /// <summary>
+ /// Enumeration for the filter match type of a string.
+ /// </summary>
+ public enum StringMatchType
+ {
+ /// <summary>
+ /// Full string, case-sensitive
+ /// </summary>
+ Exactly,
+ /// <summary>
+ /// Full string, case-insensitive
+ /// </summary>
+ Fullstring,
+ /// <summary>
+ /// Sub string, case-insensitive
+ /// </summary>
+ Contains,
+ /// <summary>
+ /// Start with, case-insensitive
+ /// </summary>
+ Startswith,
+ /// <summary>
+ /// End with, case-insensitive
+ /// </summary>
+ Endswith,
+ /// <summary>
+ /// IS NOT NUL
+ /// </summary>
+ Exists,
+ }
+
+ /// <summary>
+ /// Enumeration for the filter match type of an integer.
+ /// </summary>
+ public enum IntegerMatchType
+ {
+ /// <summary>
+ /// '='
+ /// </summary>
+ Equal,
+ /// <summary>
+ /// '>'
+ /// </summary>
+ GreaterThan,
+ /// <summary>
+ /// '>='
+ /// </summary>
+ GreaterThanOrEqual,
+ /// <summary>
+ /// <
+ /// </summary>
+ LessThan,
+ /// <summary>
+ /// <=
+ /// </summary>
+ LessThanOrEqual,
+ /// <summary>
+ /// <>, this flag can yield poor performance
+ /// </summary>
+ NotEqual,
+ /// <summary>
+ /// IS NULL
+ /// </summary>
+ None,
+ }
+
+ /// <summary>
+ /// Enumeration for a filter operator.
+ /// </summary>
+ public enum LogicalOperator
+ {
+ And,
+ Or,
+ }
+
+ #region IDisposable Support
+ private bool disposedValue = false; // To detect redundant calls
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ int error = Interop.Filter.ContactsFilterDestroy(_filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsFilterDestroy Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+
+ /// <summary>
+ /// Adds a condition for a string type property.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public void AddCondition(LogicalOperator logicalOperator, uint propertyId, StringMatchType matchType, string matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddStr(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Adds a condition for a integer type property.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, int matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddInt(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Adds a condition for a long type property.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, long matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddLli(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Adds a condition for a double type property.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddDouble(_filterHandle, propertyId, matchType, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Adds a condition for a boolean type property.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="propertyId">The property ID to add a condition</param>
+ /// <param name="matchType">The match flag</param>
+ /// <param name="matchValue">The match value</param>
+ public void AddCondition(LogicalOperator logicalOperator, uint propertyId, bool matchValue)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddBool(_filterHandle, propertyId, matchValue);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Adds a child filter to a parent filter.
+ /// </summary>
+ /// <param name="logicalOperator">The operator type</param>
+ /// <param name="filter">The child filter</param>
+ public void AddFilter(LogicalOperator logicalOperator, ContactsFilter filter)
+ {
+ int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ error = Interop.Filter.ContactsFilterAddFilter(_filterHandle, filter._filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(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.
+*/
+
+using System;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// </summary>
+ public class ContactsList:IDisposable
+ {
+ internal IntPtr _listHandle;
+ internal ContactsList(IntPtr handle)
+ {
+ _listHandle = handle;
+ }
+
+ /// <summary>
+ /// Creates a contacts record list.
+ /// </summary>
+ public ContactsList()
+ {
+ int error = Interop.List.ContactsListCreate(out _listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsList Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ ~ContactsList()
+ {
+ Dispose(false);
+ }
+
+ /// <summary>
+ /// The count of contact entity.
+ /// </summary>
+ public int Count
+ {
+ get
+ {
+ int count = -1;
+ int error = Interop.List.ContactsListGetCount(_listHandle, out count);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsList Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return count;
+ }
+ }
+
+ #region IDisposable Support
+ private bool disposedValue = false; // To detect redundant calls
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ int error = Interop.List.ContactsListDestroy(_listHandle, true);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsListDestroy Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+
+ /// <summary>
+ /// Adds a record to the contacts list.
+ /// </summary>
+ /// <param name="record">The record to add</param>
+ public void AddRecord(ContactsRecord record)
+ {
+ int error = Interop.List.ContactsListAdd(_listHandle, record._recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ record._disposedValue = true;
+ }
+
+ /// <summary>
+ /// Removes a record from the contacts list.
+ /// </summary>
+ /// <param name="record">The record to remov</param>
+ public void RemoveRecord(ContactsRecord record)
+ {
+ int error = Interop.List.ContactsListRemove(_listHandle, record._recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "RemoveRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ record._disposedValue = false;
+ }
+
+ /// <summary>
+ /// Retrieves a record from the contacts list.
+ /// </summary>
+ /// <returns>
+ /// contacts record
+ /// </returns>
+ public ContactsRecord GetCurrentRecord()
+ {
+ IntPtr handle;
+ int error = Interop.List.ContactsListGetCurrentRecordP(_listHandle, out handle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetCurrentRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsRecord(handle, true);
+ }
+
+ /// <summary>
+ /// Moves a contacts list to the previous position.
+ /// </summary>
+ /// <returns>
+ /// if cursor is moved to the first, it returns false.
+ /// </returns>
+ public bool MovePrevious()
+ {
+ int error = Interop.List.ContactsListPrev(_listHandle);
+
+ if ((int)ContactsError.None == error)
+ {
+ return true;
+ }
+ else if (Count > 0 && (int)ContactsError.NoData == error)
+ {
+ Log.Debug(Globals.LogTag, "Nodata MovePrevious" + error);
+ return false;
+ }
+ else
+ {
+ Log.Error(Globals.LogTag, "MovePrevious Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Moves a contacts list to the next position.
+ /// </summary>
+ /// <returns>
+ /// if cursor is moved to the end, it returns false.
+ /// </returns>
+ public bool MoveNext()
+ {
+ int error = Interop.List.ContactsListNext(_listHandle);
+
+ if ((int)ContactsError.None == error)
+ {
+ return true;
+ }
+ else if (Count > 0 && (int)ContactsError.NoData == error)
+ {
+ Log.Debug(Globals.LogTag, "Nodata MoveNext" + error);
+ return false;
+ }
+ else
+ {
+ Log.Error(Globals.LogTag, "MoveNext Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Moves a contacts list to the first position.
+ /// </summary>
+ public void MoveFirst()
+ {
+ int error = Interop.List.ContactsListFirst(_listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "MoveFirst Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Moves a contacts list to the last position.
+ /// </summary>
+ public void MoveLast()
+ {
+ int error = Interop.List.ContactsListLast(_listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "MoveFirst Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(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.
+*/
+
+using System;
+using System.Collections.Generic;
+using static Interop.Contacts;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// Enumeration for name display order.
+ /// </summary>
+ public enum ContactDisplayOrder
+ {
+ /// <summary>
+ /// First name comes at the first
+ /// </summary>
+ FirstLast,
+ /// <summary>
+ /// First name comes at the last
+ /// </summary>
+ LastFirst
+ };
+
+ /// <summary>
+ /// Enumeration for name sorting order.
+ /// </summary>
+ public enum ContactSortingOrder
+ {
+ /// <summary>
+ /// Contacts are first sorted based on the first name
+ /// </summary>
+ FirstLast,
+ /// <summary>
+ /// Contacts are first sorted based on the last name
+ /// </summary>
+ LastFirst
+ };
+
+ /// <summary>
+ /// A class for managing contact information. It allows applications to use contacts service.
+ /// </summary>
+ public class ContactsManager : IDisposable
+ {
+ private ContactsDatabase _db = null;
+ private Object thisLock = new Object();
+ private Interop.Setting.DisplayOrderChangedCallback _displayOrderDelegate;
+ private Interop.Setting.SortingOrderChangedCallback _sortingOrderDelegate;
+
+ /// <summary>
+ /// Creates a ContactsManager.
+ /// </summary>
+ public ContactsManager()
+ {
+ int error = Interop.Contacts.Connect();
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Connect Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _db = new ContactsDatabase();
+ }
+
+ ~ContactsManager()
+ {
+ Dispose(false);
+ }
+
+ #region IDisposable Support
+ private bool disposedValue = false; // To detect redundant calls
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ int error = Interop.Contacts.Disconnect();
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Disconnect Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+
+ private event EventHandler<NameDisplayOrderChangedEventArgs> _nameDisplayOrderChanged;
+ private event EventHandler<NameSortingOrderChangedEventArgs> _nameSortingOrderChanged;
+
+ /// <summary>
+ /// (event) NameDisplayOrderChanged is raised when changing setting value of contacts name display order
+ /// </summary>
+ public event EventHandler<NameDisplayOrderChangedEventArgs> NameDisplayOrderChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _displayOrderDelegate = (ContactDisplayOrder nameDisplayOrder, IntPtr userData) =>
+ {
+ NameDisplayOrderChangedEventArgs args = new NameDisplayOrderChangedEventArgs(nameDisplayOrder);
+ _nameDisplayOrderChanged?.Invoke(this, args);
+ };
+ int error = Interop.Setting.AddNameDisplayOrderChangedCB(_displayOrderDelegate, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Add NameDisplayOrderChangedCB Failed with error " + error);
+ }
+ else
+ {
+ _nameDisplayOrderChanged += value;
+ }
+ }
+
+ }
+
+ remove
+ {
+ lock (thisLock)
+ {
+ int error = Interop.Setting.RemoveNameDisplayOrderChangedCB(_displayOrderDelegate, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Remove StateChanged Failed with error " + error);
+ }
+
+ _nameDisplayOrderChanged -= value;
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// (event) NameSortingOrderChanged is raised when changing setting value of contacts name sorting order
+ /// </summary>
+ public event EventHandler<NameSortingOrderChangedEventArgs> NameSortingOrderChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _sortingOrderDelegate = (ContactSortingOrder nameSortingOrder, IntPtr userData) =>
+ {
+ NameSortingOrderChangedEventArgs args = new NameSortingOrderChangedEventArgs(nameSortingOrder);
+ _nameSortingOrderChanged?.Invoke(this, args);
+ };
+ int error = Interop.Setting.AddNameSortingOrderChangedCB(_sortingOrderDelegate, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Add NameSortingOrderChangedCB Failed with error " + error);
+ }
+ else
+ {
+ _nameSortingOrderChanged += value;
+ }
+ }
+
+ }
+
+ remove
+ {
+ lock (thisLock)
+ {
+ int error = Interop.Setting.RemoveNameSortingOrderChangedCB(_sortingOrderDelegate, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Remove StateChanged Failed with error " + error);
+ }
+
+ _nameSortingOrderChanged -= value;
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// A ContactsDatabase
+ /// </summary>
+ public ContactsDatabase Database
+ {
+ get
+ {
+ return _db;
+ }
+ }
+
+ /// <summary>
+ /// A setting value of contacts name display order
+ /// </summary>
+ public ContactDisplayOrder NameDisplayOrder
+ {
+ get
+ {
+ ContactDisplayOrder contactDisplayOrder;
+ int error = Interop.Setting.GetNameDisplayOrder(out contactDisplayOrder);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get NameDisplayOrder Failed with error " + error);
+ }
+ return contactDisplayOrder;
+ }
+ set
+ {
+ int error = Interop.Setting.SetNameDisplayOrder(value);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set NameDisplayOrder Failed with error " + error);
+ }
+ }
+ }
+
+ /// <summary>
+ /// A setting value of contacts name sorting order
+ /// </summary>
+ public ContactSortingOrder NameSortingOrder
+ {
+ get
+ {
+ ContactSortingOrder contactsSortingOrder;
+ int error = Interop.Setting.GetNameSortingOrder(out contactsSortingOrder);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get NameSortingOrder Failed with error " + error);
+ }
+ return contactsSortingOrder;
+ }
+ set
+ {
+ int error = Interop.Setting.SetNameSortingOrder(value);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set NameSortingOrder Failed with error " + 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.
+*/
+
+using System;
+using static Interop.Contacts;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// </summary>
+ public class ContactsQuery : IDisposable
+ {
+ internal IntPtr _queryHandle;
+
+ /// <summary>
+ /// Creates a query.
+ /// </summary>
+ /// <param name="viewUri">The view URI of a query</param>
+ public ContactsQuery(string viewUri)
+ {
+ int error = Interop.Query.ContactsQueryCreate(viewUri, out _queryHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsQuery Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ internal ContactsQuery(IntPtr handle)
+ {
+ _queryHandle = handle;
+ }
+
+ ~ContactsQuery()
+ {
+ Dispose(false);
+ }
+ #region IDisposable Support
+ private bool disposedValue = false;
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ int error = Interop.Query.ContactsQueryDestroy(_queryHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsQueryDestroy Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+
+ /// <summary>
+ /// Adds property IDs for projection.
+ /// </summary>
+ /// <param name="propertyIdArray">The property ID array </param>
+ public void SetProjection(uint[] propertyIdArray)
+ {
+ int error = Interop.Query.ContactsQuerySetProjection(_queryHandle, propertyIdArray, propertyIdArray.Length);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "SetProjection Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Sets the "distinct" option for projection.
+ /// </summary>
+ /// <param name="set">If true it is set, otherwise if false it is unset</param>
+ public void SetDistinct(bool set)
+ {
+ int error = Interop.Query.ContactsQuerySetDistinct(_queryHandle, set);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "SetDistinct Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Sets the filter for a query.
+ /// </summary>
+ /// <param name="filter">The filter</param>
+ public void SetFilter(ContactsFilter filter)
+ {
+ int error = Interop.Query.ContactsQuerySetFilter(_queryHandle, filter._filterHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "SetFilter Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Sets the sort mode for a query.
+ /// </summary>
+ /// <param name="propertyId">The property ID to sort</param>
+ /// <param name="isAscending">If true it sorts in the ascending order, otherwise if false it sorts in the descending order</param>
+ public void SetSort(uint propertyId, bool isAscending)
+ {
+ int error = Interop.Query.ContactsQuerySetSort(_queryHandle, propertyId, isAscending);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "SetSort Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// </summary>
+ public class ContactsRecord : IDisposable
+ {
+ private string _uri = null;
+ private uint _id;
+ internal IntPtr _recordHandle;
+
+ internal ContactsRecord(IntPtr handle)
+ {
+ _recordHandle = handle;
+ IntPtr viewUri;
+ int error = Interop.Record.GetUriP(handle, out viewUri);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _uri = Marshal.PtrToStringAnsi(viewUri);
+ }
+
+ internal ContactsRecord(IntPtr handle, bool disposedValue)
+ {
+ _recordHandle = handle;
+ _disposedValue = disposedValue;
+ IntPtr viewUri;
+ int error = Interop.Record.GetUriP(handle, out viewUri);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _uri = Marshal.PtrToStringAnsi(viewUri);
+ }
+
+ internal ContactsRecord(IntPtr handle, int id)
+ {
+ _recordHandle = handle;
+ _id = (uint)id;
+ IntPtr viewUri;
+ int error = Interop.Record.GetUriP(handle, out viewUri);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _uri = Marshal.PtrToStringAnsi(viewUri);
+ }
+
+ /// <summary>
+ /// Creates a record.
+ /// </summary>
+ /// <param name="viewUri">The view URI</param>
+ public ContactsRecord(string viewUri)
+ {
+ int error = Interop.Record.Create(viewUri, out _recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ContactsRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ _uri = viewUri;
+ }
+
+ ~ContactsRecord()
+ {
+ Dispose(false);
+ }
+
+ /// <summary>
+ /// The URI of the record
+ /// </summary>
+ public string Uri
+ {
+ get
+ {
+ return _uri;
+ }
+ }
+
+ #region IDisposable Support
+ internal bool _disposedValue = false; // To detect redundant calls
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!_disposedValue)
+ {
+ int error = Interop.Record.Destroy(_recordHandle, true);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Dispose Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ _disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+
+ /// <summary>
+ /// Makes a clone of a record.
+ /// </summary>
+ /// <returns>A cloned record</returns>
+ public ContactsRecord Clone()
+ {
+ IntPtr _clonedRecordHandle;
+ int error = Interop.Record.Clone(_recordHandle, out _clonedRecordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Clone Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsRecord(_clonedRecordHandle, (int)_id);
+ }
+
+ /// <summary>
+ /// Gets a value of the property from a record.
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <returns>
+ /// The value of the property corresponding to property id.
+ /// </returns>
+ public T Get<T>(uint propertyId)
+ {
+ object parsedValue = null;
+ if (typeof(T) == typeof(string))
+ {
+ string val;
+ int error = Interop.Record.GetStr(_recordHandle, propertyId, out val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get String Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ parsedValue = Convert.ChangeType(val, typeof(T));
+ }
+ else if (typeof(T) == typeof(int))
+ {
+ int val;
+ int error = Interop.Record.GetInt(_recordHandle, propertyId, out val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Int Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ parsedValue = Convert.ChangeType(val, typeof(T));
+ }
+ else if (typeof(T) == typeof(bool))
+ {
+ bool val;
+ int error = Interop.Record.GetBool(_recordHandle, propertyId, out val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Bool Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ parsedValue = Convert.ChangeType(val, typeof(T));
+ }
+ else if (typeof(T) == typeof(long))
+ {
+ long val;
+ int error = Interop.Record.GetLli(_recordHandle, propertyId, out val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Long Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ parsedValue = Convert.ChangeType(val, typeof(T));
+ }
+ else if (typeof(T) == typeof(double))
+ {
+ double val;
+ int error = Interop.Record.GetDouble(_recordHandle, propertyId, out val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Long Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ parsedValue = Convert.ChangeType(val, typeof(T));
+ }
+ else
+ {
+ Log.Error(Globals.LogTag, "Not Supported Data Type");
+ throw ContactsErrorFactory.CheckAndCreateException((int)ContactsError.NotSupported);
+ }
+ return (T)parsedValue;
+ }
+
+ /// <summary>
+ /// Sets a value of the property to a record.
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <param name="value">The value to set</param>
+ public void Set<T>(uint propertyId, T value)
+ {
+ if (typeof(T) == typeof(string))
+ {
+ string val = Convert.ToString(value);
+ int error = Interop.Record.SetStr(_recordHandle, propertyId, val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set String Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+ else if (typeof(T) == typeof(int))
+ {
+ int val = Convert.ToInt32(value);
+ int error = Interop.Record.SetInt(_recordHandle, propertyId, val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set Int Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+ else if (typeof(T) == typeof(bool))
+ {
+ bool val = Convert.ToBoolean(value);
+ int error = Interop.Record.SetBool(_recordHandle, propertyId, val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set Bool Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+ else if (typeof(T) == typeof(long))
+ {
+ long val = Convert.ToInt64(value);
+ int error = Interop.Record.SetLli(_recordHandle, propertyId, val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Set Long Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+ else if (typeof(T) == typeof(double))
+ {
+ double val = Convert.ToDouble(value);
+ int error = Interop.Record.SetDouble(_recordHandle, propertyId, val);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Get Long Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ }
+ else
+ {
+ Log.Error(Globals.LogTag, "Not Supported Data Type");
+ throw ContactsErrorFactory.CheckAndCreateException((int)ContactsError.NotSupported);
+ }
+ }
+
+ /// <summary>
+ /// Adds a child record to the parent record.
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <param name="childRecord">The child record to add to parent record</param>
+ public void AddChildRecord(uint propertyId, ContactsRecord childRecord)
+ {
+ int error = Interop.Record.AddChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "AddChildRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ childRecord._disposedValue = true;
+ }
+
+ /// <summary>
+ /// Removes a child record from the parent record.
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <param name="childRecord">The child record to remove from parent record</param>
+ public void RemoveChildRecord(uint propertyId, ContactsRecord childRecord)
+ {
+ int error = Interop.Record.RemoveChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "RemoveChildRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ childRecord._disposedValue = false;
+ }
+
+ /// <summary>
+ /// Gets the number of child records of a parent record.
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <returns>The number of child records corresponding to property ID</returns>
+ public int GetChildRecordCount(uint propertyId)
+ {
+ int count = 0;
+ int error = Interop.Record.GetChildRecordCount(_recordHandle, propertyId, out count);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetChildRecordCount Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return count;
+ }
+
+ /// <summary>
+ /// Gets a child record from the parent record
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <param name="index">The index of child record</param>
+ /// <returns>The record </returns>
+ public ContactsRecord GetChildRecord(uint propertyId, int index)
+ {
+ IntPtr handle;
+
+ int error = Interop.Record.GetChildRecordAtP(_recordHandle, propertyId, index, out handle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "GetChildRecord Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ return new ContactsRecord(handle, true);
+ }
+
+ /// <summary>
+ /// Clones a child record list corresponding to property ID
+ /// </summary>
+ /// <param name="propertyId">The property ID</param>
+ /// <returns>
+ /// The record list
+ /// </returns>
+ public ContactsList CloneChildRecordList(uint propertyId)
+ {
+ IntPtr listHandle;
+
+ int error = Interop.Record.CloneChildRecordList(_recordHandle, propertyId, out listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "CloneChildRecordList Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+ ContactsList list = new ContactsList(listHandle);
+ return list;
+ }
+ }
+}
--- /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.Collections.Generic;
+using static Interop.Contacts;
+
+namespace Tizen.Pims.Contacts
+{
+ using static ContactsViews;
+ /// <summary>
+ /// </summary>
+ public static class ContactsVcard
+ {
+ public delegate bool ParseDelegate(ContactsRecord record);
+
+ /// <summary>
+ /// Retrieves the vCard stream from a contacts record.
+ /// </summary>
+ /// <param name="record">The contacts record</param>
+ /// <returns>
+ /// The vCard stream.
+ /// </returns>
+ public static string Compose(ContactsRecord record)
+ {
+ int error = 0;
+ string stream = null;
+
+ if (record.Uri.Equals(Person.Uri))
+ {
+ error = Interop.Vcard.ContactsVcardMakeFromPerson(record._recordHandle, out stream);
+ }
+ else if (record.Uri.Equals(Contact.Uri))
+ {
+ error = Interop.Vcard.ContactsVcardMakeFromContact(record._recordHandle, out stream);
+ }
+ else if (record.Uri.Equals(MyProfile.Uri))
+ {
+ error = Interop.Vcard.ContactsVcardMakeFromMyProfile(record._recordHandle, out stream);
+ }
+ else
+ {
+ throw new ArgumentException("Invalid Parameters Provided");
+ }
+
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Compose Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ return stream;
+ }
+
+ /// <summary>
+ /// Retrieves all contacts with a contacts list from a vCard stream
+ /// </summary>
+ /// <param name="stream">The vCard stream</param>
+ /// <returns>
+ /// The contacts list
+ /// </returns>
+ public static ContactsList Parse(string stream)
+ {
+ IntPtr listHandle;
+
+ int error = Interop.Vcard.ContactsVcardParseToContacts(stream, out listHandle);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "Parse Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(error);
+ }
+
+ return new ContactsList(listHandle);
+ }
+
+ /// <summary>
+ /// Retrieves all contacts with a record from a vCard file.
+ /// </summary>
+ /// <param name="path">The file path of vCard stream file</param>
+ /// <param name="callback">The callback function to invoke</param>
+ public static void ParseForEach(string path, ParseDelegate callback)
+ {
+ Interop.Vcard.ContactsVcardParseCallback cb = (IntPtr handle, IntPtr data) =>
+ {
+ return callback(new ContactsRecord(handle, true));
+ };
+
+ int error = Interop.Vcard.ContactsVcardParseToContactForeach(path, cb, IntPtr.Zero);
+ if ((int)ContactsError.None != error)
+ {
+ Log.Error(Globals.LogTag, "ParseForEach Failed with error " + error);
+ throw ContactsErrorFactory.CheckAndCreateException(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.
+*/
+
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.Pims.Contacts
+{
+ /// <summary>
+ /// This class provides information about views with properties.
+ /// </summary>
+ /// <remarks>
+ /// A view is a class which describes properties of a record. A record can have basic properties of five types: integer, string, boolean, long, double.
+ /// </remarks>
+ public static class ContactsViews
+ {
+ private const uint PropertyAddressbook = 0x00100000;
+ private const uint PropertyGroup = 0x00200000;
+ private const uint PropertyPerson = 0x00300000;
+ private const uint PropertyData = 0x00600000;
+ private const uint PropertySpeedDial = 0x00700000;
+ private const uint PropertyPhonelog = 0x00800000;
+ private const uint PropertyUpdateInfo = 0x00900000;
+ private const uint PropertyPhonelogStat = 0x00B00000;
+
+ private const uint PropertyContact = 0x01000000;
+ private const uint PropertyName = 0x01100000;
+ private const uint PropertyNumber = 0x01200000;
+ private const uint PropertyEmail = 0x01300000;
+ private const uint PropertyAddress = 0x01400000;
+ private const uint PropertyUrl = 0x01500000;
+ private const uint PropertyEvent = 0x01600000;
+ private const uint PropertyGroupRelation = 0x01700000;
+ private const uint PropertyRelationship = 0x01800000;
+ private const uint PropertyCompany = 0x01900000;
+ private const uint PropertyNickname = 0x01A00000;
+ private const uint PropertyMessenger = 0x01B00000;
+ private const uint PropertyNote = 0x01C00000;
+ private const uint PropertyProfile = 0x01D00000;
+ private const uint PropertyImage = 0x01E00000;
+ private const uint PropertyExtension = 0x01F00000;
+ private const uint PropertyMyProfile = 0x02000000;
+ private const uint PropertyActivityPhoto = 0x02100000;
+ private const uint PropertySip = 0x02200000;
+
+ /* data_type mask 0x000FF000 */
+ private const uint DataTypeBool = 0x00010000;
+ private const uint DataTypeInt = 0x00020000;
+ private const uint DataTypeLong = 0x00030000;
+ private const uint DataTypeString = 0x00040000;
+ private const uint DataTypeDouble = 0x00050000;
+ private const uint DataTypeRecord = 0x00060000;
+
+ private const uint ReadOnly = 0x00001000;
+
+ private enum PropertyIds : uint
+ {
+ /* addressbook */
+ AddressbookId = (PropertyAddressbook | DataTypeInt | ReadOnly),
+ AddressbookAccountId = (PropertyAddressbook | DataTypeInt) + 1,
+ AddressbookName = (PropertyAddressbook | DataTypeString) + 2,
+ AddressbookMode = (PropertyAddressbook | DataTypeInt) + 3,
+
+ /* group */
+ GroupId = (PropertyGroup | DataTypeInt | ReadOnly),
+ GroupAddressbookId = (PropertyGroup | DataTypeInt) + 1,
+ GroupName = (PropertyGroup | DataTypeString) + 2,
+ GroupRingtone = (PropertyGroup | DataTypeString) + 3,
+ GroupImage = (PropertyGroup | DataTypeString) + 4,
+ GroupVibration = (PropertyGroup | DataTypeString) + 5,
+ GroupExtraData = (PropertyGroup | DataTypeString) + 6,
+ GroupIsReadOnly = (PropertyGroup | DataTypeBool) + 7,
+ GroupMessageAlert = (PropertyGroup | DataTypeString) + 8,
+
+ /* person */
+ PersonId = (PropertyPerson | DataTypeInt | ReadOnly),
+ PersonDisplayName = (PropertyPerson | DataTypeString | ReadOnly) + 1,
+ PersonDisplayContactId = (PropertyPerson | DataTypeInt) + 2,
+ PersonRingtone = (PropertyPerson | DataTypeString) + 3,
+ PersonThumbnail = (PropertyPerson | DataTypeString | ReadOnly) + 4,
+ PersonVibration = (PropertyPerson | DataTypeString) + 5,
+ PersonIsFavorite = (PropertyPerson | DataTypeBool) + 6,
+ PersonFavoritePriority = (PropertyPerson | DataTypeDouble | ReadOnly) + 7,
+ PersonLinkCount = (PropertyPerson | DataTypeInt | ReadOnly) + 8,
+ PersonAddressbookIds = (PropertyPerson | DataTypeString | ReadOnly) + 9,
+ PersonHasPhonenumber = (PropertyPerson | DataTypeBool | ReadOnly) + 10,
+ PersonHasEmail = (PropertyPerson | DataTypeBool | ReadOnly) + 11,
+ PersonDisplayNameIndex = (PropertyPerson | DataTypeString | ReadOnly) + 12,
+ PersonStatus = (PropertyPerson | DataTypeString | ReadOnly) + 13,
+ PersonMessageAlert = (PropertyPerson | DataTypeString) + 14,
+ PersonSnippetType = (PropertyPerson | DataTypeInt | ReadOnly) + 15,
+ PersonSnippetString = (PropertyPerson | DataTypeString | ReadOnly) + 16,
+
+ /* person-stat */
+ PersonUsageType = (PropertyPerson | DataTypeInt) + 100,
+ PersonTimesUsed = (PropertyPerson | DataTypeInt) + 101,
+
+ /* simple contact : read only */
+ /* contact */
+ ContactId = (PropertyContact | DataTypeInt | ReadOnly),
+ ContactDisplayName = (PropertyContact | DataTypeString | ReadOnly) + 1,
+ ContactDisplaySourceDataId = (PropertyContact | DataTypeInt | ReadOnly) + 2,
+ ContactAddressbookId = (PropertyContact | DataTypeInt) + 3,
+ ContactRingtone = (PropertyContact | DataTypeString) + 4,
+ ContactImage = (PropertyContact | DataTypeRecord) + 5,
+ ContactThumbnail = (PropertyContact | DataTypeString | ReadOnly) + 6,
+ ContactIsFavorite = (PropertyContact | DataTypeBool) + 7,
+ ContactHasPhonenumber = (PropertyContact | DataTypeBool | ReadOnly) + 8,
+ ContactHasEmail = (PropertyContact | DataTypeBool | ReadOnly) + 9,
+ ContactPersonId = (PropertyContact | DataTypeInt) + 10,
+ ContactUid = (PropertyContact | DataTypeString) + 11,
+ ContactVibration = (PropertyContact | DataTypeString) + 12,
+ ContactChangedTime = (PropertyContact | DataTypeInt | ReadOnly) + 13,
+ ContactName = (PropertyContact | DataTypeRecord) + 14,
+ ContactCompany = (PropertyContact | DataTypeRecord) + 15,
+ ContactNote = (PropertyContact | DataTypeRecord) + 16,
+ ContactNumber = (PropertyContact | DataTypeRecord) + 17,
+ ContactEmail = (PropertyContact | DataTypeRecord) + 18,
+ ContactEvent = (PropertyContact | DataTypeRecord) + 19,
+ ContactMessenger = (PropertyContact | DataTypeRecord) + 20,
+ ContactAddress = (PropertyContact | DataTypeRecord) + 21,
+ ContactUrl = (PropertyContact | DataTypeRecord) + 22,
+ ContactNickname = (PropertyContact | DataTypeRecord) + 23,
+ ContactProfile = (PropertyContact | DataTypeRecord) + 24,
+ ContactRelationship = (PropertyContact | DataTypeRecord) + 25,
+ ContactGroupRelation = (PropertyContact | DataTypeRecord) + 26,
+ ContactExtension = (PropertyContact | DataTypeRecord) + 27,
+ ContactLinkMode = (PropertyContact | DataTypeInt) + 28,
+ ContactMessageAlert = (PropertyContact | DataTypeString) + 29,
+ ContactSip = (PropertyContact | DataTypeRecord) + 30,
+
+ /* my_profile */
+ MyProfileId = (PropertyMyProfile | DataTypeInt | ReadOnly),
+ MyProfileDisplayName = (PropertyMyProfile | DataTypeString | ReadOnly) + 1,
+ MyProfileAddressbookId = (PropertyMyProfile | DataTypeInt) + 2,
+ MyProfileImage = (PropertyMyProfile | DataTypeRecord) + 3,
+ MyProfileThumbnail = (PropertyMyProfile | DataTypeString | ReadOnly) + 4,
+ MyProfileUid = (PropertyMyProfile | DataTypeString) + 5,
+ MyProfileChangedTime = (PropertyMyProfile | DataTypeInt) + 6,
+ MyProfileName = (PropertyMyProfile | DataTypeRecord) + 7,
+ MyProfileCompany = (PropertyMyProfile | DataTypeRecord) + 8,
+ MyProfileNote = (PropertyMyProfile | DataTypeRecord) + 9,
+ MyProfileNumber = (PropertyMyProfile | DataTypeRecord) + 10,
+ MyProfileEmail = (PropertyMyProfile | DataTypeRecord) + 11,
+ MyProfileEvent = (PropertyMyProfile | DataTypeRecord) + 12,
+ MyProfileMessenger = (PropertyMyProfile | DataTypeRecord) + 13,
+ MyProfileAddress = (PropertyMyProfile | DataTypeRecord) + 14,
+ MyProfileUrl = (PropertyMyProfile | DataTypeRecord) + 15,
+ MyProfileNickname = (PropertyMyProfile | DataTypeRecord) + 16,
+ MyProfileProfile = (PropertyMyProfile | DataTypeRecord) + 17,
+ MyProfileRelationship = (PropertyMyProfile | DataTypeRecord) + 18,
+ MyProfileExtension = (PropertyMyProfile | DataTypeRecord) + 19,
+ MyProfileSip = (PropertyMyProfile | DataTypeRecord) + 20,
+
+ /* data */
+ DataId = (PropertyData | DataTypeInt),
+ DataContactId = (PropertyData | DataTypeInt) + 1,
+ DataType = (PropertyData | DataTypeInt) + 2,
+ DataIsPrimaryDefault = (PropertyData | DataTypeBool) + 3,
+ DataIsDefault = (PropertyData | DataTypeBool) + 4,
+ DataData1 = (PropertyData | DataTypeInt) + 5,
+ DataData2 = (PropertyData | DataTypeString) + 6,
+ DataData3 = (PropertyData | DataTypeString) + 7,
+ DataData4 = (PropertyData | DataTypeString) + 8,
+ DataData5 = (PropertyData | DataTypeString) + 9,
+ DataData6 = (PropertyData | DataTypeString) + 10,
+ DataData7 = (PropertyData | DataTypeString) + 11,
+ DataData8 = (PropertyData | DataTypeString) + 12,
+ DataData9 = (PropertyData | DataTypeString) + 13,
+ DataData10 = (PropertyData | DataTypeString) + 14,
+
+ /* contact_name */
+ NameId = (PropertyName | DataTypeInt | ReadOnly),
+ NameContactId = (PropertyName | DataTypeInt) + 1,
+ NameFirst = (PropertyName | DataTypeString) + 2,
+ NameLast = (PropertyName | DataTypeString) + 3,
+ NameAddition = (PropertyName | DataTypeString) + 4,
+ NameSuffix = (PropertyName | DataTypeString) + 5,
+ NamePrefix = (PropertyName | DataTypeString) + 6,
+ NamePhoneticFirst = (PropertyName | DataTypeString) + 7,
+ NamePhoneticMiddle = (PropertyName | DataTypeString) + 8,
+ NamePhoneticLast = (PropertyName | DataTypeString) + 9,
+
+ /* contact_number */
+ NumberId = (PropertyNumber | DataTypeInt | ReadOnly),
+ NumberContactId = (PropertyNumber | DataTypeInt) + 1,
+ NumberType = (PropertyNumber | DataTypeInt) + 2,
+ NumberLabel = (PropertyNumber | DataTypeString) + 3,
+ NumberIsDefault = (PropertyNumber | DataTypeBool) + 4,
+ NumberNumber = (PropertyNumber | DataTypeString) + 5,
+ NumberNumberFilter = (PropertyNumber | DataTypeString) + 6,
+ NumberNormalizedNumber = (PropertyNumber | DataTypeString | ReadOnly) + 7,
+ NumberCleanedNumber = (PropertyNumber | DataTypeString | ReadOnly) + 8,
+
+ /* contact_email */
+ EmailId = (PropertyEmail | DataTypeInt | ReadOnly),
+ EmailContactId = (PropertyEmail | DataTypeInt) + 1,
+ EmailType = (PropertyEmail | DataTypeInt) + 2,
+ EmailLabel = (PropertyEmail | DataTypeString) + 3,
+ EmailIsDefault = (PropertyEmail | DataTypeBool) + 4,
+ EmailEmail = (PropertyEmail | DataTypeString) + 5,
+
+ /* contact_address */
+ AddressId = (PropertyAddress | DataTypeInt | ReadOnly),
+ AddressContactId = (PropertyAddress | DataTypeInt) + 1,
+ AddressType = (PropertyAddress | DataTypeInt) + 2,
+ AddressLabel = (PropertyAddress | DataTypeString) + 3,
+ AddressPostbox = (PropertyAddress | DataTypeString) + 4,
+ AddressPostalCode = (PropertyAddress | DataTypeString) + 5,
+ AddressRegion = (PropertyAddress | DataTypeString) + 6,
+ AddressLocality = (PropertyAddress | DataTypeString) + 7,
+ AddressStreet = (PropertyAddress | DataTypeString) + 8,
+ AddressCountry = (PropertyAddress | DataTypeString) + 9,
+ AddressExtended = (PropertyAddress | DataTypeString) + 10,
+ AddressIsDefault = (PropertyAddress | DataTypeBool) + 11,
+
+ /* contact_url */
+ UrlId = (PropertyUrl | DataTypeInt | ReadOnly),
+ UrlContactId = (PropertyUrl | DataTypeInt) + 1,
+ UrlType = (PropertyUrl | DataTypeInt) + 2,
+ UrlLabel = (PropertyUrl | DataTypeString) + 3,
+ UrlUrl = (PropertyUrl | DataTypeString) + 4,
+
+ /* contact_event */
+ EventId = (PropertyEvent | DataTypeInt | ReadOnly),
+ EventContactId = (PropertyEvent | DataTypeInt) + 1,
+ EventType = (PropertyEvent | DataTypeInt) + 2,
+ EventLabel = (PropertyEvent | DataTypeString) + 3,
+ EventDate = (PropertyEvent | DataTypeInt) + 4,
+ EventCalendarType = (PropertyEvent | DataTypeInt) + 5,
+ EventIsLeapMonth = (PropertyEvent | DataTypeBool) + 6,
+
+ /* contact_grouprelation */
+ GroupRelationId = (PropertyGroupRelation | DataTypeInt | ReadOnly),
+ GroupRelationGroupId = (PropertyGroupRelation | DataTypeInt) + 1,
+ GroupRelationContactId = (PropertyGroupRelation | DataTypeInt) + 2,
+ GroupRelationGroupName = (PropertyGroupRelation | DataTypeString) + 3,
+
+ /* contact_relationship */
+ RelationshipId = (PropertyRelationship | DataTypeInt | ReadOnly),
+ RelationshipContactId = (PropertyRelationship | DataTypeInt) + 1,
+ RelationshipType = (PropertyRelationship | DataTypeInt) + 2,
+ RelationshipLabel = (PropertyRelationship | DataTypeString) + 3,
+ RelationshipName = (PropertyRelationship | DataTypeString) + 4,
+
+ /* contact_image */
+ ImageId = (PropertyImage | DataTypeInt | ReadOnly),
+ ImageContactId = (PropertyImage | DataTypeInt) + 1,
+ ImageType = (PropertyImage | DataTypeInt) + 2,
+ ImageLabel = (PropertyImage | DataTypeString) + 3,
+ ImagePath = (PropertyImage | DataTypeString) + 4,
+ ImageIsDefault = (PropertyImage | DataTypeBool) + 5,
+
+ /* contact_company */
+ CompanyId = (PropertyCompany | DataTypeInt | ReadOnly),
+ CompanyContactId = (PropertyCompany | DataTypeInt) + 1,
+ CompanyType = (PropertyCompany | DataTypeInt) + 2,
+ CompanyLabel = (PropertyCompany | DataTypeString) + 3,
+ CompanyName = (PropertyCompany | DataTypeString) + 4,
+ CompanyDepartment = (PropertyCompany | DataTypeString) + 5,
+ CompanyJobTitle = (PropertyCompany | DataTypeString) + 6,
+ CompanyRole = (PropertyCompany | DataTypeString) + 7,
+ CompanyAssistantName = (PropertyCompany | DataTypeString) + 8,
+ CompanyLogo = (PropertyCompany | DataTypeString) + 9,
+ CompanyLocation = (PropertyCompany | DataTypeString) + 10,
+ CompanyDescription = (PropertyCompany | DataTypeString) + 11,
+ CompanyPhoneticName = (PropertyCompany | DataTypeString) + 12,
+
+ /* contact_nickname */
+ NicknameId = (PropertyNickname | DataTypeInt | ReadOnly),
+ NicknameContactId = (PropertyNickname | DataTypeInt) + 1,
+ NicknameName = (PropertyNickname | DataTypeString) + 2,
+
+ /* contact_messenger */
+ MessengerId = (PropertyMessenger | DataTypeInt | ReadOnly),
+ MessengerContactId = (PropertyMessenger | DataTypeInt) + 1,
+ MessengerType = (PropertyMessenger | DataTypeInt) + 2,
+ MessengerLabel = (PropertyMessenger | DataTypeString) + 3,
+ MessengerIMId = (PropertyMessenger | DataTypeString) + 4,
+
+ /* contact_note */
+ NoteId = (PropertyNote | DataTypeInt | ReadOnly),
+ NoteContactId = (PropertyNote | DataTypeInt) + 1,
+ NoteNote = (PropertyNote | DataTypeString) + 2,
+
+ /* contact sip */
+ SipId = (PropertySip | DataTypeInt | ReadOnly),
+ SipContactId = (PropertySip | DataTypeInt) + 1,
+ SipAddress = (PropertySip | DataTypeString) + 2,
+ SipType = (PropertySip | DataTypeInt) + 3,
+ SipLabel = (PropertySip | DataTypeString) + 4,
+
+ /* contact_profile */
+ ProfileId = (PropertyProfile | DataTypeInt | ReadOnly),
+ ProfileContactId = (PropertyProfile | DataTypeInt) + 1,
+ ProfileUid = (PropertyProfile | DataTypeString) + 2,
+ ProfileText = (PropertyProfile | DataTypeString) + 3,
+ ProfileOrder = (PropertyProfile | DataTypeInt) + 4,
+ ProfileServiceOperation = (PropertyProfile | DataTypeString) + 5,
+ ProfileMIME = (PropertyProfile | DataTypeString) + 6,
+ ProfileAppId = (PropertyProfile | DataTypeString) + 7,
+ ProfileUri = (PropertyProfile | DataTypeString) + 8,
+ ProfileCategory = (PropertyProfile | DataTypeString) + 9,
+ ProfileExtraData = (PropertyProfile | DataTypeString) + 10,
+
+ ExtensionId = (PropertyExtension | DataTypeInt | ReadOnly),
+ ExtensionContactId = (PropertyExtension | DataTypeInt) +1,
+ ExtensionData1 = (PropertyExtension | DataTypeInt) +2,
+ ExtensionData2 = (PropertyExtension | DataTypeString) +3,
+ ExtensionData3 = (PropertyExtension | DataTypeString) +4,
+ ExtensionData4 = (PropertyExtension | DataTypeString) +5,
+ ExtensionData5 = (PropertyExtension | DataTypeString) +6,
+ ExtensionData6 = (PropertyExtension | DataTypeString) +7,
+ ExtensionData7 = (PropertyExtension | DataTypeString) +8,
+ ExtensionData8 = (PropertyExtension | DataTypeString) +9,
+ ExtensionData9 = (PropertyExtension | DataTypeString) +10,
+ ExtensionData10 = (PropertyExtension | DataTypeString) +11,
+ ExtensionData11 = (PropertyExtension | DataTypeString) +12,
+ ExtensionData12 = (PropertyExtension | DataTypeString) +13,
+
+ /* speeddial */
+ SpeedDialDialNumber = (PropertySpeedDial | DataTypeInt),
+ SpeedDialNumberId = (PropertySpeedDial | DataTypeInt) +1,
+ SpeedDialNumber = (PropertySpeedDial | DataTypeString | ReadOnly) +2,
+ SpeedDialNumberLabel = (PropertySpeedDial | DataTypeString | ReadOnly) +3,
+ SpeedDialNumberType = (PropertySpeedDial | DataTypeInt | ReadOnly) +4,
+ SpeedDialPersonId = (PropertySpeedDial | DataTypeInt | ReadOnly) +5,
+ SpeedDialDisplayName = (PropertySpeedDial | DataTypeString | ReadOnly) +6,
+ SpeedDialThumbnail = (PropertySpeedDial | DataTypeString | ReadOnly) +7,
+ SpeedDialNormalizedNumber = (PropertySpeedDial | DataTypeString | ReadOnly) +8,
+ SpeedDialCleanedNumber = (PropertySpeedDial | DataTypeString | ReadOnly) +9,
+ SpeedDialNumberFilter = (PropertySpeedDial | DataTypeString | ReadOnly) +10,
+
+ /* phonelog */
+ PhonelogId = (PropertyPhonelog | DataTypeInt | ReadOnly),
+ PhonelogPersonId = (PropertyPhonelog | DataTypeInt) + 1,
+ PhonelogAddress = (PropertyPhonelog | DataTypeString) + 2,
+ PhonelogLogTime = (PropertyPhonelog | DataTypeInt) + 3,
+ PhonelogLogType = (PropertyPhonelog | DataTypeInt) + 4,
+ PhonelogExtraData1 = (PropertyPhonelog | DataTypeInt) + 5, /* duration, message_id, email_id */
+ PhonelogExtraData2 = (PropertyPhonelog | DataTypeString) + 6, /* short message, subject */
+ PhonelogNormalizedAddress = (PropertyPhonelog | DataTypeString | ReadOnly) + 7, /* for search by calllog number */
+ PhonelogCleanedAddress = (PropertyPhonelog | DataTypeString | ReadOnly) + 8, /* for search by calllog number */
+ PhonelogAddressFilter = (PropertyPhonelog | DataTypeString | ReadOnly) + 9, /* for search by calllog number */
+ PhonelogSIMSlotNo = (PropertyPhonelog | DataTypeInt) + 10,
+
+ /* phonelog_stat */
+ PhonelogStatLogCount = (PropertyPhonelogStat | DataTypeInt | ReadOnly),
+ PhonelogStatLogType = (PropertyPhonelogStat | DataTypeInt | ReadOnly) + 1,
+ PhonelogStatSIMSlotNo = (PropertyPhonelogStat | DataTypeInt | ReadOnly) + 2,
+
+ /* updated_info : read only */
+ UpdateInfoId = (PropertyUpdateInfo | DataTypeInt),
+ UpdateInfoAddressbookId = (PropertyUpdateInfo | DataTypeInt) +1,
+ UpdateInfoType = (PropertyUpdateInfo | DataTypeInt) +2,
+ UpdateInfoVersion = (PropertyUpdateInfo | DataTypeInt) +3,
+ UpdateInfoImageChanged = (PropertyUpdateInfo | DataTypeBool) +4,
+ UpdateInfoLastChangedType = (PropertyUpdateInfo | DataTypeInt)+5, /* now, it is used for _contacts_my_profile_updated_info */
+ }
+
+ /// <summary>
+ /// Enumeration for contact change state.
+ /// </summary>
+ public enum ChangeTypes
+ {
+ /// <summary>
+ /// Inserted
+ /// </summary>
+ Inserted,
+ /// <summary>
+ /// Updated
+ /// </summary>
+ Updated,
+ /// <summary>
+ /// Deleted
+ /// </summary>
+ Deleted,
+ }
+
+ public static class Addressbook
+ {
+ /// <summary>
+ /// Identifier of this contacts addressbook view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.addressbook";
+ /// <summary>
+ /// integer, read only, DB record ID of the addressbook
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.AddressbookId;
+ /// <summary>
+ /// integer, read/write once, Account ID that the addressbook belongs to
+ /// </summary>
+ public const uint AccountId = (uint)PropertyIds.AddressbookAccountId;
+ /// <summary>
+ /// string, read/write, It cannot be NULL. Duplicate names are not allowed.
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.AddressbookName;
+ /// <summary>
+ /// integer, read/write, Addressbook mode, refer to the Modes
+ /// </summary>
+ public const uint Mode = (uint)PropertyIds.AddressbookMode;
+
+ /// <summary>
+ /// Enumeration for Address book mode.
+ /// </summary>
+ public enum Modes
+ {
+ /// <summary>
+ /// All module can read and write contacts of this address_book
+ /// </summary>
+ None,
+ /// <summary>
+ /// All module can only read contacts of this address_book
+ /// </summary>
+ ReadOnly,
+ }
+ }
+
+ public static class Group
+ {
+ /// <summary>
+ /// Identifier of this contacts group view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.group";
+ /// <summary>
+ /// DB record ID of the group
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.GroupId;
+ /// <summary>
+ /// Addressbook ID that the group belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.GroupAddressbookId;
+ /// <summary>
+ /// Group name
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.GroupName;
+ /// <summary>
+ /// Ringtone path of the group
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.GroupRingtone;
+ /// <summary>
+ /// Image path of the group
+ /// </summary>
+ public const uint ImagePath = (uint)PropertyIds.GroupImage;
+ /// <summary>
+ /// Vibration path of the group
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.GroupVibration;
+ /// <summary>
+ /// Extra data for default group name
+ /// </summary>
+ public const uint ExtraData = (uint)PropertyIds.GroupExtraData;
+ /// <summary>
+ /// The group is read only or not
+ /// </summary>
+ public const uint IsReadOnly = (uint)PropertyIds.GroupIsReadOnly;
+ /// <summary>
+ /// Message alert path of the group
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.GroupMessageAlert;
+ }
+
+ public static class Person
+ {
+ /// <summary>
+ /// Identifier of this contacts person view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// Status of social account
+ /// </summary>
+ public const uint Status = (uint)PropertyIds.PersonStatus;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The priority of favorite contacts. it can be used as sorting key
+ /// </summary>
+ public const uint FavoritePriority = (uint)PropertyIds.PersonFavoritePriority;
+ /// <summary>
+ /// Link count of contact records (projection)
+ /// </summary>
+ public const uint LinkCount = (uint)PropertyIds.PersonLinkCount;
+ /// <summary>
+ /// Addressbook IDs that the person belongs to (projection)
+ /// </summary>
+ public const uint AddressbookIds = (uint)PropertyIds.PersonAddressbookIds;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// kerword matched data type
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ }
+
+ public static class Contact
+ {
+ /// <summary>
+ /// Identifier of this contact view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.contact";
+ /// <summary>
+ /// DB record ID of the contact
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Display name of the contact
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.ContactDisplayName;
+ /// <summary>
+ /// The source type of display name, refer to the DisplayNameSourceTypes
+ /// </summary>
+ public const uint DisplaySourceType = (uint)PropertyIds.ContactDisplaySourceDataId;
+ /// <summary>
+ /// Addressbook ID that the contact belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Ringtone path of the contact
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.ContactRingtone;
+ /// <summary>
+ /// Image thumbnail path of the contact
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.ContactThumbnail;
+ /// <summary>
+ /// The contact is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.ContactIsFavorite;
+ /// <summary>
+ /// The contact has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.ContactHasPhonenumber;
+ /// <summary>
+ /// The contact has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.ContactHasEmail;
+ /// <summary>
+ /// Person ID that the contact belongs to. If set when inserting, a contact will be linked to person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.ContactPersonId;
+ /// <summary>
+ /// Unique identifier
+ /// </summary>
+ public const uint Uid = (uint)PropertyIds.ContactUid;
+ /// <summary>
+ /// Vibration path of the contact
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.ContactVibration;
+ /// <summary>
+ /// Message alert path of the contact
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.ContactMessageAlert;
+ /// <summary>
+ /// Last changed contact time
+ /// </summary>
+ public const uint ChangedTime = (uint)PropertyIds.ContactChangedTime;
+ /// <summary>
+ /// The link mode, refer to the LinkModes. If the person_id was set, this value will be ignored
+ /// </summary>
+ public const uint LinkMode = (uint)PropertyIds.ContactLinkMode;
+ /// <summary>
+ /// Name child record (single)
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.ContactName;
+ /// <summary>
+ /// Company child record (multiple)
+ /// </summary>
+ public const uint Company = (uint)PropertyIds.ContactCompany;
+ /// <summary>
+ /// Note child record (multiple)
+ /// </summary>
+ public const uint Note = (uint)PropertyIds.ContactNote;
+ /// <summary>
+ /// Number child record (multiple)
+ /// </summary>
+ public const uint Number = (uint)PropertyIds.ContactNumber;
+ /// <summary>
+ /// Email child record (multiple)
+ /// </summary>
+ public const uint Email = (uint)PropertyIds.ContactEmail;
+ /// <summary>
+ /// Event child record (multiple)
+ /// </summary>
+ public const uint Event = (uint)PropertyIds.ContactEvent;
+ /// <summary>
+ /// Messenger child record (multiple)
+ /// </summary>
+ public const uint Messenger = (uint)PropertyIds.ContactMessenger;
+ /// <summary>
+ /// Address child record (multiple)
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.ContactAddress;
+ /// <summary>
+ /// Url child record (multiple)
+ /// </summary>
+ public const uint Url = (uint)PropertyIds.ContactUrl;
+ /// <summary>
+ /// Nickname child record (multiple)
+ /// </summary>
+ public const uint Nickname = (uint)PropertyIds.ContactNickname;
+ /// <summary>
+ /// Profile child record (multiple)
+ /// </summary>
+ public const uint Profile = (uint)PropertyIds.ContactProfile;
+ /// <summary>
+ /// Relationship child record (multiple)
+ /// </summary>
+ public const uint Relationship = (uint)PropertyIds.ContactRelationship;
+ /// <summary>
+ /// Image child record (multiple)
+ /// </summary>
+ public const uint Image = (uint)PropertyIds.ContactImage;
+ /// <summary>
+ /// GroupRelation child record (multiple)
+ /// </summary>
+ public const uint GroupRelation = (uint)PropertyIds.ContactGroupRelation;
+ /// <summary>
+ /// Extension child record (multiple)
+ /// </summary>
+ public const uint Extension = (uint)PropertyIds.ContactExtension;
+ /// <summary>
+ /// Sip child record (multiple)
+ /// </summary>
+ public const uint Sip = (uint)PropertyIds.ContactSip;
+
+ /// <summary>
+ /// Enumeration for link mode when inserting contact.
+ /// </summary>
+ public enum LinkModes
+ {
+ /// <summary>
+ /// Auto link immediately
+ /// </summary>
+ Auto,
+ /// <summary>
+ /// Do not auto link when the contact is inserted
+ /// </summary>
+ None
+ }
+
+ /// <summary>
+ /// Enumeration for Contact display name source type.
+ /// </summary>
+ public enum DisplayNameSourceTypes
+ {
+ /// <summary>
+ /// Invalid source of display name
+ /// </summary>
+ Invalid,
+ /// <summary>
+ /// Produced display name from email record
+ /// </summary>
+ Email,
+ /// <summary>
+ /// Produced display name from number record
+ /// </summary>
+ Number,
+ /// <summary>
+ /// Produced display name from nickname record
+ /// </summary>
+ Nickname,
+ /// <summary>
+ /// Produced display name from company record
+ /// </summary>
+ Company,
+ /// <summary>
+ /// Produced display name from name record
+ /// </summary>
+ Name,
+ }
+
+ /// <summary>
+ /// Enumeration for contacts data type.
+ /// </summary>
+ public enum DataTypes
+ {
+ Name = 1,
+ Address = 2,
+ Messenger = 3,
+ Url = 4,
+ Event = 5,
+ Company = 6,
+ Nickname = 7,
+ Number = 8,
+ Email = 9,
+ Profile = 10,
+ Relationsip = 11,
+ Note = 12,
+ Image = 13,
+ Sip = 14,
+ Extension = 100
+ }
+ }
+
+ public static class SimpleContact
+ {
+ /// <summary>
+ /// Identifier of this simple contact view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.simple_contact";
+ /// <summary>
+ /// DB record ID of the contact
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Display name of the contact
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.ContactDisplayName;
+ /// <summary>
+ /// The source type of display name, refer to the Contact.DisplayNameSourceTypes
+ /// </summary>
+ public const uint DisplaySourceType = (uint)PropertyIds.ContactDisplaySourceDataId;
+ /// <summary>
+ /// Addressbook that the contact belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Ringtone path of the contact
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.ContactRingtone;
+ /// <summary>
+ /// Image thumbnail path of the contact
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.ContactThumbnail;
+ /// <summary>
+ /// The contact is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.ContactIsFavorite;
+ /// <summary>
+ /// The contact has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.ContactHasPhonenumber;
+ /// <summary>
+ /// The contact has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.ContactHasEmail;
+ /// <summary>
+ /// Person ID that the contact belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.ContactPersonId;
+ /// <summary>
+ /// Unique identifier
+ /// </summary>
+ public const uint Uid = (uint)PropertyIds.ContactUid;
+ /// <summary>
+ /// Vibration path of the contact
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.ContactVibration;
+ /// <summary>
+ /// Message alert path of the contact
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.ContactMessageAlert;
+ /// <summary>
+ /// Last changed contact time
+ /// </summary>
+ public const uint ChangedTime = (uint)PropertyIds.ContactChangedTime;
+ }
+
+ public static class MyProfile
+ {
+ /// <summary>
+ /// Identifier of this my profile view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.my_profile";
+ /// <summary>
+ /// DB record ID of the my profile
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.MyProfileId;
+ /// <summary>
+ /// Display name of the profile
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.MyProfileDisplayName;
+ /// <summary>
+ /// Addressbook ID that the profile belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.MyProfileAddressbookId;
+ /// <summary>
+ /// Image thumbnail path of the profile
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.MyProfileThumbnail;
+ /// <summary>
+ /// Unique identifier
+ /// </summary>
+ public const uint Uid = (uint)PropertyIds.MyProfileUid;
+ /// <summary>
+ /// Last changed profile time
+ /// </summary>
+ public const uint ChangedTime = (uint)PropertyIds.MyProfileChangedTime;
+ /// <summary>
+ /// Name child record (single)
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.MyProfileName;
+ /// <summary>
+ /// Company child record (multiple)
+ /// </summary>
+ public const uint Company = (uint)PropertyIds.MyProfileCompany;
+ /// <summary>
+ /// Note child record (multiple)
+ /// </summary>
+ public const uint Note = (uint)PropertyIds.MyProfileNote;
+ /// <summary>
+ /// Number child record (multiple)
+ /// </summary>
+ public const uint Number = (uint)PropertyIds.MyProfileNumber;
+ /// <summary>
+ /// Email child record (multiple)
+ /// </summary>
+ public const uint Email = (uint)PropertyIds.MyProfileEmail;
+ /// <summary>
+ /// Event child record (multiple)
+ /// </summary>
+ public const uint Event = (uint)PropertyIds.MyProfileEvent;
+ /// <summary>
+ /// Messenger child record (multiple)
+ /// </summary>
+ public const uint Messenger = (uint)PropertyIds.MyProfileMessenger;
+ /// <summary>
+ /// Address child record (multiple)
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.MyProfileAddress;
+ /// <summary>
+ /// Url child record (multiple)
+ /// </summary>
+ public const uint Url = (uint)PropertyIds.MyProfileUrl;
+ /// <summary>
+ /// Nickname child record (multiple)
+ /// </summary>
+ public const uint Nickname = (uint)PropertyIds.MyProfileNickname;
+ /// <summary>
+ /// Profile child record (multiple)
+ /// </summary>
+ public const uint Profile = (uint)PropertyIds.MyProfileProfile;
+ /// <summary>
+ /// Relationship child record (multiple)
+ /// </summary>
+ public const uint Relationship = (uint)PropertyIds.MyProfileRelationship;
+ /// <summary>
+ /// Image child record (multiple)
+ /// </summary>
+ public const uint Image = (uint)PropertyIds.MyProfileImage;
+ /// <summary>
+ /// Extension child record (multiple)
+ /// </summary>
+ public const uint Extension = (uint)PropertyIds.MyProfileExtension;
+ /// <summary>
+ /// Sip child record (multiple)
+ /// </summary>
+ public const uint Sip = (uint)PropertyIds.MyProfileSip;
+ }
+
+ public static class Name
+ {
+ /// <summary>
+ /// Identifier of this contacts name view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.name";
+ /// <summary>
+ /// DB record ID of the name
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.NameId;
+ /// <summary>
+ /// Contacts ID that the name record belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.NameContactId;
+ /// <summary>
+ /// First name
+ /// </summary>
+ public const uint First = (uint)PropertyIds.NameFirst;
+ /// <summary>
+ /// Last name
+ /// </summary>
+ public const uint Last = (uint)PropertyIds.NameLast;
+ /// <summary>
+ /// Middle name
+ /// </summary>
+ public const uint Addition = (uint)PropertyIds.NameAddition;
+ /// <summary>
+ /// Suffix
+ /// </summary>
+ public const uint Suffix = (uint)PropertyIds.NameSuffix;
+ /// <summary>
+ /// Prefix
+ /// </summary>
+ public const uint Prefix = (uint)PropertyIds.NamePrefix;
+ /// <summary>
+ /// Pronounce the first name
+ /// </summary>
+ public const uint PhoneticFirst = (uint)PropertyIds.NamePhoneticFirst;
+ /// <summary>
+ /// Pronounce the middle name
+ /// </summary>
+ public const uint PhoneticMiddle = (uint)PropertyIds.NamePhoneticMiddle;
+ /// <summary>
+ /// Pronounce the last name
+ /// </summary>
+ public const uint PhoneticLast = (uint)PropertyIds.NamePhoneticLast;
+ }
+
+ public static class Number
+ {
+ /// <summary>
+ /// Identifier of this contacts number view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.number";
+ /// <summary>
+ /// DB record ID of the number
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.NumberId;
+ /// <summary>
+ /// Contact ID that the number belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.NumberContactId;
+ /// <summary>
+ /// Number type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.NumberType;
+ /// <summary>
+ /// Custom number type label, when the number type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.NumberLabel;
+ /// <summary>
+ /// The number is default number or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.NumberIsDefault;
+ /// <summary>
+ /// Number
+ /// </summary>
+ public const uint NumberData = (uint)PropertyIds.NumberNumber;
+ /// <summary>
+ /// You can only use this property for search filter.
+ /// </summary>
+ public const uint NormalizedNumber = (uint)PropertyIds.NumberNormalizedNumber;
+ /// <summary>
+ /// You can only use this property for search filter.
+ /// </summary>
+ public const uint CleanedNumber = (uint)PropertyIds.NumberCleanedNumber;
+ /// <summary>
+ /// You can only use this property for search filter.
+ /// </summary>
+ public const uint NumberFilter = (uint)PropertyIds.NumberNumberFilter;
+
+ public enum Types
+ {
+ /// <summary>
+ /// Other number type
+ /// </summary>
+ Other = 0,
+ /// <summary>
+ /// Custom number type
+ /// </summary>
+ Custom = 1 << 0,
+ /// <summary>
+ /// A telephone number associated with a residence
+ /// </summary>
+ Home = 1 << 1,
+ /// <summary>
+ /// A telephone number associated with a place of work
+ /// </summary>
+ Work = 1 << 2,
+ /// <summary>
+ /// A voice telephone number
+ /// </summary>
+ Voice = 1 << 3,
+ /// <summary>
+ /// A facsimile telephone number
+ /// </summary>
+ Fax = 1 << 4,
+ /// <summary>
+ /// The telephone number has voice messaging support
+ /// </summary>
+ Message = 1 << 5,
+ /// <summary>
+ /// A cellular telephone number
+ /// </summary>
+ Cell = 1 << 6,
+ /// <summary>
+ /// A paging device telephone number
+ /// </summary>
+ Pager = 1 << 7,
+ /// <summary>
+ /// A bulletin board system telephone number
+ /// </summary>
+ BBS = 1 << 8,
+ /// <summary>
+ /// A MODEM connected telephone number
+ /// </summary>
+ Modem = 1 << 9,
+ /// <summary>
+ /// A car-phone telephone number
+ /// </summary>
+ Car = 1 << 10,
+ /// <summary>
+ /// An ISDN service telephone number
+ /// </summary>
+ ISDN = 1 << 11,
+ /// <summary>
+ /// A video conferencing telephone number
+ /// </summary>
+ Video = 1 << 12,
+ /// <summary>
+ /// A personal communication services telephone number
+ /// </summary>
+ PCS = 1 << 13,
+ /// <summary>
+ /// A company main number
+ /// </summary>
+ Company = 1 << 14,
+ /// <summary>
+ /// A radio phone number
+ /// </summary>
+ Radio = 1 << 15,
+ /// <summary>
+ /// An additional type for main
+ /// </summary>
+ Main = 1 << 29,
+ /// <summary>
+ /// An additional type for assistant
+ /// </summary>
+ Assistant = 1 << 30,
+ }
+ }
+
+ public static class Email
+ {
+ /// <summary>
+ /// Identifier of this contacts email view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.email";
+ /// <summary>
+ /// DB record ID of the email
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.EmailId;
+ /// <summary>
+ /// Contact ID that the email belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.EmailContactId;
+ /// <summary>
+ /// Email type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.EmailType;
+ /// <summary>
+ /// Custom mail type label, when the email type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.EmailLabel;
+ /// <summary>
+ /// The email is default email or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.EmailIsDefault;
+ /// <summary>
+ /// Email address
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.EmailEmail;
+
+ public enum Types
+ {
+ /// <summary>
+ /// Other email type
+ /// </summary>
+ Other = 0,
+ /// <summary>
+ /// Custom email type
+ /// </summary>
+ Custom = 1 << 0,
+ /// <summary>
+ /// An email address associated with a residence
+ /// </summary>
+ Home = 1 << 1,
+ /// <summary>
+ /// An email address associated with a place of work
+ /// </summary>
+ Work = 1 << 2,
+ /// <summary>
+ /// A mobile email address
+ /// </summary>
+ Mobile = 1 << 3,
+ }
+ }
+
+ public static class Address
+ {
+ /// <summary>
+ /// Identifier of this contacts address view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.address";
+ /// <summary>
+ /// DB record ID of the address
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.AddressId;
+ /// <summary>
+ /// Contact ID that the address belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.AddressContactId;
+ /// <summary>
+ /// Address type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.AddressType;
+ /// <summary>
+ /// Address type label, when the address type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.AddressLabel;
+ /// <summary>
+ /// Post office box
+ /// </summary>
+ public const uint Postbox = (uint)PropertyIds.AddressPostbox;
+ /// <summary>
+ /// Postal code
+ /// </summary>
+ public const uint PostalCode = (uint)PropertyIds.AddressPostalCode;
+ /// <summary>
+ /// Region
+ /// </summary>
+ public const uint Region = (uint)PropertyIds.AddressRegion;
+ /// <summary>
+ /// Locality
+ /// </summary>
+ public const uint Locality = (uint)PropertyIds.AddressLocality;
+ /// <summary>
+ /// Street
+ /// </summary>
+ public const uint Street = (uint)PropertyIds.AddressStreet;
+ /// <summary>
+ /// Country
+ /// </summary>
+ public const uint Country = (uint)PropertyIds.AddressCountry;
+ /// <summary>
+ /// Extended address
+ /// </summary>
+ public const uint Extended = (uint)PropertyIds.AddressExtended;
+ /// <summary>
+ /// The address is default or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.AddressIsDefault;
+
+ /// <summary>
+ /// Enumeration for Contact address type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other address type
+ /// </summary>
+ Other = 0,
+ /// <summary>
+ /// Custom address type
+ /// </summary>
+ Custom = 1 << 0,
+ /// <summary>
+ /// A delivery address for a residence
+ /// </summary>
+ Home = 1 << 1,
+ /// <summary>
+ /// A delivery address for a place of work
+ /// </summary>
+ Work = 1 << 2,
+ /// <summary>
+ /// A domestic delivery address
+ /// </summary>
+ Domestic = 1 << 3,
+ /// <summary>
+ /// An international delivery address
+ /// </summary>
+ International = 1 << 4,
+ /// <summary>
+ /// A postal delivery address
+ /// </summary>
+ Postal = 1 << 5,
+ /// <summary>
+ /// A parcel delivery address
+ /// </summary>
+ Parcel = 1 << 6,
+ }
+ }
+
+ public static class Note
+ {
+ /// <summary>
+ /// Identifier of this contacts note view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.note";
+ /// <summary>
+ /// DB record ID of the note
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.NoteId;
+ /// <summary>
+ /// Contact ID that the note belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.NoteContactId;
+ /// <summary>
+ /// Note contents
+ /// </summary>
+ public const uint Contents = (uint)PropertyIds.NoteNote;
+ }
+
+ public static class Url
+ {
+ /// <summary>
+ /// Identifier of this contacts URL view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.url";
+ /// <summary>
+ /// DB record ID of the URL
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.UrlId;
+ /// <summary>
+ /// Contact ID that the URL belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.UrlContactId;
+ /// <summary>
+ /// URL type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.UrlType;
+ /// <summary>
+ /// Custom URL type label, when the URL type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.UrlLabel;
+ /// <summary>
+ /// URL
+ /// </summary>
+ public const uint UrlData = (uint)PropertyIds.UrlUrl;
+
+ /// <summary>
+ /// Enumeration for Contact URL type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other URL type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Custom URL type
+ /// </summary>
+ Custom,
+ /// <summary>
+ /// Home URL type
+ /// </summary>
+ Home,
+ /// <summary>
+ /// Work URL type
+ /// </summary>
+ Work,
+ }
+ }
+
+ public static class Event
+ {
+ /// <summary>
+ /// Identifier of this contacts event view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.event";
+ /// <summary>
+ /// DB record ID of the event
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.EventId;
+ /// <summary>
+ /// Contact ID that the event belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.EventContactId;
+ /// <summary>
+ /// Event type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.EventType;
+ /// <summary>
+ /// Custom event type label, when the event type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.EventLabel;
+ /// <summary>
+ /// Event date(YYYYMMDD). e.g. 2014/1/1 : 20140101. Even if the calendar_type is set as CONTACTS_EVENT_CALENDAR_TYPE_CHINESE, you SHOULD set Gregorian date
+ /// </summary>
+ public const uint Date = (uint)PropertyIds.EventDate;
+ /// <summary>
+ /// Calendar type, refer to the CalendarTypes
+ /// </summary>
+ public const uint IsLeapMonth = (uint)PropertyIds.EventIsLeapMonth;
+
+ /// <summary>
+ /// Enumeration for Contact event type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other event type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Custom event type
+ /// </summary>
+ Custom,
+ /// <summary>
+ /// Birthday event type
+ /// </summary>
+ Birthday,
+ /// <summary>
+ /// Anniversary event type
+ /// </summary>
+ Anniversary
+ }
+
+ /// <summary>
+ /// Enumeration for Contact event calendar type.
+ /// </summary>
+ public enum CalendarTypes
+ {
+ /// <summary>
+ /// Gregorian calendar
+ /// </summary>
+ Gregorian,
+ /// <summary>
+ /// Chinese calenadr
+ /// </summary>
+ Chinese
+ }
+ }
+
+ public static class Relationship
+ {
+ /// <summary>
+ /// Identifier of this relationship view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.relationship";
+ /// <summary>
+ /// DB record ID of the relationship
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.RelationshipId;
+ /// <summary>
+ /// Contact ID that the relationship belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.RelationshipContactId;
+ /// <summary>
+ /// Relationship type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.RelationshipType;
+ /// <summary>
+ /// Custom relationship type label, when the relationship type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.RelationshipLabel;
+ /// <summary>
+ /// Selected contact name that the relationship belongs to
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.RelationshipName;
+
+ /// <summary>
+ /// Enumeration for Contact relationship type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other relationship type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Assistant type
+ /// </summary>
+ Assistant,
+ /// <summary>
+ /// Brother type
+ /// </summary>
+ Brother,
+ /// <summary>
+ /// Child type
+ /// </summary>
+ Child,
+ /// <summary>
+ /// Domestic Partner type
+ /// </summary>
+ DomesticPartner,
+ /// <summary>
+ /// Father type
+ /// </summary>
+ Father,
+ /// <summary>
+ /// Friend type
+ /// </summary>
+ Friend,
+ /// <summary>
+ /// Manager type
+ /// </summary>
+ Manager,
+ /// <summary>
+ /// Mother type
+ /// </summary>
+ Mother,
+ /// <summary>
+ /// Parent type
+ /// </summary>
+ Parent,
+ /// <summary>
+ /// Partner type
+ /// </summary>
+ Partner,
+ /// <summary>
+ /// Referred by type
+ /// </summary>
+ ReferredBy,
+ /// <summary>
+ /// Relative type
+ /// </summary>
+ Relative,
+ /// <summary>
+ /// Sister type
+ /// </summary>
+ Sister,
+ /// <summary>
+ /// Spouse type
+ /// </summary>
+ Spouse,
+ /// <summary>
+ /// Custom type
+ /// </summary>
+ Custom,
+ }
+ }
+
+ public static class Image
+ {
+ /// <summary>
+ /// Identifier of this contacts image view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.image";
+ /// <summary>
+ /// DB record ID of the image
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.ImageId;
+ /// <summary>
+ /// Contact ID that the image belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ImageContactId;
+ /// <summary>
+ /// Image type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.ImageType;
+ /// <summary>
+ /// Custom image type label, when the image type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.ImageLabel;
+ /// <summary>
+ /// Image thumbnail path
+ /// </summary>
+ public const uint Path = (uint)PropertyIds.ImagePath;
+ /// <summary>
+ /// The Image is default or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.ImageIsDefault;
+
+ /// <summary>
+ /// Enumeration for Contact image type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Custom type
+ /// </summary>
+ Custom,
+ }
+ }
+
+ public static class Company
+ {
+ /// <summary>
+ /// Identifier of this contacts company view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.company";
+ /// <summary>
+ /// DB record ID of the company
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.CompanyId;
+ /// <summary>
+ /// Contact ID that the company belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.CompanyContactId;
+ /// <summary>
+ /// Company type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.CompanyType;
+ /// <summary>
+ /// Custom company type label, when the company type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.CompanyLabel;
+ /// <summary>
+ /// Company name
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.CompanyName;
+ /// <summary>
+ /// Department
+ /// </summary>
+ public const uint Department = (uint)PropertyIds.CompanyDepartment;
+ /// <summary>
+ /// Job title
+ /// </summary>
+ public const uint JobTitle = (uint)PropertyIds.CompanyJobTitle;
+ /// <summary>
+ /// Assistant name
+ /// </summary>
+ public const uint AssistantName = (uint)PropertyIds.CompanyAssistantName;
+ /// <summary>
+ /// Role
+ /// </summary>
+ public const uint Role = (uint)PropertyIds.CompanyRole;
+ /// <summary>
+ /// Company logo image file path
+ /// </summary>
+ public const uint Logo = (uint)PropertyIds.CompanyLogo;
+ /// <summary>
+ /// Company location
+ /// </summary>
+ public const uint Location = (uint)PropertyIds.CompanyLocation;
+ /// <summary>
+ /// Description
+ /// </summary>
+ public const uint Description = (uint)PropertyIds.CompanyDescription;
+ /// <summary>
+ /// Pronounce the company name
+ /// </summary>
+ public const uint PhoneticName = (uint)PropertyIds.CompanyPhoneticName;
+
+ /// <summary>
+ /// Enumeration for Contact company type.
+ /// </summary>
+ public enum Types
+ {
+ Other = 0, /**< Other company type */
+ Custom = 1 << 0, /**< Custom company type */
+ Work = 1 << 1, /**< Work company type */
+ }
+ }
+
+ public static class Nickname
+ {
+ /// <summary>
+ /// Identifier of this contacts nickname view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.nickname";
+ /// <summary>
+ /// DB record ID of the nickname
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.NicknameId;
+ /// <summary>
+ /// Contact ID that the nickname belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.NicknameContactId;
+ /// <summary>
+ /// Nickname
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.NicknameName;
+ }
+
+ public static class Messenger
+ {
+ /// <summary>
+ /// Identifier of this contacts messenger view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.messenger";
+ /// <summary>
+ /// DB record ID of the messenger
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.MessengerId;
+ /// <summary>
+ /// Contact ID that the messenger belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.MessengerContactId;
+ /// <summary>
+ /// Messenger type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.MessengerType;
+ /// <summary>
+ /// Custom messenger type label, when the messenger type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.MessengerLabel;
+ /// <summary>
+ /// Messenger ID (email address or email ID...)
+ /// </summary>
+ public const uint IMId = (uint)PropertyIds.MessengerIMId;
+
+ /// <summary>
+ /// Enumeration for Contact messenger type.
+ /// </summary>
+ public enum Types
+ {
+ /// <summary>
+ /// Other messenger type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Custom messenger type
+ /// </summary>
+ Custom,
+ /// <summary>
+ /// Google messenger type
+ /// </summary>
+ Google,
+ /// <summary>
+ /// Windows live messenger type
+ /// </summary>
+ WindowsLive,
+ /// <summary>
+ /// Yahoo messenger type
+ /// </summary>
+ Yahoo,
+ /// <summary>
+ /// Facebook messenger type
+ /// </summary>
+ Facebook,
+ /// <summary>
+ /// ICQ type
+ /// </summary>
+ ICQ,
+ /// <summary>
+ /// AOL instance messenger type
+ /// </summary>
+ AOL,
+ /// <summary>
+ /// QQ type
+ /// </summary>
+ QQ,
+ /// <summary>
+ /// Jabber type
+ /// </summary>
+ Jabber,
+ /// <summary>
+ /// Skype type
+ /// </summary>
+ Skype,
+ /// <summary>
+ /// IRC type
+ /// </summary>
+ IRC,
+ }
+ }
+
+ public static class Profile
+ {
+ /// <summary>
+ /// Identifier of this contacts profile view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.profile";
+ /// <summary>
+ /// DB record ID of profile
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.ProfileId;
+ /// <summary>
+ /// Contacts ID that the profile belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ProfileContactId;
+ /// <summary>
+ /// Unique identifier
+ /// </summary>
+ public const uint Uid = (uint)PropertyIds.ProfileUid;
+ /// <summary>
+ /// Profile contents
+ /// </summary>
+ public const uint Text = (uint)PropertyIds.ProfileText;
+ /// <summary>
+ /// Priority to display the profile
+ /// </summary>
+ public const uint Order = (uint)PropertyIds.ProfileOrder;
+ /// <summary>
+ /// Data for app_control_set_operation
+ /// </summary>
+ public const uint ServiceOperation = (uint)PropertyIds.ProfileServiceOperation;
+ /// <summary>
+ /// Data for app_control_set_mime
+ /// </summary>
+ public const uint Mime = (uint)PropertyIds.ProfileMIME;
+ /// <summary>
+ /// Data for app_control_set_app_id
+ /// </summary>
+ public const uint AppId = (uint)PropertyIds.ProfileAppId;
+ /// <summary>
+ /// Data for app_control_set_uri
+ /// </summary>
+ public const uint ProfileUri = (uint)PropertyIds.ProfileUri;
+ /// <summary>
+ /// Data for app_control_set_category
+ /// </summary>
+ public const uint Category = (uint)PropertyIds.ProfileCategory;
+ /// <summary>
+ /// It includes "key:value,key:value," pairs. You should parse it. And you must base64 encode each key and value
+ /// </summary>
+ public const uint ExtraData = (uint)PropertyIds.ProfileExtraData;
+ }
+
+ public static class Sip
+ {
+ /// <summary>
+ /// Identifier of this contacts sip view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.sip";
+ /// <summary>
+ /// DB record ID of the sip
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.SipId;
+ /// <summary>
+ /// Contact ID that the sip belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.SipContactId;
+ /// <summary>
+ /// SIP address
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.SipAddress;
+ /// <summary>
+ /// sip type, refer to the Types
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.SipType;
+ /// <summary>
+ /// Custom sip type label, when the sip type is Types.Custom
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.SipLabel;
+
+ public enum Types
+ {
+ /// <summary>
+ /// Other SIP type
+ /// </summary>
+ Other,
+ /// <summary>
+ /// Custom SIP type
+ /// </summary>
+ Custom,
+ /// <summary>
+ /// Home SIP type
+ /// </summary>
+ Home,
+ /// <summary>
+ /// Work SIP type
+ /// </summary>
+ Work,
+ }
+ }
+
+ public static class Extension
+ {
+ /// <summary>
+ /// Identifier of this contacts extension view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.extension";
+ /// <summary>
+ /// DB record ID of the contact extension
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.ExtensionId;
+ /// <summary>
+ /// Contact ID that the contact extension belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ExtensionContactId;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data1 = (uint)PropertyIds.ExtensionData1;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data2 = (uint)PropertyIds.ExtensionData2;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data3 = (uint)PropertyIds.ExtensionData3;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data4 = (uint)PropertyIds.ExtensionData4;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data5 = (uint)PropertyIds.ExtensionData5;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data6 = (uint)PropertyIds.ExtensionData6;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data7 = (uint)PropertyIds.ExtensionData7;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data8 = (uint)PropertyIds.ExtensionData8;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data9 = (uint)PropertyIds.ExtensionData9;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data10 = (uint)PropertyIds.ExtensionData10;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data11 = (uint)PropertyIds.ExtensionData11;
+ /// <summary>
+ /// The extra child record format for non-provided from contacts-service
+ /// </summary>
+ public const uint Data12 = (uint)PropertyIds.ExtensionData12;
+ }
+
+ public static class GroupRelation
+ {
+ /// <summary>
+ /// Identifier of this relationship view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.group_relation";
+ /// <summary>
+ /// DB record ID of the group relation (can not be used as filter)
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.GroupRelationId;
+ /// <summary>
+ /// DB record ID of the group
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.GroupRelationGroupId;
+ /// <summary>
+ /// DB record ID of the contact
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.GroupRelationContactId;
+ /// <summary>
+ /// Group name
+ /// </summary>
+ public const uint Name = (uint)PropertyIds.GroupRelationGroupName;
+ }
+
+ public static class SpeedDial
+ {
+ /// <summary>
+ /// Identifier of this contact speed dial view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.speeddial";
+ /// <summary>
+ /// Stored speed dial number
+ /// </summary>
+ public const uint SpeedDialNumber = (uint)PropertyIds.SpeedDialDialNumber;
+ /// <summary>
+ /// Number ID that the speed dial belongs to
+ /// </summary>
+ public const uint NumberId = (uint)PropertyIds.SpeedDialNumberId;
+ /// <summary>
+ /// Contact number of specified speed dial
+ /// </summary>
+ public const uint Number = (uint)PropertyIds.SpeedDialNumber;
+ /// <summary>
+ /// Contact number label of specified speed dial, when the number type is Number.Types.Custom
+ /// </summary>
+ public const uint NumberLabel = (uint)PropertyIds.SpeedDialNumberLabel;
+ /// <summary>
+ /// Contact number type, refer to the Number.Types
+ /// </summary>
+ public const uint NumberType = (uint)PropertyIds.SpeedDialNumberType;
+ /// <summary>
+ /// Person ID that the speed dial belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.SpeedDialPersonId;
+ /// <summary>
+ /// Display name that the speed dial belongs to
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.SpeedDialDisplayName;
+ /// <summary>
+ /// Image thumbnail path that the speed dial belongs to
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.SpeedDialThumbnail;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint NormalizedNumber = (uint)PropertyIds.SpeedDialNormalizedNumber;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint CleanedNumber = (uint)PropertyIds.SpeedDialCleanedNumber;
+ /// <summary>
+ /// If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied ContactsFilter.StringMatchType.Exactly
+ /// </summary>
+ public const uint NumberFilter = (uint)PropertyIds.SpeedDialNumberFilter;
+ }
+
+ public static class PhoneLog
+ {
+ /// <summary>
+ /// Identifier of this phone log view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.phonelog";
+ /// <summary>
+ /// DB record ID of phone log
+ /// </summary>
+ public const uint Id = (uint)PropertyIds.PhonelogId;
+ /// <summary>
+ /// Person ID that the phone log belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PhonelogPersonId;
+ /// <summary>
+ /// Number or Email that the phone log displays
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.PhonelogAddress;
+ /// <summary>
+ /// Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
+ /// </summary>
+ public const uint LogTime = (uint)PropertyIds.PhonelogLogTime;
+ /// <summary>
+ /// Log type, refer to the Types
+ /// </summary>
+ public const uint LogType = (uint)PropertyIds.PhonelogLogType;
+ /// <summary>
+ /// You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call)
+ /// </summary>
+ public const uint ExtraData1 = (uint)PropertyIds.PhonelogExtraData1;
+ /// <summary>
+ /// You can set the related string data (e.g. short message, subject)
+ /// </summary>
+ public const uint ExtraData2 = (uint)PropertyIds.PhonelogExtraData2;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint NormalizedAddress = (uint)PropertyIds.PhonelogNormalizedAddress;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint CleanedAddress = (uint)PropertyIds.PhonelogCleanedAddress;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint AddressFilter = (uint)PropertyIds.PhonelogAddressFilter;
+ /// <summary>
+ /// You can set the related SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
+ /// </summary>
+ public const uint SimSlotNo = (uint)PropertyIds.PhonelogSIMSlotNo;
+
+ public enum Types
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// Incoming call
+ /// </summary>
+ VoiceIncoming = 1,
+ /// <summary>
+ /// Outgoing call
+ /// </summary>
+ VoiceOutgoing = 2,
+ /// <summary>
+ /// Incoming video call
+ /// </summary>
+ VideoIncoming = 3,
+ /// <summary>
+ /// Outgoing video call
+ /// </summary>
+ VideoOutgoing = 4,
+ /// <summary>
+ /// Not confirmed missed call
+ /// </summary>
+ VoiceMissedUnseen = 5,
+ /// <summary>
+ /// Confirmed missed call
+ /// </summary>
+ VoiceMissedSeen = 6,
+ /// <summary>
+ /// Not confirmed missed video call
+ /// </summary>
+ VideoMissedUnseen = 7,
+ /// <summary>
+ /// Confirmed missed video call
+ /// </summary>
+ VidoeMissedSeen = 8,
+ /// <summary>
+ /// Rejected call
+ /// </summary>
+ VoiceRejected = 9,
+ /// <summary>
+ /// Rejected video call
+ /// </summary>
+ VideoRejected = 10,
+ /// <summary>
+ /// Blocked call
+ /// </summary>
+ VoiceBlocked = 11,
+ /// <summary>
+ /// Blocked video call
+ /// </summary>
+ VideoBlocked = 12,
+ /// <summary>
+ /// Incoming MMS
+ /// </summary>
+ MmsIncoming = 101,
+ /// <summary>
+ /// Outgoing MMS
+ /// </summary>
+ MmsOutgoing = 102,
+ /// <summary>
+ /// Incoming SMS
+ /// </summary>
+ SmsIncoming = 103,
+ /// <summary>
+ /// Outgoing SMS
+ /// </summary>
+ SmsOutgoing = 104,
+ /// <summary>
+ /// Blocked SMS
+ /// </summary>
+ SmsBlocked = 105,
+ /// <summary>
+ /// Blocked MMS
+ /// </summary>
+ MmsBlocked = 106,
+ /// <summary>
+ /// Received email
+ /// </summary>
+ EmailReceived = 201,
+ /// <summary>
+ /// Sent email
+ /// </summary>
+ EmailSent = 202,
+
+ }
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class ContactUpdatedInfo
+ {
+ /// <summary>
+ /// Identifier of this contact updated info view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.contacts_updated_info";
+ /// <summary>
+ /// Updated contact ID
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.UpdateInfoId;
+ /// <summary>
+ /// Addressbook ID that the updated contact belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.UpdateInfoAddressbookId;
+ /// <summary>
+ /// Contact updated type, refer to the ContactsViews.ChangeTypes
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.UpdateInfoType;
+ /// <summary>
+ /// Updated version
+ /// </summary>
+ public const uint Version = (uint)PropertyIds.UpdateInfoVersion;
+ /// <summary>
+ /// Contact image is changed or not
+ /// </summary>
+ public const uint ImageChanged = (uint)PropertyIds.UpdateInfoImageChanged;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class MyProfileUpdatedInfo
+ {
+ /// <summary>
+ /// Identifier of this my profile updated info view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.my_profile_updated_info";
+ /// <summary>
+ /// Address book ID that the updated my profile belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.UpdateInfoAddressbookId;
+ /// <summary>
+ /// Changed update type, refer to the ContactsViews.ChangeTypes
+ /// </summary>
+ public const uint LastChangedType = (uint)PropertyIds.UpdateInfoLastChangedType;
+ /// <summary>
+ /// Updated version
+ /// </summary>
+ public const uint Version = (uint)PropertyIds.UpdateInfoVersion;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class GroupUpdatedInfo
+ {
+ /// <summary>
+ /// Identifier of this group updated info view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.groups_updated_info";
+ /// <summary>
+ /// Updated group ID
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.UpdateInfoId;
+ /// <summary>
+ /// Address book ID that the updated group belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.UpdateInfoAddressbookId;
+ /// <summary>
+ /// Changed update type, refer to the ContactsViews.ChangeTypes
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.UpdateInfoType;
+ /// <summary>
+ /// Updated version
+ /// </summary>
+ public const uint Version = (uint)PropertyIds.UpdateInfoVersion;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class GroupMemberUpdatedInfo
+ {
+ /// <summary>
+ /// Identifier of this group member updated info view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.groups_member_updated_info";
+ /// <summary>
+ /// Updated group ID
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.UpdateInfoId;
+ /// <summary>
+ /// Address book ID that the updated group belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.UpdateInfoAddressbookId;
+ /// <summary>
+ /// Updated version
+ /// </summary>
+ public const uint Version = (uint)PropertyIds.UpdateInfoVersion;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class GroupRelationUpdatedInfo
+ {
+ /// <summary>
+ /// Identifier of this group relation updated info view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.group_relations_updated_info";
+ /// <summary>
+ /// Group ID of group relation
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.GroupId;
+ /// <summary>
+ /// Contact ID of the updated group relation
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Address book ID of contact that the updated group relation
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.AddressbookId;
+ /// <summary>
+ /// Changed update type, refer to the ContactsViews.ChangeTypes
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.UpdateInfoType;
+ /// <summary>
+ /// Updated version
+ /// </summary>
+ public const uint Version = (uint)PropertyIds.UpdateInfoVersion;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonContact
+ {
+ /// <summary>
+ /// Identifier of this person contact view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// Status of social account (projection)
+ /// </summary>
+ public const uint Status = (uint)PropertyIds.PersonStatus;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// Link count of contact records (projection)
+ /// </summary>
+ public const uint LinkCount = (uint)PropertyIds.PersonLinkCount;
+ /// <summary>
+ /// Contact ID that the person belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Addressbook IDs that the person belongs to (projection)
+ /// </summary>
+ public const uint AddressbookIds = (uint)PropertyIds.PersonAddressbookIds;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Addressbook ID that the person belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Addressbook mode, refer to the Addressbook.Modes
+ /// </summary>
+ public const uint AddressbookMode = (uint)PropertyIds.AddressbookMode;
+ /// <summary>
+ /// Addressbook name that the person belongs to
+ /// </summary>
+ public const uint AddressbookName = (uint)PropertyIds.AddressbookName;
+ /// <summary>
+ /// kerword matched data type, refer to the Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonNumber
+ {
+ /// <summary>
+ /// Identifier of this person number view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/number";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Number ID that the person belongs to
+ /// </summary>
+ public const uint NumberId = (uint)PropertyIds.NumberId;
+ /// <summary>
+ /// Number type, refer to the Number.Types (projection)
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.NumberType;
+ /// <summary>
+ /// Custom number type label, when the number type is Number.Types.Custom (projection)
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.NumberLabel;
+ /// <summary>
+ /// The number is default number or not
+ /// </summary>
+ public const uint IsPrimaryDefault = (uint)PropertyIds.DataIsPrimaryDefault;
+ /// <summary>
+ /// Number
+ /// </summary>
+ public const uint Number = (uint)PropertyIds.NumberNumber;
+ /// <summary>
+ /// If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied ContactsFilter.StringMatchType.Exactly.
+ /// </summary>
+ public const uint NumberFilter = (uint)PropertyIds.NumberNumberFilter;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint NormalizedNumber = (uint)PropertyIds.NumberNormalizedNumber;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint CleanedNumber = (uint)PropertyIds.NumberCleanedNumber;
+ /// <summary>
+ /// kerword matched data type, refer to they Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonEmail
+ {
+ /// <summary>
+ /// Identifier of this person email view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/email";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Email ID that the person belongs to
+ /// </summary>
+ public const uint EmailId = (uint)PropertyIds.EmailId;
+ /// <summary>
+ /// Email type, refer to the Email.Types (projection)
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.EmailType;
+ /// <summary>
+ /// Custom mail type label, when the email type is Email.Types.Custom (projection)
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.EmailLabel;
+ /// <summary>
+ /// The email is default email or not
+ /// </summary>
+ public const uint IsPrimaryDefault = (uint)PropertyIds.DataIsPrimaryDefault;
+ /// <summary>
+ /// Email address
+ /// </summary>
+ public const uint Email = (uint)PropertyIds.EmailEmail;
+ /// <summary>
+ /// kerword matched data type, refer to they Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonGroupRelation
+ {
+ /// <summary>
+ /// Identifier of this person group relation view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/group";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// Status of social account (projection)
+ /// </summary>
+ public const uint Status = (uint)PropertyIds.PersonStatus;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Link count of contat records (projection)
+ /// </summary>
+ public const uint LinkCount = (uint)PropertyIds.PersonLinkCount;
+ /// <summary>
+ /// Addressbook IDs that the person belongs to (projection)
+ /// </summary>
+ public const uint AddressbookIds = (uint)PropertyIds.PersonAddressbookIds;
+ /// <summary>
+ /// Addressbook ID that the person belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Addressbook name that the person belongs to
+ /// </summary>
+ public const uint AddressbookName = (uint)PropertyIds.AddressbookName;
+ /// <summary>
+ /// Addressbook mode, refer to the Addressbook.Modes
+ /// </summary>
+ public const uint AddressbookMode = (uint)PropertyIds.AddressbookMode;
+ /// <summary>
+ /// Group ID that the person belongs to
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.GroupRelationGroupId;
+ /// <summary>
+ /// Contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.GroupRelationContactId;
+ /// <summary>
+ /// kerword matched data type, refer to they Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonGroupAssigned
+ {
+ /// <summary>
+ /// Identifier of this person group assigned view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/group_assigned";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// Status of social account (projection)
+ /// </summary>
+ public const uint Status = (uint)PropertyIds.PersonStatus;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Link count of contact records (projection)
+ /// </summary>
+ public const uint LinkCount = (uint)PropertyIds.PersonLinkCount;
+ /// <summary>
+ /// Addressbook IDs that the linked person belongs to (projection)
+ /// </summary>
+ public const uint AddressbookIds = (uint)PropertyIds.PersonAddressbookIds;
+ /// <summary>
+ /// Addressbook ID that the person belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Addressbook mode, refer to the Addressbook.Modes
+ /// </summary>
+ public const uint AddressbookMode = (uint)PropertyIds.AddressbookMode;
+ /// <summary>
+ /// Group ID that the person belongs to
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.GroupRelationGroupId;
+ /// <summary>
+ /// Contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.GroupRelationContactId;
+ /// <summary>
+ /// kerword matched data type, refer to they Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonGroupNotAssigned
+ {
+ /// <summary>
+ /// Identifier of this person group not assigned view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/group_not_assigned";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// Status of social account (projection)
+ /// </summary>
+ public const uint Status = (uint)PropertyIds.PersonStatus;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Link count of contact records (projection)
+ /// </summary>
+ public const uint LinkCount = (uint)PropertyIds.PersonLinkCount;
+ /// <summary>
+ /// Addressbook IDs that the linked person belongs to (projection)
+ /// </summary>
+ public const uint AddressbookIds = (uint)PropertyIds.PersonAddressbookIds;
+ /// <summary>
+ /// Addressbook ID that the person belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Addressbook mode, refer to the Addressbook.Modes
+ /// </summary>
+ public const uint AddressbookMode = (uint)PropertyIds.AddressbookMode;
+ /// <summary>
+ /// Contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// kerword matched data type, refer to they Contact.DataTypes
+ /// </summary>
+ public const uint SnippetType = (uint)PropertyIds.PersonSnippetType;
+ /// <summary>
+ /// keyword matched data string
+ /// </summary>
+ public const uint SnippetString = (uint)PropertyIds.PersonSnippetString;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonPhonelog
+ {
+ /// <summary>
+ /// Identifier of this phone log view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/simple_contact/phonelog";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// DB record ID of phone log
+ /// </summary>
+ public const uint LogId = (uint)PropertyIds.PhonelogId;
+ /// <summary>
+ /// Number or Email that the phone log displays
+ /// </summary>
+ public const uint Address = (uint)PropertyIds.PhonelogAddress;
+ /// <summary>
+ /// Number or Email type (projection)
+ /// </summary>
+ public const uint AddressType = (uint)PropertyIds.DataData1;
+ /// <summary>
+ /// Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
+ /// </summary>
+ public const uint LogTime = (uint)PropertyIds.PhonelogLogTime;
+ /// <summary>
+ /// Log type, refer to the PhoneLog.Types
+ /// </summary>
+ public const uint LogType = (uint)PropertyIds.PhonelogLogType;
+ /// <summary>
+ /// You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call) (projection)
+ /// </summary>
+ public const uint ExtraData1 = (uint)PropertyIds.PhonelogExtraData1;
+ /// <summary>
+ /// You can set the related string data (e.g. short message, subject) (projection)
+ /// </summary>
+ public const uint ExtraData2 = (uint)PropertyIds.PhonelogExtraData2;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint NormalizedAddress = (uint)PropertyIds.PhonelogNormalizedAddress;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint CleanedAddress = (uint)PropertyIds.PhonelogCleanedAddress;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint AddressFilter = (uint)PropertyIds.PhonelogAddressFilter;
+ /// <summary>
+ /// It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
+ /// </summary>
+ public const uint SIMSlotNo = (uint)PropertyIds.PhonelogSIMSlotNo;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PersonUsage
+ {
+ /// <summary>
+ /// Identifier of this person usage view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.person/usag";
+ /// <summary>
+ /// DB record ID of the person
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.PersonId;
+ /// <summary>
+ /// Display name of the person
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.PersonDisplayName;
+ /// <summary>
+ /// The first character of first string for grouping. This is normalized using icu (projection)
+ /// </summary>
+ public const uint DisplayNameIndex = (uint)PropertyIds.PersonDisplayNameIndex;
+ /// <summary>
+ /// Display contact ID that the person belongs to (projection)
+ /// </summary>
+ public const uint DisplayContactId = (uint)PropertyIds.PersonDisplayContactId;
+ /// <summary>
+ /// Ringtone path of the person (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.PersonRingtone;
+ /// <summary>
+ /// Image thumbnail path of the person (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.PersonThumbnail;
+ /// <summary>
+ /// Vibration path of the person (projection)
+ /// </summary>
+ public const uint Vibration = (uint)PropertyIds.PersonVibration;
+ /// <summary>
+ /// Message alert path of the person (projection)
+ /// </summary>
+ public const uint MessageAlert = (uint)PropertyIds.PersonMessageAlert;
+ /// <summary>
+ /// The person is favorite or not
+ /// </summary>
+ public const uint IsFavorite = (uint)PropertyIds.PersonIsFavorite;
+ /// <summary>
+ /// The person has phone number or not
+ /// </summary>
+ public const uint HasPhonenumber = (uint)PropertyIds.PersonHasPhonenumber;
+ /// <summary>
+ /// The person has email or not
+ /// </summary>
+ public const uint HasEmail = (uint)PropertyIds.PersonHasEmail;
+ /// <summary>
+ /// Usage type, refer to the UsageTypes
+ /// </summary>
+ public const uint UsageType = (uint)PropertyIds.PersonUsageType;
+ /// <summary>
+ /// Usage number of person
+ /// </summary>
+ public const uint TimesUsed = (uint)PropertyIds.PersonTimesUsed;
+
+ public enum Types
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// Outgoing call
+ /// </summary>
+ OutgoingCall,
+ /// <summary>
+ /// Outgoing message
+ /// </summary>
+ OutgoingMessage,
+ /// <summary>
+ /// Outgoing email
+ /// </summary>
+ OutgoingEmail,
+ /// <summary>
+ /// Incoming call
+ /// </summary>
+ IncomingCall,
+ /// <summary>
+ /// Incoming message
+ /// </summary>
+ IncomingMessage,
+ /// <summary>
+ /// Incoming email
+ /// </summary>
+ IncomingEmail,
+ /// <summary>
+ /// Missed call
+ /// </summary>
+ MissedCall,
+ /// <summary>
+ /// Rejected call
+ /// </summary>
+ RejectedCall,
+ /// <summary>
+ /// Blocked call
+ /// </summary>
+ BlockedCall,
+ /// <summary>
+ /// Blocked message
+ /// </summary>
+ BlockedMessage
+ }
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class ContactNumber
+ {
+ /// <summary>
+ /// Identifier of this contacts number view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.simple_contact/number";
+ /// <summary>
+ /// Contact ID that the number belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Display name of contact that the number belongs to
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.ContactDisplayName;
+ /// <summary>
+ /// The source type of display name, refer to the Contact.DisplayNameSourceTypes (projection)
+ /// </summary>
+ public const uint DisplaySourceType = (uint)PropertyIds.ContactDisplaySourceDataId;
+ /// <summary>
+ /// Addressbook ID that the number belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Person ID that the number belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.ContactPersonId;
+ /// <summary>
+ /// Ringtone path that the number belongs to (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.ContactRingtone;
+ /// <summary>
+ /// Image thumbnail path that the number belongs to (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.ContactThumbnail;
+ /// <summary>
+ /// DB record ID of the number
+ /// </summary>
+ public const uint NumberId = (uint)PropertyIds.NumberId;
+ /// <summary>
+ /// Number type, refer to the Number.Types (projection)
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.NumberType;
+ /// <summary>
+ /// Custom number type label, when the number type is Number.Types.Custom (projection)
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.NumberLabel;
+ /// <summary>
+ /// The number is default number or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.NumberIsDefault;
+ /// <summary>
+ /// Number
+ /// </summary>
+ public const uint Number = (uint)PropertyIds.NumberNumber;
+ /// <summary>
+ /// If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied ContactsFilter.StringMatchType.Exactly
+ /// </summary>
+ public const uint NumberFilter = (uint)PropertyIds.NumberNumberFilter;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint NormalizedNumber = (uint)PropertyIds.NumberNormalizedNumber;
+ /// <summary>
+ /// You can only use this property for search filter
+ /// </summary>
+ public const uint CleanedNumber = (uint)PropertyIds.NumberCleanedNumber;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class ContactEmail
+ {
+ /// <summary>
+ /// Identifier of this contacts email view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.simple_contact/email";
+ /// <summary>
+ /// Contact ID that the number belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Display name of contact that the number belongs to
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.ContactDisplayName;
+ /// <summary>
+ /// The source type of display name, refer to the Contact.DisplayNameSourceTypes (projection)
+ /// </summary>
+ public const uint DisplaySourceType = (uint)PropertyIds.ContactDisplaySourceDataId;
+ /// <summary>
+ /// Addressbook ID that the number belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Person ID that the number belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.ContactPersonId;
+ /// <summary>
+ /// Ringtone path that the number belongs to (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.ContactRingtone;
+ /// <summary>
+ /// Image thumbnail path that the number belongs to (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.ContactThumbnail;
+ /// <summary>
+ /// DB record ID of the email
+ /// </summary>
+ public const uint EmailId = (uint)PropertyIds.EmailId;
+ /// <summary>
+ /// Email type, refer to the Email.Types (projection)
+ /// </summary>
+ public const uint Type = (uint)PropertyIds.EmailType;
+ /// <summary>
+ /// Custom mail type label, when the email type is Email.Types.Custom (projection)
+ /// </summary>
+ public const uint Label = (uint)PropertyIds.EmailLabel;
+ /// <summary>
+ /// Email is default email or not
+ /// </summary>
+ public const uint IsDefault = (uint)PropertyIds.EmailIsDefault;
+ /// <summary>
+ /// Email address
+ /// </summary>
+ public const uint Email = (uint)PropertyIds.EmailEmail;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class ContactGroupRelation
+ {
+ /// <summary>
+ /// Identifier of this contact grouprel view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.simple_contact/group";
+ /// <summary>
+ /// Contact ID that the number belongs to
+ /// </summary>
+ public const uint ContactId = (uint)PropertyIds.ContactId;
+ /// <summary>
+ /// Display name of contact that the number belongs to
+ /// </summary>
+ public const uint DisplayName = (uint)PropertyIds.ContactDisplayName;
+ /// <summary>
+ /// The source type of display name, refer to the Contact.DisplayNameSourceTypes (projection)
+ /// </summary>
+ public const uint DisplaySourceType = (uint)PropertyIds.ContactDisplaySourceDataId;
+ /// <summary>
+ /// Addressbook ID that the number belongs to
+ /// </summary>
+ public const uint AddressbookId = (uint)PropertyIds.ContactAddressbookId;
+ /// <summary>
+ /// Person ID that the number belongs to
+ /// </summary>
+ public const uint PersonId = (uint)PropertyIds.ContactPersonId;
+ /// <summary>
+ /// Ringtone path that the number belongs to (projection)
+ /// </summary>
+ public const uint RingtonePath = (uint)PropertyIds.ContactRingtone;
+ /// <summary>
+ /// Image thumbnail path that the number belongs to (projection)
+ /// </summary>
+ public const uint ThumbnailPath = (uint)PropertyIds.ContactThumbnail;
+ /// <summary>
+ /// DB record ID of the group relation
+ /// </summary>
+ public const uint GroupId = (uint)PropertyIds.GroupRelationGroupId;
+ /// <summary>
+ /// Group name (projection)
+ /// </summary>
+ public const uint GroupName = (uint)PropertyIds.GroupRelationGroupName;
+ };
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>Read only view</remarks>
+ public static class PhonelogStatistics
+ {
+ /// <summary>
+ /// Identifier of this log statistics view
+ /// </summary>
+ public const string Uri = "tizen.contacts_view.phonelog_stat";
+ /// <summary>
+ /// Log count (projection)
+ /// </summary>
+ public const uint LogCount = (uint)PropertyIds.PhonelogStatLogCount;
+ /// <summary>
+ /// Log type, see the contacts_phone_log_type_e
+ /// </summary>
+ public const uint LogType = (uint)PropertyIds.PhonelogStatLogType;
+ /// <summary>
+ /// It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
+ /// </summary>
+ public const uint SIMSlotNo = (uint)PropertyIds.PhonelogStatSIMSlotNo;
+ };
+ }
+}
--- /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 static Tizen.Pims.Contacts.ContactsDatabase;
+
+namespace Tizen.Pims.Contacts
+{
+ public class DBStatusChangedEventArgs
+ {
+ internal DBStatusChangedEventArgs(DbStatus status)
+ {
+ this.Status = status;
+ }
+
+ public DbStatus Status
+ {
+ get;
+ internal set;
+ }
+ }
+}
--- /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.Pims.Contacts
+{
+ public class NameDisplayOrderChangedEventArgs
+ {
+ internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder)
+ {
+ this.NameDisplayOrder = displayOrder;
+ }
+
+ public ContactDisplayOrder NameDisplayOrder
+ {
+ get;
+ internal set;
+ }
+ }
+}
\ No newline at end of file
--- /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.Pims.Contacts
+{
+ public class NameSortingOrderChangedEventArgs
+ {
+ internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder)
+ {
+ this.NameSortingOrder = SortingOrder;
+ }
+
+ public ContactSortingOrder NameSortingOrder
+ {
+ get;
+ internal set;
+ }
+ }
+}
\ No newline at end of file