2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal enum ContactsPersonProperty
24 NameContact, // Default contacts record
25 Number, // Default number record
26 Email, // Default Email record
27 Image // Default image record
30 internal enum ContactsUsageType
33 OutgoingCall, /**< Outgoing Call */
34 OutgoingMsg, /**< Outgoing message */
35 OutgoingEmail, /**< Outgoing Email (Since 3.0) */
36 IncomingCall, /**< Incoming Call (Since 3.0) */
37 IncomingMsg, /**< Incoming message (Since 3.0) */
38 IncomingEmail,/**< Incoming Email (Since 3.0) */
39 MissedCall, /**< Missed Call (Since 3.0) */
40 RejectedCall, /**< Rejected Call (Since 3.0) */
41 BlockedCall, /**< Blocked Call (Since 3.0) */
42 BlockedMsg /**< Blocked message (Since 3.0) */
45 internal static partial class Person
47 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_link_person")]
48 internal static extern int ContactsPersonLinkPerson(int basePersonId, int personId);
50 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_unlink_contact")]
51 internal static extern int ContactsPersonUnlinkContact(int personId, int contactId, out int unlinkedPersonId);
53 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_reset_usage")]
54 internal static extern int ContactsPersonResetUsage(int personId, ContactsUsageType type);
56 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_favorite_order")]
57 internal static extern int ContactsPersonSetFavoriteOrder(int personId, int previousPersonId, int nextPersonId);
59 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_default_property")]
60 internal static extern int ContactsPersonSetDefaultProperty(ContactsPersonProperty property, int personId, int id);
62 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_default_property")]
63 internal static extern int ContactsPersonGetDefaultProperty(ContactsPersonProperty property, int personId, out int id);
65 [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_aggregation_suggestions")]
66 internal static extern int ContactsPersonGetAggregationSuggestions(int personId, int limit, out IntPtr listHandle);