CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(calendar-service C CXX)
-SET(DEST_INCLUDE_DIR "include/calendar-service")
-SET(SRC_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
-
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR ${LIB_INSTALL_DIR})
-SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}")
-
-EXECUTE_PROCESS(COMMAND build-util/generator.sh)
-
-#INCLUDE_DIRECTORIES(${SRC_INCLUDE_DIR})
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -I${CMAKE_SOURCE_DIR}/include")
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
- glib-2.0
- db-util
- sqlite3
- vconf
- alarm-service
- icu-i18n
- contacts-service2
- capi-appfw-package-manager
- libtzplatform-config
-)
-
-FOREACH(flag ${pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections")
+SET(EXTRA_CFLAGS "-Wall -Werror-implicit-function-declaration -fvisibility=hidden")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
-#SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CLIENT calendar-service2)
+SET(DAEMON calendar-serviced)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-# Install header file
-FILE(GLOB HEADER_FILES ${SRC_INCLUDE_DIR}/calendar*.h)
-INSTALL(FILES ${HEADER_FILES} DESTINATION ${INCLUDEDIR}2)
+EXECUTE_PROCESS(COMMAND build-util/generator.sh)
-#ADD_SUBDIRECTORY(schema)
ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY(server)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/client)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/ipc)
-LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
-
-SET(INC_DIR ${CMAKE_SOURCE_DIR}/include)
-
-SET(CALSVC2 calendar-service2)
-
-SET(SRCS
- cal_client_ipc.c
- cal_client_service.c
- cal_client_service_helper.c
- cal_client_db.c
- cal_client_db_helper.c
- cal_client_reminder.c
- cal_client_handle.c
- cal_client_utils.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_alarm.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_attendee.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_calendar.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_event.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_allday.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_allday_extended.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_normal.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_normal_extended.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_search.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_timezone.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_todo.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_updated_info.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_calendar.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_event.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_todo.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_attendee.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_alarm.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_search.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_timezone.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_updated_info.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_normal.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_allday.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_normal_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_allday_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_view.c
- ${CMAKE_SOURCE_DIR}/common/cal_filter.c
- ${CMAKE_SOURCE_DIR}/common/cal_query.c
- ${CMAKE_SOURCE_DIR}/common/cal_inotify.c
- ${CMAKE_SOURCE_DIR}/common/cal_list.c
- ${CMAKE_SOURCE_DIR}/common/cal_time.cpp
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar.c
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar_make.c
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar_parse.c
- ${CMAKE_SOURCE_DIR}/common/cal_mutex.c
- ${CMAKE_SOURCE_DIR}/common/cal_handle.c
- ${CMAKE_SOURCE_DIR}/common/cal_utils.c
- )
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/client)
-INCLUDE(FindPkgConfig)
-pkg_check_modules(service2_pkgs REQUIRED
+FILE(GLOB CLIENT_SRCS
+ ${CMAKE_SOURCE_DIR}/common/ipc/*.c
+ ${CMAKE_SOURCE_DIR}/common/*.c*
+ *.c)
+
+pkg_check_modules(client_pkgs REQUIRED
+ glib-2.0
+ db-util
+ sqlite3
+ vconf
+ alarm-service
+ icu-i18n
+ contacts-service2
+ libtzplatform-config
+ capi-appfw-package-manager
pims-ipc
dlog
- capi-base-common
- )
-
-FOREACH(flag ${service2_pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
-
-SET(service2_pkgs_LDFLAGS "${pkgs_LDFLAGS} ${service2_pkgs_LDFLAGS}")
+ capi-base-common)
+INCLUDE_DIRECTORIES(${client_pkgs_INCLUDE_DIRS})
+LINK_DIRECTORIES(${client_pkgs_LIBRARY_DIRS})
ADD_DEFINITIONS("-DCAL_IPC_CLIENT")
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-
-#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-
-ADD_LIBRARY(${CALSVC2} SHARED ${SRCS})
-SET_TARGET_PROPERTIES(${CALSVC2} PROPERTIES SOVERSION ${MAJORVER})
-SET_TARGET_PROPERTIES(${CALSVC2} PROPERTIES VERSION ${FULLVER})
-TARGET_LINK_LIBRARIES(${CALSVC2} ${service2_pkgs_LDFLAGS})
-INSTALL(TARGETS ${CALSVC2} DESTINATION ${LIB_INSTALL_DIR})
+ADD_LIBRARY(${CLIENT} SHARED ${CLIENT_SRCS})
+TARGET_LINK_LIBRARIES(${CLIENT} ${client_pkgs_LIBRARIES})
+SET_TARGET_PROPERTIES(${CLIENT} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER})
+INSTALL(TARGETS ${CLIENT} DESTINATION ${LIB_INSTALL_DIR})
-#pc
-CONFIGURE_FILE(${CALSVC2}.pc.in ${CALSVC2}.pc @ONLY)
-INSTALL(FILES ${CALSVC2}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+# pc
+CONFIGURE_FILE(${CLIENT}.pc.in ${CLIENT}.pc @ONLY)
+INSTALL(FILES ${CLIENT}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+# header
+FILE(GLOB CLIENT_HEADER ${CMAKE_SOURCE_DIR}/include/*.h)
+INSTALL(FILES ${CLIENT_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR}/${CLIENT})
#include <glib-object.h>
#include <errno.h>
#include <pthread.h>
+#include <unistd.h>
+#include <sys/types.h>
#include "calendar_db.h"
#include "calendar_types.h"
#include "cal_ipc_marshal.h"
#include "cal_handle.h"
#include "cal_utils.h"
+#include "cal_client_reminder.h"
typedef struct {
pims_ipc_h ipc;
pims_ipc_data_destroy(outdata);
return CALENDAR_ERROR_IPC;
}
+ pims_ipc_data_destroy(outdata);
return ipc_ret;
}
#include <stdlib.h>
#include <pims-ipc.h>
+#include <unistd.h>
+#include <sys/types.h>
#include "calendar.h"
#include "cal_internal.h"
#include "cal_ipc.h"
#include "cal_ipc_marshal.h"
#include "cal_client_ipc.h"
+#include "cal_client_handle.h"
typedef struct {
calendar_reminder_cb cb;
int cal_client_reminder_create_for_subscribe(void);
int cal_client_reminder_destroy_for_subscribe(void);
+int cal_client_recovery_for_change_subscription(void);
#endif /* __CAL_CLIENT_REMINDER_H__ */
*
*/
+ #include <unistd.h>
+
#include "calendar_types.h"
#include "cal_internal.h"
#include "cal_typedef.h"
#include "cal_client_handle.h"
#include "cal_client_ipc.h"
#include "cal_client_utils.h"
+#include "cal_client_reminder.h"
static void _cal_client_ipc_initialized_cb(void *user_data)
{
DBG("[Connection count:handle] (%d)", h->connection_count);
if (0 == *connection_count) { /* total connection */
+#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init(); /* for alarmmgr */
+#endif
ret = cal_inotify_init();
if (CALENDAR_ERROR_NONE != ret) {
ERR("cal_inotify_init() Fail(%d)", ret);
# Package Information for pkg-config
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}/bin
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
-Name: @CALSVC2@
-Description: @CALSVC2@ library
+Name: @CLIENT@
+Description: @CLIENT@ library
Version: @FULLVER@
Requires: glib-2.0 alarm-service capi-base-common
-Libs: -L${libdir} -l@CALSVC2@
-Cflags: -I${includedir}2
+Libs: -L${libdir} -l@CLIENT@
+Cflags: -I${includedir}/@CLIENT@
#include "cal_time.h"
#include "cal_vcalendar.h"
#include "cal_vcalendar_parse.h"
+#include "cal_utils.h"
/*
* LF | \n | 0x0A
return cal_strdup(p + 1);
}
- /* param start */
- int len_param = strlen(t[0]);
-
char **s = NULL;
s = g_strsplit(t[0], ";", -1);
if (NULL == s) {
- ERR("g_strsplit() failed");
+ ERR("g_strsplit() Fail");
g_strfreev(t);
return NULL;
}
/* param start */
char **s = NULL;
s = g_strsplit(p, ";", -1);
- RETVM_IF(NULL == s, p + strlen(p) - len_param, "g_strsplit() failed");
+ RETVM_IF(NULL == s, p + strlen(p) - len_param, "g_strsplit() Fail");
int count_param = g_strv_length(s);
DBG("count_param(%d)", count_param);
Name: calendar-service
Summary: DB library for calendar
-Version: 0.1.152
+Version: 0.1.153
Release: 1
Group: System/Libraries
License: Apache-2.0
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(icu-i18n)
-BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(contacts-service2)
BuildRequires: pkgconfig(pims-ipc)
-BuildRequires: pkgconfig(capi-appfw-package-manager)
BuildRequires: pkgconfig(accounts-svc)
-BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(contacts-service2)
+BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-appfw-package-manager)
+BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(libsmack)
%description
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DMAJORVER=${MAJORVER} \
- -DFULLVER=%{version}
+%cmake . -DBIN_INSTALL_DIR:PATH=%{_bindir} \
+ -DMAJORVER=${MAJORVER} \
+ -DFULLVER=%{version}
make %{?jobs:-j%jobs}
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server/db)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/ipc)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/server/db)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/schema)
-LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
-LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/server)
-SET(DAEMON calendar-serviced)
-SET(LIBNAME calendar-service-server)
+FILE(GLOB DAEMON_SRCS
+ ${CMAKE_SOURCE_DIR}/common/ipc/*.c
+ ${CMAKE_SOURCE_DIR}/common/*.c*
+ db/*.c
+ *.c)
-SET(LIBSRCS
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_alarm.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_attendee.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_calendar.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_event.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_allday.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_allday_extended.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_normal.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_instance_normal_extended.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_search.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_timezone.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_todo.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_updated_info.c
- ${CMAKE_SOURCE_DIR}/common/ipc/cal_ipc_marshal_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_calendar.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_event.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_todo.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_attendee.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_alarm.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_search.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_timezone.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_updated_info.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_normal.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_allday.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_normal_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_instance_allday_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_record_extended.c
- ${CMAKE_SOURCE_DIR}/common/cal_view.c
- ${CMAKE_SOURCE_DIR}/common/cal_filter.c
- ${CMAKE_SOURCE_DIR}/common/cal_query.c
- ${CMAKE_SOURCE_DIR}/common/cal_list.c
- ${CMAKE_SOURCE_DIR}/common/cal_time.cpp
- ${CMAKE_SOURCE_DIR}/common/cal_inotify.c
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar.c
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar_make.c
- ${CMAKE_SOURCE_DIR}/common/cal_vcalendar_parse.c
- ${CMAKE_SOURCE_DIR}/common/cal_mutex.c
- ${CMAKE_SOURCE_DIR}/common/cal_handle.c
- ${CMAKE_SOURCE_DIR}/common/cal_utils.c
- cal_access_control.c
- cal_server_service.c
- cal_server_ipc.c
- cal_server_ondemand.c
- db/cal_db.c
- db/cal_db_util.c
- db/cal_db_rrule.c
- db/cal_db_query.c
- db/cal_db_plugin_todo.c
- db/cal_db_plugin_search.c
- db/cal_db_plugin_calendar.c
- db/cal_db_plugin_calendar_helper.c
- db/cal_db_plugin_event.c
- db/cal_db_plugin_event_helper.c
- db/cal_db_plugin_alarm.c
- db/cal_db_plugin_alarm_helper.c
- db/cal_db_plugin_attendee.c
- db/cal_db_plugin_attendee_helper.c
- db/cal_db_plugin_timezone.c
- db/cal_db_plugin_timezone_helper.c
- db/cal_db_plugin_instance_normal.c
- db/cal_db_plugin_instance_normal_extended.c
- db/cal_db_plugin_instance_allday.c
- db/cal_db_plugin_instance_allday_extended.c
- db/cal_db_plugin_extended.c
- db/cal_db_plugin_extended_helper.c
- db/cal_db_instance.c
- db/cal_db_instance_helper.c
-)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(calserver_pkgs REQUIRED
- dlog
- pims-ipc
+pkg_check_modules(daemon_pkgs REQUIRED
+ glib-2.0
db-util
+ sqlite3
+ vconf
alarm-service
- capi-base-common
icu-i18n
+ contacts-service2
+ libtzplatform-config
+ capi-appfw-package-manager
+ pims-ipc
+ dlog
+ capi-base-common
accounts-svc
capi-appfw-application
- libtzplatform-config
- libsmack
-)
-
-FOREACH(flag ${calserver_pkgs_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-SET(calserver_pkgs_LDFLAGS "${pkgs_LDFLAGS} ${calserver_pkgs_LDFLAGS}")
+ libsmack)
+INCLUDE_DIRECTORIES(${daemon_pkgs_INCLUDE_DIRS})
+LINK_DIRECTORIES(${daemon_pkgs_LIBRARY_DIRS})
ADD_DEFINITIONS("-DCAL_IPC_SERVER")
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_LIBRARY(${LIBNAME} STATIC ${LIBSRCS})
-TARGET_LINK_LIBRARIES(${LIBNAME} ${calserver_pkgs_LDFLAGS})
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--hash-style=both -pie")
-#cmake_policy(SET CMP0002 OLD)
-ADD_EXECUTABLE(${DAEMON}
- cal_server.c
- cal_server_contacts.c
- cal_server_alarm.c
- cal_server_calendar_delete.c
- cal_server_reminder.c
- cal_server_schema.c
- cal_server_update.c
- )
+ADD_EXECUTABLE(${DAEMON} ${DAEMON_SRCS})
SET_TARGET_PROPERTIES(${DAEMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS})
-TARGET_LINK_LIBRARIES(${DAEMON} ${calserver_pkgs_LDFLAGS} ${LIBNAME} -pie)
+TARGET_LINK_LIBRARIES(${DAEMON} ${daemon_pkgs_LIBRARIES})
-INSTALL(TARGETS ${DAEMON} DESTINATION bin)
+INSTALL(TARGETS ${DAEMON} DESTINATION ${BIN_INSTALL_DIR})
void cal_access_control_reset(void); // reset read_list, write_list..
bool cal_access_control_have_write_permission(int book_id);
int cal_is_owner(int book_id);
+bool cal_access_control_have_permission(pims_ipc_h ipc, cal_permission_e permission);
+
#endif /* __CALENDAR_SVC_ACCESS_CONTROL_H__ */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#include <unistd.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include <glib-object.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <grp.h>
+#include <sys/param.h>
+#include <unistd.h>
#include <alarm.h>
#include <contacts.h>
#include <account.h>
#include "calendar.h"
-#include "cal_internal.h" // DBG
+#include "cal_typedef.h"
+#include "cal_internal.h"
#include "cal_ipc.h"
#include "cal_server_ipc.h"
#include "cal_inotify.h"
#include "cal_server_calendar_delete.h"
#include "cal_server_schema.h"
#include "cal_server_update.h"
+#include "cal_server_service.h"
#include "cal_access_control.h"
#include "cal_db_plugin_calendar_helper.h"
#include "cal_time.h"
int ret;
int on_contact = 0;
int try_count = 0;
+#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init();
+#endif
//loop = g_main_loop_new(NULL, FALSE);
}
cal_access_control_unset_client_info();
- calendar_disconnect();
+ cal_disconnect();
g_mutex_lock(&_cal_server_contacts_sync_mutex);
DBG("wait");
#include <stdlib.h>
#include <malloc.h>
#include <glib.h>
+#include <unistd.h>
+#include <sys/types.h>
#include <pims-ipc-data.h>
#include <pims-ipc-svc.h>
int cal_server_ipc_init(void)
{
+#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init();
+#endif
char sock_file[CAL_STR_MIDDLE_LEN] = {0};
snprintf(sock_file, sizeof(sock_file), CAL_SOCK_PATH"/.%s", getuid(), CAL_IPC_SERVICE);
#include "cal_internal.h"
#include "cal_typedef.h"
-#include "cal_db_util.h"
#include "cal_view.h"
-#include "cal_mutex.h"
+#include "cal_db_util.h"
#include "cal_utils.h"
#include "cal_mutex.h"
+#include "cal_inotify.h"
static int cal_total_connection = 0;
static TLS int cal_thread_connection = 0;
cal_mutex_lock(CAL_MUTEX_CONNECTION);
if (0 == cal_total_connection) {
+#if !GLIB_CHECK_VERSION(2,35,0)
g_type_init(); // added for alarmmgr
+#endif
cal_view_initialize();
ret = cal_inotify_init();
if (CALENDAR_ERROR_NONE != ret) {
#include "calendar_db.h"
#include "calendar_types.h"
-
#include "cal_internal.h"
#include "cal_typedef.h"
#include "cal_view.h"
#include "cal_time.h"
#include "cal_record.h"
-
-#include "cal_db_util.h"
-#include "cal_db.h"
#include "cal_db_instance_helper.h"
+#include "cal_db.h"
+#include "cal_db_util.h"
+#include "cal_db_plugin_timezone_helper.h"
#define ms2sec(ms) (long long int)(ms / 1000.0)
#define sec2ms(s) (s * 1000.0)
#include <stdbool.h>
#include <db-util.h>
#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "cal_internal.h"
#include "cal_typedef.h"