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;
19 using Tizen.Pims.Calendar;
21 internal static partial class Interop
23 internal static partial class Calendar
25 internal static partial class Record
27 [StructLayout(LayoutKind.Sequential)]
28 internal struct DateTime
40 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_create")]
41 internal static extern int Create(string uri, out IntPtr recordHandle);
42 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_destroy")]
43 internal static extern int Destroy(IntPtr recordHandle, bool isDeleteChild);
44 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_clone")]
45 internal static extern int Clone(IntPtr recordHandle, out IntPtr cloneHandle);
46 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_uri_p")]
47 internal static extern int GetUriPointer(IntPtr recordHandle, out IntPtr uri);
48 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_str")]
49 internal static extern int GetString(IntPtr recordHandle, uint propertyId, out string str);
50 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_str_p")]
51 internal static extern int GetStringPointer(IntPtr recordHandle, uint propertyId, out string str);
52 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_int")]
53 internal static extern int GetInteger(IntPtr recordHandle, uint propertyId, out int value);
54 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_double")]
55 internal static extern int GetDouble(IntPtr recordHandle, uint propertyId, out double value);
56 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_lli")]
57 internal static extern int GetLli(IntPtr recordHandle, uint propertyId, out long value);
58 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_caltime")]
59 internal static extern int GetCalendarTime(IntPtr recordHandle, uint propertyId, out DateTime value);
60 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_set_str")]
61 internal static extern int SetString(IntPtr recordHandle, uint propertyId, string str);
62 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_set_int")]
63 internal static extern int SetInteger(IntPtr recordHandle, uint propertyId, int value);
64 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_set_double")]
65 internal static extern int SetDouble(IntPtr recordHandle, uint propertyId, double value);
66 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_set_lli")]
67 internal static extern int SetLli(IntPtr recordHandle, uint propertyId, long value);
68 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_set_caltime")]
69 internal static extern int SetCalendarTime(IntPtr recordHandle, uint propertyId, DateTime value);
70 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_add_child_record")]
71 internal static extern int AddChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childHandle);
72 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_remove_child_record")]
73 internal static extern int RemoveChildRecord(IntPtr recordHandle, uint propertyId, IntPtr childHandle);
74 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_child_record_count")]
75 internal static extern int GetChildRecordCount(IntPtr recordHandle, uint propertyId, out int count);
76 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_get_child_record_at_p")]
77 internal static extern int GetChildRecordPointer(IntPtr recordHandle, uint propertyId, int index, out IntPtr childHandle);
78 [DllImport(Libraries.Calendar, EntryPoint = "calendar_record_clone_child_record_list")]
79 internal static extern int CloneChildRecordList(IntPtr childRecordHandle, uint propertyId, out IntPtr listHandle);