Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Pims.Contacts / Interop / Interop.Record.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 static partial class Record
23     {
24         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_create")]
25         internal static extern int Create(string uri, out IntPtr recordIdHandle);
26
27         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_destroy")]
28         internal static extern int Destroy(IntPtr recordHandle, bool deleteChild);
29
30         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone")]
31         internal static extern int Clone(IntPtr recordHandle, out IntPtr clonedRecordHandle);
32
33         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str")]
34         internal static extern int GetStr(IntPtr recordHandle, uint propertyId, out string value);
35
36         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str_p")]
37         internal static extern int GetStrP(IntPtr recordHandle, uint propertyId, out string value);
38
39         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_str")]
40         internal static extern int SetStr(IntPtr recordHandle, uint propertyId, string value);
41
42         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_int")]
43         internal static extern int GetInt(IntPtr recordHandle, uint propertyId, out int value);
44
45         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_int")]
46         internal static extern int SetInt(IntPtr recordHandle, uint propertyId, int value);
47
48         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_lli")]
49         internal static extern int GetLli(IntPtr recordHandle, uint propertyId, out long value);
50
51         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_lli")]
52         internal static extern int SetLli(IntPtr recordHandle, uint propertyId, long value);
53
54         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_bool")]
55         internal static extern int GetBool(IntPtr recordHandle, uint propertyId, out bool value);
56
57         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_bool")]
58         internal static extern int SetBool(IntPtr recordHandle, uint propertyId, bool value);
59
60         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_double")]
61         internal static extern int GetDouble(IntPtr recordHandle, uint propertyId, out double value);
62
63         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_double")]
64         internal static extern int SetDouble(IntPtr recordHandle, uint propertyId, double value);
65
66         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_add_child_record")]
67         internal static extern int AddChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
68
69         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_remove_child_record")]
70         internal static extern int RemoveChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
71
72         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_child_record_count")]
73         internal static extern int GetChildRecordCount(IntPtr recordHandle, uint propertyId, out int count);
74
75         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_child_record_at_p")]
76         internal static extern int GetChildRecordAtP(IntPtr recordHandle, uint propertyId, int index, out IntPtr childRecordHandle);
77
78         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone_child_record_list")]
79         internal static extern int CloneChildRecordList(IntPtr recordHandle, uint propertyId, out IntPtr clonedListHandle);
80
81         [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_uri_p")]
82         internal static extern int GetUriP(IntPtr recordHandle, out IntPtr uri);
83     }
84 }