Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Pims.Contacts / Interop / Interop.Person.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19
20 internal static partial class Interop
21 {
22     internal enum ContactsPersonProperty
23     {
24         NameContact, // Default contacts record
25         Number, // Default number record
26         Email, // Default Email record
27         Image // Default image record
28     };
29
30     internal enum  ContactsUsageType
31     {
32         None,          /**< None */
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) */
43     };
44
45     internal static partial class Person
46     {
47         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_link_person")]
48         internal static extern int ContactsPersonLinkPerson(int basePersonId, int personId);
49
50         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_unlink_contact")]
51         internal static extern int ContactsPersonUnlinkContact(int personId, int contactId, out int unlinkedPersonId);
52
53         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_reset_usage")]
54         internal static extern int ContactsPersonResetUsage(int personId, ContactsUsageType type);
55
56         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_favorite_order")]
57         internal static extern int ContactsPersonSetFavoriteOrder(int personId, int previousPersonId, int nextPersonId);
58
59         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_set_default_property")]
60         internal static extern int ContactsPersonSetDefaultProperty(ContactsPersonProperty property, int personId, int id);
61
62         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_default_property")]
63         internal static extern int ContactsPersonGetDefaultProperty(ContactsPersonProperty property, int personId, out int id);
64
65         [DllImport(Libraries.Contacts, EntryPoint = "contacts_person_get_aggregation_suggestions")]
66         internal static extern int ContactsPersonGetAggregationSuggestions(int personId, int limit, out IntPtr listHandle);
67
68
69     }
70 }