From: Gukhwan Cho Date: Fri, 3 Jul 2015 14:58:39 +0000 (+0900) Subject: make data/contacts-svc/img/contact dir X-Git-Tag: submit/tizen/20150704.054825~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cef453618e42b8ff3dcbb4d9c6f0d2aa987f2d0a;p=platform%2Fcore%2Fpim%2Fcontacts-service.git make data/contacts-svc/img/contact dir Change-Id: Idbce2544d3da3ef892c4b967a0e63313c285db53 Signed-off-by: Gukhwan Cho --- diff --git a/common/ctsvc_notify.h b/common/ctsvc_notify.h index 70ef915..38f8516 100644 --- a/common/ctsvc_notify.h +++ b/common/ctsvc_notify.h @@ -28,6 +28,8 @@ #define CTS_MY_IMAGE_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img/my") #define CTS_GROUP_IMAGE_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img/group") #define CTS_LOGO_IMAGE_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img/logo") +#define CTSVC_CONTACT_IMG_FULL_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img/contact") + #define CTSVC_NOTI_ADDRESSBOOK_CHANGED tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/.CONTACTS_SVC_AB_CHANGED") #define CTSVC_NOTI_GROUP_CHANGED tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/.CONTACTS_SVC_GROUP_CHANGED") #define CTSVC_NOTI_PERSON_CHANGED tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/.CONTACTS_SVC_PERSON_CHANGED") diff --git a/common/ctsvc_record_result.c b/common/ctsvc_record_result.c index 271d5de..590f00a 100644 --- a/common/ctsvc_record_result.c +++ b/common/ctsvc_record_result.c @@ -21,6 +21,7 @@ #include "ctsvc_internal.h" #include "ctsvc_record.h" #include "ctsvc_view.h" +#include "ctsvc_notify.h" #ifdef _CONTACTS_IPC_SERVER #ifdef ENABLE_SIM_FEATURE diff --git a/common/ctsvc_struct.h b/common/ctsvc_struct.h index dc41d0c..93d8faf 100644 --- a/common/ctsvc_struct.h +++ b/common/ctsvc_struct.h @@ -36,8 +36,6 @@ #define CTSVC_PATH_MAX_LEN 1024 #define CTSVC_IMG_FULL_PATH_SIZE_MAX 1024 // current max length file path is 256 -#define CTSVC_IMG_FULL_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img") -#define CTSVC_CONTACT_IMG_FULL_LOCATION tzplatform_mkpath(TZ_USER_DATA,"contacts-svc/img/contact") #define SAFE_STR(src) (src)?src:"" #define SAFE_STRDUP(src) (src)?strdup(src):NULL diff --git a/native/ctsvc_db_plugin_contact.c b/native/ctsvc_db_plugin_contact.c index 723fdfb..62d0259 100644 --- a/native/ctsvc_db_plugin_contact.c +++ b/native/ctsvc_db_plugin_contact.c @@ -39,6 +39,8 @@ #include "ctsvc_localize.h" #include "ctsvc_localize_utils.h" #include "ctsvc_person.h" +#include "ctsvc_notify.h" + #ifdef ENABLE_LOG_FEATURE #include "ctsvc_phonelog.h" #endif // ENABLE_LOG_FEATURE diff --git a/native/ctsvc_db_plugin_contact_helper.c b/native/ctsvc_db_plugin_contact_helper.c index 3afc01e..568b1be 100644 --- a/native/ctsvc_db_plugin_contact_helper.c +++ b/native/ctsvc_db_plugin_contact_helper.c @@ -37,6 +37,7 @@ #include "ctsvc_localize_utils.h" #include "ctsvc_localize_ch.h" #include "ctsvc_notification.h" +#include "ctsvc_notify.h" #include "ctsvc_db_access_control.h" #include "ctsvc_db_plugin_contact_helper.h" diff --git a/native/ctsvc_db_plugin_image_helper.c b/native/ctsvc_db_plugin_image_helper.c index 2905f6f..c4bcc2a 100644 --- a/native/ctsvc_db_plugin_image_helper.c +++ b/native/ctsvc_db_plugin_image_helper.c @@ -28,6 +28,7 @@ #include "ctsvc_record.h" #include "ctsvc_notification.h" #include "ctsvc_db_access_control.h" +#include "ctsvc_notify.h" int ctsvc_db_image_get_value_from_stmt(cts_stmt stmt, contacts_record_h *record, int start_count) { diff --git a/native/ctsvc_db_plugin_my_profile.c b/native/ctsvc_db_plugin_my_profile.c index fbbefe6..dd06d0a 100644 --- a/native/ctsvc_db_plugin_my_profile.c +++ b/native/ctsvc_db_plugin_my_profile.c @@ -36,6 +36,7 @@ #include "ctsvc_notification.h" #include "ctsvc_localize_utils.h" #include "ctsvc_db_access_control.h" +#include "ctsvc_notify.h" #include "ctsvc_db_plugin_contact_helper.h" diff --git a/native/ctsvc_db_plugin_person.c b/native/ctsvc_db_plugin_person.c index b865620..4dce399 100644 --- a/native/ctsvc_db_plugin_person.c +++ b/native/ctsvc_db_plugin_person.c @@ -30,6 +30,7 @@ #include "ctsvc_record.h" #include "ctsvc_normalize.h" #include "ctsvc_notification.h" +#include "ctsvc_notify.h" #ifdef _CONTACTS_IPC_SERVER #include "ctsvc_server_change_subject.h" diff --git a/native/ctsvc_db_plugin_person_helper.c b/native/ctsvc_db_plugin_person_helper.c index 35ec38c..4073f0e 100755 --- a/native/ctsvc_db_plugin_person_helper.c +++ b/native/ctsvc_db_plugin_person_helper.c @@ -33,6 +33,7 @@ #include "ctsvc_db_query.h" #include "ctsvc_record.h" #include "ctsvc_notification.h" +#include "ctsvc_notify.h" #ifdef _CONTACTS_IPC_SERVER #include "ctsvc_server_change_subject.h" diff --git a/native/ctsvc_db_plugin_simple_contact.c b/native/ctsvc_db_plugin_simple_contact.c index 7f1ea94..6cf8d87 100644 --- a/native/ctsvc_db_plugin_simple_contact.c +++ b/native/ctsvc_db_plugin_simple_contact.c @@ -32,6 +32,7 @@ #include "ctsvc_db_query.h" #include "ctsvc_notification.h" #include "ctsvc_db_access_control.h" +#include "ctsvc_notify.h" static int __ctsvc_db_simple_contact_get_record( int id, contacts_record_h* out_record ); static int __ctsvc_db_simple_contact_get_all_records( int offset, int limit, contacts_list_h* out_list ); diff --git a/native/ctsvc_db_plugin_speeddial.c b/native/ctsvc_db_plugin_speeddial.c index d16b082..3028ddc 100644 --- a/native/ctsvc_db_plugin_speeddial.c +++ b/native/ctsvc_db_plugin_speeddial.c @@ -27,6 +27,7 @@ #include "ctsvc_db_query.h" #include "ctsvc_record.h" #include "ctsvc_notification.h" +#include "ctsvc_notify.h" static int __ctsvc_db_speeddial_insert_record( contacts_record_h record, int *id ); static int __ctsvc_db_speeddial_get_record( int id, contacts_record_h* out_record ); diff --git a/native/ctsvc_db_query.c b/native/ctsvc_db_query.c index a364d75..4e4c714 100644 --- a/native/ctsvc_db_query.c +++ b/native/ctsvc_db_query.c @@ -40,6 +40,7 @@ #include "ctsvc_localize.h" #include "ctsvc_localize_utils.h" #include "ctsvc_setting.h" +#include "ctsvc_notify.h" #include "ctsvc_db_access_control.h" #include "ctsvc_db_plugin_person_helper.h" diff --git a/native/ctsvc_person.c b/native/ctsvc_person.c index c8e6c3c..6f55514 100644 --- a/native/ctsvc_person.c +++ b/native/ctsvc_person.c @@ -27,6 +27,7 @@ #include "ctsvc_db_plugin_person_helper.h" #include "ctsvc_db_plugin_contact_helper.h" #include "ctsvc_db_access_control.h" +#include "ctsvc_notify.h" #ifdef ENABLE_LOG_FEATURE #include "ctsvc_phonelog.h" diff --git a/native/ctsvc_utils.c b/native/ctsvc_utils.c index ebffbc0..cfd27b0 100644 --- a/native/ctsvc_utils.c +++ b/native/ctsvc_utils.c @@ -43,6 +43,7 @@ #include "ctsvc_localize.h" #include "ctsvc_localize_utils.h" #include "ctsvc_setting.h" +#include "ctsvc_notify.h" #ifdef _CONTACTS_IPC_SERVER #include "ctsvc_server_change_subject.h" @@ -235,7 +236,7 @@ static inline bool ctsvc_check_available_image_space(void){ int ret; struct statfs buf; long long size; - ret = statfs(CTSVC_IMG_FULL_LOCATION, &buf); + ret = statfs(CTSVC_NOTI_IMG_REPERTORY, &buf); RETVM_IF(ret!=0, false, "statfs Failed(%d)", ret); diff --git a/server/ctsvc_server.c b/server/ctsvc_server.c index 7b8fa82..343be30 100755 --- a/server/ctsvc_server.c +++ b/server/ctsvc_server.c @@ -196,6 +196,7 @@ int main(int argc, char *argv[]) ctsvc_create_rep_set_permission(CTS_MY_IMAGE_LOCATION, 0770); ctsvc_create_rep_set_permission(CTS_GROUP_IMAGE_LOCATION, 0770); ctsvc_create_rep_set_permission(CTS_LOGO_IMAGE_LOCATION, 0770); + ctsvc_create_rep_set_permission(CTSVC_CONTACT_IMG_FULL_LOCATION, 0770); ctsvc_create_file_set_permission(CTSVC_NOTI_ADDRESSBOOK_CHANGED, 0660); ctsvc_create_file_set_permission(CTSVC_NOTI_GROUP_CHANGED, 0660);