modify terminology:calendar->book,allday->localtime,normal->utime,svc->service
[platform/core/pim/calendar-service.git] / common / dbus / cal_dbus_helper.h
1 /*
2  * Calendar Service
3  *
4  * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __CALENDAR_SERVICE_DBUS_UTILS_H__
21 #define __CALENDAR_SERVICE_DBUS_UTILS_H__
22
23 /*
24  * DBUS_INTERFACE name validation.
25  * Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_" and must not begin with a digit.
26  */
27 #ifndef CAL_DBUS_INTERFACE
28 #define CAL_DBUS_INTERFACE "org.tizen.CalendarService.dbus"
29 #warning "CAL_DBUS_INTERFACE is redefined"
30 #endif
31
32 #define CAL_DBUS_OBJPATH "/org/tizen/calendar_service/dbus"
33
34 GVariant *cal_dbus_utils_common_to_gvariant(cal_record_s *rec);
35 GVariant *cal_dbus_utils_handle_to_gvariant(calendar_h handle);
36 GVariant *cal_dbus_utils_record_to_gvariant(calendar_record_h record);
37 GVariant *cal_dbus_utils_list_to_gvariant(calendar_list_h list);
38 GVariant *cal_dbus_utils_query_to_gvariant(calendar_query_h query);
39 GVariant *cal_dbus_utils_ids_to_gvariant(int *ids, int count);
40 GVariant *cal_dbus_utils_stream_to_gvariant(int stream_size, char *stream);
41
42 int cal_dbus_utils_gvariant_to_common(GVariant *arg_common, cal_record_s **rec);
43 int cal_dbus_utils_gvariant_to_handle(GVariant *arg_handle, calendar_h *handle);
44 int cal_dbus_utils_gvariant_to_record(GVariant *arg_record, calendar_record_h *record);
45 int cal_dbus_utils_gvariant_to_list(GVariant *arg_list, calendar_list_h *list);
46 int cal_dbus_utils_gvariant_to_query(GVariant *arg_query, calendar_query_h *query);
47 int cal_dbus_utils_gvariant_to_ids(GVariant *arg_ids, int count, int **ids);
48 int cal_dbus_utils_gvariant_to_stream(GVariant *arg_stream, int *out_size, char **out_stream);
49
50 #endif /*__CALENDAR_SERVICE_DBUS_UTILS_H__ */