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 static partial class Record
24 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_create")]
25 internal static extern int Create(string uri, out IntPtr recordIdHandle);
27 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_destroy")]
28 internal static extern int Destroy(IntPtr recordHandle, bool deleteChild);
30 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone")]
31 internal static extern int Clone(IntPtr recordHandle, out IntPtr clonedRecordHandle);
33 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str")]
34 internal static extern int GetStr(IntPtr recordHandle, uint propertyId, out string value);
36 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_str_p")]
37 internal static extern int GetStrP(IntPtr recordHandle, uint propertyId, out string value);
39 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_str")]
40 internal static extern int SetStr(IntPtr recordHandle, uint propertyId, string value);
42 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_int")]
43 internal static extern int GetInt(IntPtr recordHandle, uint propertyId, out int value);
45 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_int")]
46 internal static extern int SetInt(IntPtr recordHandle, uint propertyId, int value);
48 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_lli")]
49 internal static extern int GetLli(IntPtr recordHandle, uint propertyId, out long value);
51 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_lli")]
52 internal static extern int SetLli(IntPtr recordHandle, uint propertyId, long value);
54 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_bool")]
55 internal static extern int GetBool(IntPtr recordHandle, uint propertyId, out bool value);
57 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_bool")]
58 internal static extern int SetBool(IntPtr recordHandle, uint propertyId, bool value);
60 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_double")]
61 internal static extern int GetDouble(IntPtr recordHandle, uint propertyId, out double value);
63 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_set_double")]
64 internal static extern int SetDouble(IntPtr recordHandle, uint propertyId, double value);
66 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_add_child_record")]
67 internal static extern int AddChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
69 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_remove_child_record")]
70 internal static extern int RemoveChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childRecordHandle);
72 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_child_record_count")]
73 internal static extern int GetChildRecordCount(IntPtr recordHandle, uint propertyId, out int count);
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);
78 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_clone_child_record_list")]
79 internal static extern int CloneChildRecordList(IntPtr recordHandle, uint propertyId, out IntPtr clonedListHandle);
81 [DllImport(Libraries.Contacts, EntryPoint = "contacts_record_get_uri_p")]
82 internal static extern int GetUriP(IntPtr recordHandle, out IntPtr uri);