Add contact feature
[platform/core/pim/contacts-service.git] / common / ctsvc_vcard.c
index 2d3490e..34c3628 100644 (file)
@@ -1920,6 +1920,7 @@ static int __ctsvc_vcard_make_from_my_profile(ctsvc_my_profile_s *my_profile, ch
 
 EXPORT_API int contacts_vcard_make_from_contact(contacts_record_h record, char **vcard_stream)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        ctsvc_contact_s *contact;
        RETV_IF(NULL == vcard_stream, CONTACTS_ERROR_INVALID_PARAMETER);
        *vcard_stream = NULL;
@@ -1936,6 +1937,7 @@ EXPORT_API int contacts_vcard_make_from_contact(contacts_record_h record, char *
 
 EXPORT_API int contacts_vcard_make_from_my_profile(contacts_record_h record, char **vcard_stream)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        ctsvc_my_profile_s *my_profile;
        RETV_IF(NULL == vcard_stream, CONTACTS_ERROR_INVALID_PARAMETER);
        *vcard_stream = NULL;
@@ -2132,6 +2134,7 @@ static int __ctsvc_vcard_make_from_person(ctsvc_person_s *person, ctsvc_list_s *
 #ifdef _CONTACTS_IPC_CLIENT
 EXPORT_API int contacts_vcard_make_from_person(contacts_record_h record, char **vcard_stream)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        int ret;
        ctsvc_person_s *person;
        contacts_query_h query = NULL;
@@ -4432,6 +4435,7 @@ static const char* __contacts_vcard_parse_get_vcard_object(const char *cursor, G
 
 EXPORT_API int contacts_vcard_parse_to_contacts(const char *vcard_stream, contacts_list_h *out_contacts)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        int ret;
        contacts_record_h record;
        contacts_list_h list = NULL;
@@ -4489,6 +4493,7 @@ static int  _ctsvc_safe_add(unsigned int *total, unsigned int value)
 EXPORT_API int contacts_vcard_parse_to_contact_foreach(const char *vcard_file_name,
                contacts_vcard_parse_cb cb, void *data)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        contacts_record_h record;
        FILE *file;
        unsigned int buf_size, len;
@@ -4600,6 +4605,7 @@ EXPORT_API int contacts_vcard_parse_to_contact_foreach(const char *vcard_file_na
 
 EXPORT_API int contacts_vcard_get_entity_count(const char *vcard_file_name, int *count)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
        FILE *file;
        int cnt;
        char line[1024] = {0};
@@ -4625,6 +4631,7 @@ EXPORT_API int contacts_vcard_get_entity_count(const char *vcard_file_name, int
 
 EXPORT_API int contacts_vcard_get_limit_size_of_photo(unsigned int *limit_size)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
 #ifdef _CONTACTS_IPC_CLIENT
        int ret;
        bool result = false;
@@ -4644,6 +4651,7 @@ EXPORT_API int contacts_vcard_get_limit_size_of_photo(unsigned int *limit_size)
 
 EXPORT_API int contacts_vcard_set_limit_size_of_photo(unsigned int limit_size)
 {
+       CHECK_CONTACT_SUPPORTED(CONTACT_FEATURE);
 #ifdef _CONTACTS_IPC_CLIENT
        int ret;
        bool result = false;