Applied Tizen coding rule 66/63866/1
authorYounho Park <younho.park@samsung.com>
Mon, 28 Mar 2016 07:25:02 +0000 (16:25 +0900)
committerYounho Park <younho.park@samsung.com>
Mon, 28 Mar 2016 07:25:02 +0000 (16:25 +0900)
Change-Id: I4b4387f1c8b5e68beaf827aec7e46db6d46d6ab4
Signed-off-by: Younho Park <younho.park@samsung.com>
51 files changed:
adaptor/auth-adaptor/auth-adaptor-log.h
adaptor/auth-adaptor/auth-adaptor.h
adaptor/contact-adaptor/contact-adaptor-log.h
adaptor/contact-adaptor/contact-adaptor.h
adaptor/message-adaptor/message-adaptor-log.h
adaptor/message-adaptor/message-adaptor.h
adaptor/push-adaptor/push-adaptor-log.h
adaptor/push-adaptor/push-adaptor.h
adaptor/shop-adaptor/shop-adaptor-log.h
adaptor/shop-adaptor/shop-adaptor.h
adaptor/storage-adaptor/storage-adaptor-log.h
adaptor/storage-adaptor/storage-adaptor.h
api/client/include/dbus/dbus_client.h
api/client/include/dbus/dbus_client_contact.h
api/client/include/dbus/dbus_client_layer.h
api/client/include/dbus/dbus_client_storage.h
api/client/include/private/service-adaptor-client-auth.h
api/client/include/private/service-adaptor-client-contact.h
api/client/include/private/service-adaptor-client-message.h
api/client/include/private/service-adaptor-client-push.h
api/client/include/private/service-adaptor-client-shop.h
api/client/include/private/service-adaptor-client-storage.h
api/client/include/private/service-adaptor-client.h
api/client/include/service_adaptor_client_log.h
api/client/include/service_adaptor_client_private.h
api/client/include/service_adaptor_client_storage_internal.h
api/client/include/service_adaptor_client_type.h
api/client/include/util/service_adaptor_client_util.h
api/provider/sal_provider_service.h
common/plugin_config/libservice_plugin_log.h
common/plugin_config/pluginConfig.h
common/plugin_config/pluginConfigLog.h
common/plugin_config/pluginConfigTypes.h
common/plugin_config/plugin_message.h
doc/service_adaptor_doc.h
doc/service_adaptor_plugin_doc.h
doc/service_adaptor_storage_doc.h
include/service_adaptor_client.h
include/service_adaptor_client_plugin.h
include/service_adaptor_client_storage.h
server/inc/dbus/dbus-ipc.h
server/inc/dbus/dbus-push-adaptor.h
server/inc/dbus/dbus-server.h
server/inc/dbus/dbus-storage-adaptor.h
server/inc/dbus/dbus-util.h
server/inc/service-adaptor-log.h
server/inc/service-adaptor-plugin.h
server/inc/service-adaptor-push.h
server/inc/service-adaptor-type.h
server/inc/service-adaptor.h
server/inc/util/service_file_manager.h

index eef4d266ad73808634a0e5b56a70abe91c4183a1..33a1d53a86bdb1d59e2d8a73b96505077fca25a5 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define auth_adaptor_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, auth_adaptor_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, auth_adaptor_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,auth_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,auth_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,auth_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define auth_adaptor_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, auth_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 #define plugin_req_enter()                     do { \
                auth_adaptor_info("[ENTER] plugin API call -)) -)) -)) -)) -)) -)) -)) -)) -)) -))"); \
index 2db99f8e19a78e35d93938d2916bf34f3449bf04..15ad06ae817fc4f30015f48152135736d482eccd 100644 (file)
@@ -32,8 +32,7 @@ extern "C"
 /**
  * @brief Enumerations of error code for Auth Adaptor
  */
-typedef enum auth_error_code_e
-{
+typedef enum auth_error_code_e {
        AUTH_ADAPTOR_ERROR_NONE                      = 0,
        AUTH_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        AUTH_ADAPTOR_ERROR_INIT                      = 2,
@@ -62,42 +61,41 @@ typedef enum auth_error_code_e
 /**
  * @brief Enumerations of error code for Auth Plugin Internal Error
  */
-typedef enum _auth_plugin_internal_error_code_e
-{
-        AUTH_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
-        AUTH_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
-        AUTH_PLUGIN_ERROR_HTTP_FORBIDDEN             = 403,
-        AUTH_PLUGIN_ERROR_HTTP_NOT_FOUND             = 404,
-        AUTH_PLUGIN_ERROR_HTTP_METHOD_NOT_ALLOWED    = 405,
-        AUTH_PLUGIN_ERROR_HTTP_BAD_GATEWAY           = 502,
-        AUTH_PLUGIN_ERROR_HTTP_SERVICE_UNAVAILBLE    = 503,
-        AUTH_PLUGIN_ERROR_HTTP_INSUFFICIENT_AUTH     = 507,
-        AUTH_PLUGIN_ERROR_HTTP_ETC                   = 598,
-        AUTH_PLUGIN_ERROR_HTTP_UNKNOWN               = 599,
-
-        AUTH_PLUGIN_ERROR_CURL_COULDNT_CONNECT       = 601,
-        AUTH_PLUGIN_ERROR_CURL_TIMEOUT               = 602,
-        AUTH_PLUGIN_ERROR_CURL_ETC                   = 698,
-        AUTH_PLUGIN_ERROR_CURL_UNKNOWN               = 699,
-
-        AUTH_PLUGIN_ERROR_FILE_OPEN_FAILED           = 701,
-        AUTH_PLUGIN_ERROR_FILE_NOT_EXIST             = 702,
-        AUTH_PLUGIN_ERROR_FILE_ETC                   = 798,
-        AUTH_PLUGIN_ERROR_FILE_UNKNOWN               = 799,
-
-        AUTH_PLUGIN_ERROR_MEMORY_ALLOCATION_FAILED   = 801,
-        AUTH_PLUGIN_ERROR_MEMORY_ETC                 = 898,
-        AUTH_PLUGIN_ERROR_MEMORY_UNKNOWN             = 899,
-
-        AUTH_PLUGIN_ERROR_THREAD_CREATE_FAILED       = 901,
-        AUTH_PLUGIN_ERROR_THREAD_STOPPED             = 902,
-        AUTH_PLUGIN_ERROR_THREAD_ETC                 = 908,
-        AUTH_PLUGIN_ERROR_THREAD_UNNOWN              = 909,
+typedef enum _auth_plugin_internal_error_code_e {
+       AUTH_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
+       AUTH_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
+       AUTH_PLUGIN_ERROR_HTTP_FORBIDDEN             = 403,
+       AUTH_PLUGIN_ERROR_HTTP_NOT_FOUND             = 404,
+       AUTH_PLUGIN_ERROR_HTTP_METHOD_NOT_ALLOWED    = 405,
+       AUTH_PLUGIN_ERROR_HTTP_BAD_GATEWAY           = 502,
+       AUTH_PLUGIN_ERROR_HTTP_SERVICE_UNAVAILBLE    = 503,
+       AUTH_PLUGIN_ERROR_HTTP_INSUFFICIENT_AUTH     = 507,
+       AUTH_PLUGIN_ERROR_HTTP_ETC                   = 598,
+       AUTH_PLUGIN_ERROR_HTTP_UNKNOWN               = 599,
+
+       AUTH_PLUGIN_ERROR_CURL_COULDNT_CONNECT       = 601,
+       AUTH_PLUGIN_ERROR_CURL_TIMEOUT               = 602,
+       AUTH_PLUGIN_ERROR_CURL_ETC                   = 698,
+       AUTH_PLUGIN_ERROR_CURL_UNKNOWN               = 699,
+
+       AUTH_PLUGIN_ERROR_FILE_OPEN_FAILED           = 701,
+       AUTH_PLUGIN_ERROR_FILE_NOT_EXIST             = 702,
+       AUTH_PLUGIN_ERROR_FILE_ETC                   = 798,
+       AUTH_PLUGIN_ERROR_FILE_UNKNOWN               = 799,
+
+       AUTH_PLUGIN_ERROR_MEMORY_ALLOCATION_FAILED   = 801,
+       AUTH_PLUGIN_ERROR_MEMORY_ETC                 = 898,
+       AUTH_PLUGIN_ERROR_MEMORY_UNKNOWN             = 899,
+
+       AUTH_PLUGIN_ERROR_THREAD_CREATE_FAILED       = 901,
+       AUTH_PLUGIN_ERROR_THREAD_STOPPED             = 902,
+       AUTH_PLUGIN_ERROR_THREAD_ETC                 = 908,
+       AUTH_PLUGIN_ERROR_THREAD_UNNOWN              = 909,
 
        AUTH_PLUGIN_ERROR_CALLBACK_TIME_OUT          = 997,
-        AUTH_PLUGIN_ERROR_ETC                        = 998,
-        AUTH_PLUGIN_ERROR_UNKNOWN                    = 999,
-}auth_plugin_internal_error_code_e;
+       AUTH_PLUGIN_ERROR_ETC                        = 998,
+       AUTH_PLUGIN_ERROR_UNKNOWN                    = 999,
+} auth_plugin_internal_error_code_e;
 
 /**
 * @brief The handle for Auth Plugin
@@ -112,43 +110,41 @@ typedef struct auth_adaptor_s *auth_adaptor_h;
 /**
 * @brief Describes infromation about Plugin Context
 */
-typedef struct auth_adaptor_plugin_context_s
-{
-       // Context variables
+typedef struct auth_adaptor_plugin_context_s {
+       /* Context variables */
        int context_id;
        auth_adaptor_plugin_h plugin_handle;
 
-       // User define (input by service-adaptor)
-        char    *user_id;
-        char    *user_password;
-        char    *app_id;
-        char    *app_secret;
+       /* User define (input by service-adaptor) */
+       char    *user_id;
+       char    *user_password;
+       char    *app_id;
+       char    *app_secret;
        char    *service_name;
 
-       // Plugin define (input by plugin)
-        char    *plugin_uri;   // mandatory (package id)
-       void    *plugin_data;   // optional
+       /* Plugin define (input by plugin) */
+       char    *plugin_uri;    /* mandatory (package id) */
+       void    *plugin_data;   /* optional */
 
-       // Plugin define (input by server response after autholization)
-        char    *access_token;
+       /* Plugin define (input by server response after autholization) */
+       char    *access_token;
        char    *refresh_token;
        char    *uid;
 
-       // For product feature
+       /* For product feature */
        char    *msisdn;
        char    *imsi;
-        char    *plugin_name;
-//        char    *cluster_name;
+       char    *plugin_name;
+       /* char    *cluster_name; */
 } auth_adaptor_plugin_context_t;
 typedef struct auth_adaptor_plugin_context_s *auth_adaptor_plugin_context_h;
 
 /**
 * @brief Describes infromation about error code from plugin internal
 */
-typedef struct auth_adaptor_error_code_s
-{
-        int64_t code;
-        char    *msg;
+typedef struct auth_adaptor_error_code_s {
+       int64_t code;
+       char    *msg;
 } auth_adaptor_error_code_t;
 /**
 * @brief The handle for error code
@@ -163,9 +159,8 @@ typedef struct auth_adaptor_plugin_listener_s *auth_adaptor_plugin_listener_h;
 /**
 * @brief Describes infromation about Plugin Handle
 */
-typedef struct auth_adaptor_plugin_handle_s
-{
-       // Mandatory functions to handle plugin in adaptor
+typedef struct auth_adaptor_plugin_handle_s {
+       /* Mandatory functions to handle plugin in adaptor */
        auth_error_code_t (*create_context)(auth_adaptor_plugin_context_h *context,
                                                        const char *user_id,
                                                        const char *user_password,
@@ -177,32 +172,32 @@ typedef struct auth_adaptor_plugin_handle_s
        auth_error_code_t (*destroy_handle)(struct auth_adaptor_plugin_handle_s *handle);
        auth_error_code_t (*set_listener)(auth_adaptor_plugin_listener_h listener);
        auth_error_code_t (*unset_listener)(void);
-       // Mandatory end
+       /* Mandatory end */
 
-       // Optional
-        auth_error_code_t (*is_auth)(auth_adaptor_plugin_context_h context,
+       /* Optional */
+       auth_error_code_t (*is_auth)(auth_adaptor_plugin_context_h context,
                                                        void *request,
                                                        int *is_auth,
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*join)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*join)(auth_adaptor_plugin_context_h context,
                                                        const char *device_id,
                                                        void *request,
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*login)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*login)(auth_adaptor_plugin_context_h context,
                                                        void *request,
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*refresh_access_token)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*refresh_access_token)(auth_adaptor_plugin_context_h context,
                                                        void *request,
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*set_service_status)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*set_service_status)(auth_adaptor_plugin_context_h context,
                                                        const int service_id,
                                                        const int status,
                                                        void *request,
@@ -215,14 +210,14 @@ typedef struct auth_adaptor_plugin_handle_s
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*get_service_status)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*get_service_status)(auth_adaptor_plugin_context_h context,
                                                        const int service_id,
                                                        void *request,
                                                        int *status,
                                                        auth_adaptor_error_code_h *error,
                                                        void *response);
 
-        auth_error_code_t (*get_service_policy)(auth_adaptor_plugin_context_h context,
+       auth_error_code_t (*get_service_policy)(auth_adaptor_plugin_context_h context,
                                                        const int service_id,
                                                        void *request,
                                                        char **default_status,
@@ -245,11 +240,11 @@ typedef struct auth_adaptor_plugin_handle_s
                                                        unsigned char **res_bundle_raw,
                                                        int *res_len,
                                                        auth_adaptor_error_code_h *error);
-       // Optional end
+       /* Optional end */
 
-       // Mandatory
-       char *plugin_uri;       // package id
-       // Mandatory end
+       /* Mandatory */
+       char *plugin_uri;       /* package id */
+       /* Mandatory end */
 
 } auth_adaptor_plugin_handle_t;
 typedef struct auth_adaptor_plugin_handle_s *auth_adaptor_plugin_handle_h;
@@ -269,8 +264,7 @@ typedef void (*auth_adaptor_service_login_reply_cb)(char *imsi,
 /**
 * @brief Describes infromation about Callback Listener (referenced by Service Adaptor)
 */
-typedef struct auth_adaptor_listener_s
-{
+typedef struct auth_adaptor_listener_s {
 /*
        void (*login_reply)(char *imsi,
                                                        char *plugin_uri,
@@ -308,8 +302,7 @@ typedef void (*auth_adaptor_plugin_login_reply_cb)(auth_adaptor_plugin_context_h
 /**
 * @brief Describes infromation about Callback Listener (referenced by Auth Plugin)
 */
-typedef struct auth_adaptor_plugin_listener_s
-{
+typedef struct auth_adaptor_plugin_listener_s {
        /*
        auth_adaptor_plugin_login_reply_cb              auth_adaptor_login_reply;
        */
@@ -323,7 +316,7 @@ int auth_adaptor_load_plugin(auth_adaptor_h adaptor,
                                                const char *plugin_path);
 
 
-// For 3rd party plugin packages
+/* For 3rd party plugin packages */
 EXPORT_API
 int auth_adaptor_load_plugin_from_package(auth_adaptor_h adaptor,
                                                const char *package_id,
@@ -419,9 +412,9 @@ auth_adaptor_plugin_h auth_adaptor_get_plugin_by_name(auth_adaptor_h adaptor,
 EXPORT_API
 GList *auth_adaptor_get_plugins(auth_adaptor_h adaptor);
 
-////////////////////////////////////////////////////////////
-// Adaptor get Element Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor get Element Functions                          */
+/**********************************************************/
 
 /*
  * @brief      Get Access token allocated by 'strdup'(Use after 'auth_adaptor_login' function)
@@ -444,9 +437,9 @@ char *auth_adaptor_get_uid_dup(auth_adaptor_plugin_context_h context);
 EXPORT_API
 char *auth_adaptor_get_msisdn_dup(auth_adaptor_plugin_context_h context);
 
-////////////////////////////////////////////////////////////
-// Adaptor Plugin call Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor Plugin call Functions                          */
+/**********************************************************/
 
 /**
 * @brief Check Account Registration [Sync API]
index 6a93541b68b49e1538f6990eb8f89866487b3d4e..31161baee6fe99a192a8310f537bb4616501feb3 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define contact_adaptor_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, contact_adaptor_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, contact_adaptor_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,contact_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,contact_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,contact_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define contact_adaptor_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, contact_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 #define plugin_req_enter()                     do { \
                contact_adaptor_info("[ENTER] plugin API call -)) -)) -)) -)) -)) -)) -)) -)) -)) -))"); \
index 8d23f9b5e66f36937ba8d7261b101a9e2a27afb9..9382efc9a3786d2f1f5c68bee30aede7a680ca17 100644 (file)
 /**
 * @brief Contact Adaptor error code
 */
-typedef enum contact_error_code_e
-{
+typedef enum contact_error_code_e {
        CONTACT_ADAPTOR_ERROR_NONE                     =  0,
        CONTACT_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
-        CONTACT_ADAPTOR_ERROR_INIT                      = 2,
-        CONTACT_ADAPTOR_ERROR_DEINIT                    = 3,
-        CONTACT_ADAPTOR_ERROR_CREATE                    = 4,
-        CONTACT_ADAPTOR_ERROR_DESTROY                   = 5,
-        CONTACT_ADAPTOR_ERROR_START                     = 6,
-        CONTACT_ADAPTOR_ERROR_STOP                      = 7,
-        CONTACT_ADAPTOR_ERROR_CONNECT                   = 8,
-        CONTACT_ADAPTOR_ERROR_DISCONNECT                = 9,
-        CONTACT_ADAPTOR_ERROR_NOT_FOUND                 = 10,
-        CONTACT_ADAPTOR_ERROR_CORRUPTED                 = 11,
-        CONTACT_ADAPTOR_ERROR_UNSUPPORTED               = 12,
-        CONTACT_ADAPTOR_ERROR_INVALID_HANDLE            = 13,
-        CONTACT_ADAPTOR_ERROR_INVALID_ARGUMENT          = 14,
-        CONTACT_ADAPTOR_ERROR_INVALID_ARGUMENT_TYPE     = 15,
-        CONTACT_ADAPTOR_ERROR_NOT_AUTHORIZED            = 16,
-        CONTACT_ADAPTOR_ERROR_ADAPTOR_INTERNAL          = 17,
-        CONTACT_ADAPTOR_ERROR_PLUGIN_INTERNAL           = 18,
-        CONTACT_ADAPTOR_ERROR_SERVER_INTERNAL           = 19,
-        CONTACT_ADAPTOR_ERROR_DBUS                      = 20,
-        CONTACT_ADAPTOR_ERROR_CALLBACK_TIME_OUT         = 21,
+       CONTACT_ADAPTOR_ERROR_INIT                      = 2,
+       CONTACT_ADAPTOR_ERROR_DEINIT                    = 3,
+       CONTACT_ADAPTOR_ERROR_CREATE                    = 4,
+       CONTACT_ADAPTOR_ERROR_DESTROY                   = 5,
+       CONTACT_ADAPTOR_ERROR_START                     = 6,
+       CONTACT_ADAPTOR_ERROR_STOP                      = 7,
+       CONTACT_ADAPTOR_ERROR_CONNECT                   = 8,
+       CONTACT_ADAPTOR_ERROR_DISCONNECT                = 9,
+       CONTACT_ADAPTOR_ERROR_NOT_FOUND                 = 10,
+       CONTACT_ADAPTOR_ERROR_CORRUPTED                 = 11,
+       CONTACT_ADAPTOR_ERROR_UNSUPPORTED               = 12,
+       CONTACT_ADAPTOR_ERROR_INVALID_HANDLE            = 13,
+       CONTACT_ADAPTOR_ERROR_INVALID_ARGUMENT          = 14,
+       CONTACT_ADAPTOR_ERROR_INVALID_ARGUMENT_TYPE     = 15,
+       CONTACT_ADAPTOR_ERROR_NOT_AUTHORIZED            = 16,
+       CONTACT_ADAPTOR_ERROR_ADAPTOR_INTERNAL          = 17,
+       CONTACT_ADAPTOR_ERROR_PLUGIN_INTERNAL           = 18,
+       CONTACT_ADAPTOR_ERROR_SERVER_INTERNAL           = 19,
+       CONTACT_ADAPTOR_ERROR_DBUS                      = 20,
+       CONTACT_ADAPTOR_ERROR_CALLBACK_TIME_OUT         = 21,
        CONTACT_ADAPTOR_ERROR_MAX
 } contact_error_code_t;
 
 
-typedef enum _contact_plugin_internal_error_code_e
-{
+typedef enum _contact_plugin_internal_error_code_e {
        CONTACT_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
        CONTACT_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
        CONTACT_PLUGIN_ERROR_HTTP_FORBIDDEN             = 403,
@@ -90,13 +88,12 @@ typedef struct contact_adaptor_s *contact_adaptor_h;
 /**
 * @brief Contact Adaptor plugin context structure
 */
-typedef struct contact_adaptor_plugin_context_s
-{
+typedef struct contact_adaptor_plugin_context_s {
        char    *duid;          /**< header: access control >*/
        char    *access_token;  /**< header: access control >*/
        void    *plugin_info;   /**< plugin's own context >*/
 
-       // Adaptor define
+       /* Adaptor define */
        char    *plugin_uri;
        char    *service_name;
 
@@ -106,8 +103,7 @@ typedef struct contact_adaptor_plugin_context_s *contact_adaptor_plugin_context_
 /**
 * @brief Contact Adaptor error code
 */
-typedef struct contact_adaptor_error_code_s
-{
+typedef struct contact_adaptor_error_code_s {
        int64_t code;
        char    *msg;
 
@@ -117,8 +113,7 @@ typedef struct contact_adaptor_error_code_s *contact_adaptor_error_code_h;
 /**
 * @brief Contact Adaptor contact API information request format
 */
-typedef struct contact_adaptor_contact_info_req_s
-{
+typedef struct contact_adaptor_contact_info_req_s {
        char    *tp;    /**< mandatory >*/
        char    *id;    /**< mandatory >*/
        char    *pn;    /**< mandatory >*/
@@ -132,8 +127,7 @@ typedef struct contact_adaptor_contact_info_req_s *contact_adaptor_contact_info_
 /**
 * @brief Contact Adaptor contact API request format
 */
-typedef struct contact_adaptor_contact_req_s
-{
+typedef struct contact_adaptor_contact_req_s {
        long long int                           tt;
        contact_adaptor_contact_info_req_h      *cts;
        unsigned int                            cts_len;
@@ -141,16 +135,14 @@ typedef struct contact_adaptor_contact_req_s
 } contact_adaptor_contact_req_t;
 typedef struct contact_adaptor_contact_req_s *contact_adaptor_contact_req_h;
 
-typedef enum
-{
+typedef enum {
        CONTACT_ADAPTOR_REQUEST_SET     = 1,
        CONTACT_ADAPTOR_REQUEST_DEL     = 2,
 } contact_adaptor_request_type_e;
 
-typedef struct contact_adaptor_contact_image_s
-{
+typedef struct contact_adaptor_contact_image_s {
        int     req_type;
-       int     no;     /**< mandatory >*/
+       int     no;     /**< mandatory >*/
        char    *img;   /**< mandatory >*/
 } contact_adaptor_contact_image_t;
 typedef struct contact_adaptor_contact_image_s *contact_adaptor_contact_image_h;
@@ -158,8 +150,7 @@ typedef struct contact_adaptor_contact_image_s *contact_adaptor_contact_image_h;
 /**
 * @brief Contact Adaptor contact API information response format
 */
-typedef struct contact_adaptor_contact_info_res_s
-{
+typedef struct contact_adaptor_contact_info_res_s {
        char            *duid;          /**< mandatory >*/
        char            *id;            /**< mandatory >*/
        char            *msisdn;        /**< mandatory >*/
@@ -180,19 +171,18 @@ typedef struct contact_adaptor_contact_info_res_s
        char            *prsc;          /**< optional >*/
        char            *status;        /**< optional >*/
        unsigned int    sids;           /**< optional >*/
-       int             type;           /**< optional >*/
-       char            *url;           /**< optional >*/
+       int             type;           /**< optional >*/
+       char            *url;           /**< optional >*/
 } contact_adaptor_contact_info_res_t;
 typedef struct contact_adaptor_contact_info_res_s *contact_adaptor_contact_info_res_h;
 
 /**
 * @brief Contact Adaptor contact API response format
 */
-typedef struct contact_adaptor_contact_res_s
-{
-        long long int                          tt;
-        contact_adaptor_contact_info_res_h     *cts;
-        unsigned int                           cts_len;
+typedef struct contact_adaptor_contact_res_s {
+       long long int                           tt;
+       contact_adaptor_contact_info_res_h      *cts;
+       unsigned int                            cts_len;
 
 } contact_adaptor_contact_res_t;
 typedef struct contact_adaptor_contact_res_s *contact_adaptor_contact_res_h;
@@ -200,8 +190,7 @@ typedef struct contact_adaptor_contact_res_s *contact_adaptor_contact_res_h;
 /**
 * @brief Contact Adaptor profile API request format
 */
-typedef struct contact_adaptor_profile_req_s
-{
+typedef struct contact_adaptor_profile_req_s {
        char*   cc;
        char*   pn;
        char*   nm;
@@ -214,7 +203,7 @@ typedef struct contact_adaptor_profile_req_s
        unsigned int    mail_len;
        char*   org;
        char*   prsc;
-       char*   status;
+       char*   status;
 
 } contact_adaptor_profile_req_t;
 typedef struct contact_adaptor_profile_req_s *contact_adaptor_profile_req_h;
@@ -222,12 +211,11 @@ typedef struct contact_adaptor_profile_req_s *contact_adaptor_profile_req_h;
 /**
 * @brief Contact Adaptor profile API response format
 */
-typedef struct contact_adaptor_profile_res_s
-{
+typedef struct contact_adaptor_profile_res_s {
        char*   nm;
        char*   img;
        char*   prsc;
-       char*   status;
+       char*   status;
 
 } contact_adaptor_profile_res_t;
 typedef struct contact_adaptor_profile_res_s *contact_adaptor_profile_res_h;
@@ -235,8 +223,7 @@ typedef struct contact_adaptor_profile_res_s *contact_adaptor_profile_res_h;
 /**
 * @brief Contact Adaptor profile API image file path format
 */
-typedef struct contact_adaptor_file_path_s
-{
+typedef struct contact_adaptor_file_path_s {
        char**  file_paths;
        unsigned int file_paths_len;
 
@@ -246,8 +233,7 @@ typedef struct contact_adaptor_file_path_s *contact_adaptor_file_path_h;
 /**
 * @brief Contact Adaptor privacy API information request format
 */
-typedef struct contact_adaptor_privacy_info_req_s
-{
+typedef struct contact_adaptor_privacy_info_req_s {
        char*   cc;
        char*   pn;
 
@@ -257,8 +243,7 @@ typedef struct contact_adaptor_privacy_info_req_s *contact_adaptor_privacy_info_
 /**
 * @brief Contact Adaptor privacy API request format
 */
-typedef struct contact_adaptor_privacy_req_s
-{
+typedef struct contact_adaptor_privacy_req_s {
        unsigned int    lvl;
        contact_adaptor_privacy_info_req_h*     cts;
        unsigned int    cts_len;
@@ -269,8 +254,7 @@ typedef struct contact_adaptor_privacy_req_s *contact_adaptor_privacy_req_h;
 /**
 * @brief Contact Adaptor privacy API response format
 */
-typedef struct contact_adaptor_privacy_res_s
-{
+typedef struct contact_adaptor_privacy_res_s {
        unsigned int    lvl;
        unsigned int    prscon;
 
@@ -280,8 +264,7 @@ typedef struct contact_adaptor_privacy_res_s *contact_adaptor_privacy_res_h;
 /**
 * @brief Contact Adaptor presence API information format
 */
-typedef struct contact_adaptor_presence_info_s
-{
+typedef struct contact_adaptor_presence_info_s {
        char            *prsc;
        unsigned int    prscon;
        char            *status;
@@ -308,9 +291,8 @@ typedef void(*contact_adaptor_plugin_on_message_received_cb)(void *user_data);
 /**
 * @brief Contact Adaptor listener for Service Adaptor
 */
-typedef struct contact_adaptor_listener_s
-{
-        contact_adaptor_service_on_message_received_cb _on_message_received;
+typedef struct contact_adaptor_listener_s {
+       contact_adaptor_service_on_message_received_cb _on_message_received;
 
 } contact_adaptor_listener_t;
 typedef struct contact_adaptor_listener_s *contact_adaptor_listener_h;
@@ -318,9 +300,8 @@ typedef struct contact_adaptor_listener_s *contact_adaptor_listener_h;
 /**
 * @brief Contact Adaptor listener for plugins
 */
-typedef struct contact_adaptor_plugin_listener_s
-{
-        contact_adaptor_plugin_on_message_received_cb _on_message_received;
+typedef struct contact_adaptor_plugin_listener_s {
+       contact_adaptor_plugin_on_message_received_cb _on_message_received;
 
 } contact_adaptor_plugin_listener_t;
 typedef struct contact_adaptor_plugin_listener_s *contact_adaptor_plugin_listener_h;
@@ -328,8 +309,7 @@ typedef struct contact_adaptor_plugin_listener_s *contact_adaptor_plugin_listene
 /**
 * @brief Contact Adaptor plugin handle
 */
-typedef struct contact_adaptor_plugin_handle_s
-{
+typedef struct contact_adaptor_plugin_handle_s {
        /**< mandatory >*/
        contact_error_code_t (*create_context)(contact_adaptor_plugin_context_h *context,
                                                const char *duid,
@@ -356,97 +336,97 @@ typedef struct contact_adaptor_plugin_handle_s
 
        /**< optional >*/
        contact_error_code_t (*new_contact_list)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
        contact_error_code_t (*set_contact_list)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
        contact_error_code_t (*get_contact_infos_latest)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*get_contact_infos_polling)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+       contact_error_code_t (*get_contact_infos_polling)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*set_me_profile_with_push)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_profile_req_h request,
+       contact_error_code_t (*set_me_profile_with_push)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_profile_req_h request,
                                                void *user_data,
-                                                contact_adaptor_profile_res_h *response,
+                                               contact_adaptor_profile_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*get_profile)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_profile_req_h request,
+       contact_error_code_t (*get_profile)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_profile_req_h request,
                                                void *user_data,
-                                                contact_adaptor_profile_res_h *response,
+                                               contact_adaptor_profile_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*set_me_profile_image_meta_with_push)
+       contact_error_code_t (*set_me_profile_image_meta_with_push)
                                                (contact_adaptor_plugin_context_h context,
                                                contact_adaptor_contact_image_h *imgs,
                                                unsigned int imgs_len,
                                                void *user_data,
-                                                contact_adaptor_error_code_h *error,
+                                               contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*delete_me_profile_image_meta_with_push)
+       contact_error_code_t (*delete_me_profile_image_meta_with_push)
                                                (contact_adaptor_plugin_context_h context,
                                                void *user_data,
-                                                contact_adaptor_error_code_h *error,
+                                               contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*set_me_profile_privacy)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_privacy_req_h request,
+       contact_error_code_t (*set_me_profile_privacy)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_privacy_req_h request,
                                                void *user_data,
-                                                contact_adaptor_privacy_res_h *response,
-                                                contact_adaptor_error_code_h *error,
+                                               contact_adaptor_privacy_res_h *response,
+                                               contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*get_me_profile_privacy)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_privacy_req_h request,
+       contact_error_code_t (*get_me_profile_privacy)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_privacy_req_h request,
                                                void *user_data,
-                                                contact_adaptor_privacy_res_h *response,
-                                                contact_adaptor_error_code_h *error,
+                                               contact_adaptor_privacy_res_h *response,
+                                               contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*set_me_presence_with_push)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_presence_info_h request,
+       contact_error_code_t (*set_me_presence_with_push)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_presence_info_h request,
                                                void *user_data,
-                                                contact_adaptor_presence_info_h *response,
+                                               contact_adaptor_presence_info_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
        /**< optional >*/
-        contact_error_code_t (*set_me_presence_on_off_with_push)(contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_presence_info_h request,
+       contact_error_code_t (*set_me_presence_on_off_with_push)(contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_presence_info_h request,
                                                void *user_data,
-                                                contact_adaptor_presence_info_h *response,
+                                               contact_adaptor_presence_info_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -458,7 +438,7 @@ typedef struct contact_adaptor_plugin_handle_s
                                                void **server_data);
 
        /**< mandatory >*/
-       char *plugin_uri;       // get from config file
+       char *plugin_uri;       /* get from config file */
 
 } contact_adaptor_plugin_handle_t;
 typedef struct contact_adaptor_plugin_handle_s *contact_adaptor_plugin_handle_h;
@@ -609,7 +589,7 @@ const char* contact_adaptor_get_plugin_name(contact_adaptor_plugin_h plugin);
  *
  * @param[in]  context                 specifies Contact Adaptor Plugin Context handle
  * @param[in]  new_access_token        specifies New access token
- * @return     contact_adaptor_error_code_h on success, otherwise NULL value
+ * @return     contact_adaptor_error_code_h on success, otherwise NULL value
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_refresh_access_token(contact_adaptor_plugin_context_h context,
@@ -620,7 +600,7 @@ contact_error_code_t contact_adaptor_refresh_access_token(contact_adaptor_plugin
  *
  * @param[in]  context                 specifies Contact Adaptor Plugin Context handle
  * @param[in]  new_access_token        specifies New access token
- * @return     contact_adaptor_error_code_h on success, otherwise NULL value
+ * @return     contact_adaptor_error_code_h on success, otherwise NULL value
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_refresh_uid(contact_adaptor_plugin_context_h context,
@@ -631,7 +611,7 @@ contact_error_code_t contact_adaptor_refresh_uid(contact_adaptor_plugin_context_
 *
 * @param[in]   code            specifies error code number
 * @param[in]   msg             specifies error message
-* @return      contact_adaptor_error_code_h on success, otherwise NULL value
+* @return      contact_adaptor_error_code_h on success, otherwise NULL value
 */
 EXPORT_API
 contact_adaptor_error_code_h contact_adaptor_create_error_code(const int64_t code,
@@ -684,11 +664,11 @@ void contact_adaptor_destroy_presence_info_s(contact_adaptor_presence_info_h inf
  */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_server_info(contact_adaptor_plugin_h plugin,
-                                       contact_adaptor_plugin_context_h context,
-                                       GHashTable *server_info,
-                                       void *user_data,
-                                       contact_adaptor_error_code_h *error,
-                                       void **server_data);
+                                               contact_adaptor_plugin_context_h context,
+                                               GHashTable *server_info,
+                                               void *user_data,
+                                               contact_adaptor_error_code_h *error,
+                                               void **server_data);
 
 /**
 * @brief Resets contact information in Contact server and upload native contact information of device to
@@ -707,9 +687,9 @@ contact_error_code_t contact_adaptor_set_server_info(contact_adaptor_plugin_h pl
 EXPORT_API
 contact_error_code_t contact_adaptor_new_contact_list(contact_adaptor_plugin_h plugin,
                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -730,9 +710,9 @@ contact_error_code_t contact_adaptor_new_contact_list(contact_adaptor_plugin_h p
 EXPORT_API
 contact_error_code_t contact_adaptor_set_contact_list(contact_adaptor_plugin_h plugin,
                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -752,9 +732,9 @@ contact_error_code_t contact_adaptor_set_contact_list(contact_adaptor_plugin_h p
 EXPORT_API
 contact_error_code_t contact_adaptor_get_contact_infos_latest(contact_adaptor_plugin_h plugin,
                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -775,9 +755,9 @@ contact_error_code_t contact_adaptor_get_contact_infos_latest(contact_adaptor_pl
 EXPORT_API
 contact_error_code_t contact_adaptor_get_contact_infos_polling(contact_adaptor_plugin_h plugin,
                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_contact_req_h request,
+                                               contact_adaptor_contact_req_h request,
                                                void *user_data,
-                                                contact_adaptor_contact_res_h *response,
+                                               contact_adaptor_contact_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -796,10 +776,10 @@ contact_error_code_t contact_adaptor_get_contact_infos_polling(contact_adaptor_p
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_profile_with_push(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_profile_req_h request,
+                                               contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_profile_req_h request,
                                                void *user_data,
-                                                contact_adaptor_profile_res_h *response,
+                                               contact_adaptor_profile_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -818,10 +798,10 @@ contact_error_code_t contact_adaptor_set_me_profile_with_push(contact_adaptor_pl
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_get_profile(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_profile_req_h request,
+                                               contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_profile_req_h request,
                                                void *user_data,
-                                                contact_adaptor_profile_res_h *response,
+                                               contact_adaptor_profile_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -840,7 +820,7 @@ contact_error_code_t contact_adaptor_get_profile(contact_adaptor_plugin_h plugin
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_profile_image_meta_with_push(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_plugin_context_h context,
                                                contact_adaptor_contact_image_h *imgs,
                                                unsigned int imgs_len,
                                                void *user_data,
@@ -863,7 +843,7 @@ contact_error_code_t contact_adaptor_set_me_profile_image_meta_with_push(contact
 EXPORT_API
 contact_error_code_t contact_adaptor_delete_me_profile_image_meta_with_push(
                                                contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_plugin_context_h context,
                                                void *user_data,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
@@ -883,10 +863,10 @@ contact_error_code_t contact_adaptor_delete_me_profile_image_meta_with_push(
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_profile_privacy(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_privacy_req_h request,
+                                               contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_privacy_req_h request,
                                                void *user_data,
-                                                contact_adaptor_privacy_res_h *response,
+                                               contact_adaptor_privacy_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -905,10 +885,10 @@ contact_error_code_t contact_adaptor_set_me_profile_privacy(contact_adaptor_plug
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_get_me_profile_privacy(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_privacy_req_h request,
+                                               contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_privacy_req_h request,
                                                void *user_data,
-                                                contact_adaptor_privacy_res_h *response,
+                                               contact_adaptor_privacy_res_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
@@ -927,7 +907,7 @@ contact_error_code_t contact_adaptor_get_me_profile_privacy(contact_adaptor_plug
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_presence_with_push(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_plugin_context_h context,
                                                contact_adaptor_presence_info_h request,
                                                void *user_data,
                                                contact_adaptor_presence_info_h *response,
@@ -949,16 +929,16 @@ contact_error_code_t contact_adaptor_set_me_presence_with_push(contact_adaptor_p
 */
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_presence_on_off_with_push(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
-                                                contact_adaptor_presence_info_h request,
+                                               contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_presence_info_h request,
                                                void *user_data,
-                                                contact_adaptor_presence_info_h *response,
+                                               contact_adaptor_presence_info_h *response,
                                                contact_adaptor_error_code_h *error,
                                                void **server_data);
 
 EXPORT_API
 contact_error_code_t contact_adaptor_set_me_profile_type(contact_adaptor_plugin_h plugin,
-                                                contact_adaptor_plugin_context_h context,
+                                               contact_adaptor_plugin_context_h context,
                                                int req_type,
                                                void *user_data,
                                                char **url,
index 69f9e692ab4d2932b8a02a277b776c96d8d4bb54..7e56c6960ecdbac75bd2f3bd6deb5f31a34e1379 100644 (file)
@@ -39,7 +39,7 @@
 \r
 /* These defines must be located before #include <dlog.h> */\r
 #define TIZEN_ENGINEER_MODE\r
-// TODO: Investigate why this macro is defined somewhere else\r
+/* TODO: Investigate why this macro is defined somewhere else */\r
 #ifndef TIZEN_DEBUG_ENABLE\r
 #define TIZEN_DEBUG_ENABLE\r
 #endif\r
@@ -99,11 +99,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true\r
  */\r
 #define message_adaptor_retv_if(expr, val) do { \\r
-            if(expr) { \\r
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, message_adaptor_gettid());    \\r
-                return (val); \\r
-            } \\r
-        } while (0)\r
+               if (expr) { \\r
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, message_adaptor_gettid());    \\r
+                       return (val); \\r
+               } \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints debug messages\r
@@ -111,8 +111,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_debug(fmt, arg...) do { \\r
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints info messages\r
@@ -120,8 +120,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_info(fmt, arg...) do { \\r
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid() ,##arg);     \\r
-        } while (0)\r
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints warning messages\r
@@ -129,8 +129,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_warning(fmt, arg...) do { \\r
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,message_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints error messages\r
@@ -138,8 +138,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_error(fmt, arg...) do { \\r
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,message_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints fatal messages\r
@@ -147,8 +147,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_fatal(fmt, arg...) do { \\r
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,message_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints debug message on entry to particular function\r
@@ -156,8 +156,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define message_adaptor_debug_func(fmt, arg...) do { \\r
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, message_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 #define plugin_req_enter()                     do { \\r
                message_adaptor_info("[ENTER] plugin API call -)) -)) -)) -)) -)) -)) -)) -)) -)) -))"); \\r
index a5d64b70d8287d007fd46e294fcfdf20bb5f5fec..487b06a700eda0acdb52754fed192cb5cd7962c2 100644 (file)
@@ -33,8 +33,7 @@
 /**
  * Message adaptor error code
  */
-typedef enum message_error_code_e
-{
+typedef enum message_error_code_e {
        MESSAGE_ADAPTOR_ERROR_NONE                     =  0,
        MESSAGE_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        MESSAGE_ADAPTOR_ERROR_INIT                      = 2,
@@ -53,10 +52,10 @@ typedef enum message_error_code_e
        MESSAGE_ADAPTOR_ERROR_INVALID_ARGUMENT_TYPE     = 15,
        MESSAGE_ADAPTOR_ERROR_NOT_AUTHORIZED            = 16,
        MESSAGE_ADAPTOR_ERROR_ADAPTOR_INTERNAL          = 17,
-       MESSAGE_ADAPTOR_ERROR_PLUGIN_INTERNAL           = 18,   // input error code and message issued from curl or http or message_plugin_internal_error_code_e(defined by developer manually)
-       MESSAGE_ADAPTOR_ERROR_SERVER_INTERNAL           = 19,   // input error code and message issued from server.
+       MESSAGE_ADAPTOR_ERROR_PLUGIN_INTERNAL           = 18,   /* input error code and message issued from curl or http or message_plugin_internal_error_code_e(defined by developer manually) */
+       MESSAGE_ADAPTOR_ERROR_SERVER_INTERNAL           = 19,   /* input error code and message issued from server. */
        MESSAGE_ADAPTOR_ERROR_DBUS                      = 20,
-       MESSAGE_ADAPTOR_ERROR_TIME_OUT                  = 21,
+       MESSAGE_ADAPTOR_ERROR_TIME_OUT                  = 21,
        MESSAGE_ADAPTOR_ERROR_MAX
 } message_error_code_t;
 
@@ -64,8 +63,7 @@ typedef enum message_error_code_e
  * @ brief Message plugin internal error code
  * @ details When a plugin returns MESSAGE_ADAPTOR_ERROR_PLUGIN_INTERNAL, input this number to message_adaptor_error_code_s.code
  */
-typedef enum _message_plugin_internal_error_code_e
-{
+typedef enum _message_plugin_internal_error_code_e {
        MESSAGE_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
        MESSAGE_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
        MESSAGE_PLUGIN_ERROR_HTTP_FORBIDDEN             = 403,
@@ -80,7 +78,7 @@ typedef enum _message_plugin_internal_error_code_e
        MESSAGE_PLUGIN_ERROR_NETWORK_DEVICE_OFFLINE     = 601,
        MESSAGE_PLUGIN_ERROR_NETWORK_DEVICE_CONFUSED    = 602,
        MESSAGE_PLUGIN_ERROR_NETWORK_SOCKET_ISSUE       = 603,
-       MESSAGE_PLUGIN_ERROR_NETWORK_SERVER_NOT_RESPONSE= 604,
+       MESSAGE_PLUGIN_ERROR_NETWORK_SERVER_NOT_RESPONSE = 604,
        MESSAGE_PLUGIN_ERROR_NEWTORK_ETC                = 648,
        MESSAGE_PLUGIN_ERROR_NEWTORK_UNKNOWN            = 649,
 
@@ -101,8 +99,7 @@ typedef enum _message_plugin_internal_error_code_e
        MESSAGE_PLUGIN_ERROR_UNKNOWN                    = 999,
 } message_plugin_internal_error_code_e;
 
-typedef enum _message_connection_policy_e
-{
+typedef enum _message_connection_policy_e {
        MESSAGE_CONNECTION_POLICY_AUTO          = 0,
        MESSAGE_CONNECTION_POLICY_CONNECT       = 1,
        MESSAGE_CONNECTION_POLICY_DISCONNECT    = 2,
@@ -111,13 +108,12 @@ typedef enum _message_connection_policy_e
 /**
  * @ brief Message plugin's TCP connection state flag
  */
-typedef enum message_connection_state_e
-{
-       MESSAGE_CONNECTION_STATE_INIT           = 0,    // init value (after create_context)
-       MESSAGE_CONNECTION_STATE_READY          = 1,    // thread running (after connect) before channel_auth
-       MESSAGE_CONNECTION_STATE_CONNECT        = 2,    // connection authenticated (after channel_auth_reply)
-       MESSAGE_CONNECTION_STATE_DISCONNECTED   = 3,    // connection was stopped explicitly (after disconnect)
-       MESSAGE_CONNECTION_STATE_INTERRUPTED    = 4,    // connection was stopped inadventently (by network/server/etc issue)
+typedef enum message_connection_state_e {
+       MESSAGE_CONNECTION_STATE_INIT           = 0,    /* init value (after create_context) */
+       MESSAGE_CONNECTION_STATE_READY          = 1,    /* thread running (after connect) before channel_auth */
+       MESSAGE_CONNECTION_STATE_CONNECT        = 2,    /* connection authenticated (after channel_auth_reply) */
+       MESSAGE_CONNECTION_STATE_DISCONNECTED   = 3,    /* connection was stopped explicitly (after disconnect) */
+       MESSAGE_CONNECTION_STATE_INTERRUPTED    = 4,    /* connection was stopped inadventently (by network/server/etc issue) */
        MESSAGE_CONNECTION_STATE_MAX            = 5,
 } message_connection_state_t;
 
@@ -134,8 +130,7 @@ typedef struct message_adaptor_s *message_adaptor_h;
 /**
  * @ brief Message adaptor error code
  */
-typedef struct message_adaptor_error_code_s
-{
+typedef struct message_adaptor_error_code_s {
        char *code;
        char *msg;
 } message_adaptor_error_code_t;
@@ -144,8 +139,7 @@ typedef struct message_adaptor_error_code_s *message_adaptor_error_code_h;
 /**
  * @ brief Message adaptor violated user structure
  */
-typedef struct message_adaptor_did_violation_users_s
-{
+typedef struct message_adaptor_did_violation_users_s {
        long long int usera;
        long long int userb;
 } message_adaptor_did_violation_users_t;
@@ -154,8 +148,7 @@ typedef struct message_adaptor_did_violation_users_s *message_adaptor_did_violat
 /**
  * @ brief Message adaptor wrong receiver structure
  */
-typedef struct
-{
+typedef struct {
        long long int *invalid_receivers;
        unsigned int invalid_receivers_len;
        long long int *interrupted_receivers;
@@ -173,8 +166,7 @@ typedef struct
 /**
  * @ brief Message adaptor chat message structure
  */
-typedef struct
-{
+typedef struct {
        long long int msg_id;
        int msg_type;
        char *chatmsg;
@@ -184,8 +176,7 @@ typedef struct
 /**
  * @ brief Message adaptor processed message structure
  */
-typedef struct
-{
+typedef struct {
        long long int msg_id;
        long long int sent_time;
 } message_adaptor_processed_msg_s;
@@ -193,8 +184,7 @@ typedef struct
 /**
  * @ brief Message adaptor deliveryAck structure
  */
-typedef struct
-{
+typedef struct {
        long long int userId;
        long long int msgId;
        long long int timestamp;
@@ -203,8 +193,7 @@ typedef struct
 /**
  * @ brief Message adaptor read_ack structure
  */
-typedef struct
-{
+typedef struct {
        long long int userId;
        long long int msgId;
        long long int timestamp;
@@ -213,8 +202,7 @@ typedef struct
 /**
  * @ brief Message adaptor ordered chat member structure
  */
-typedef struct
-{
+typedef struct {
        long long int userId;
        long long int available;
        char *name;
@@ -223,8 +211,7 @@ typedef struct
 /**
  * @ brief Message adaptor inbox entry structure
  */
-typedef struct _message_inboxentry
-{
+typedef struct _message_inboxentry {
        long long int msgId;
        int msgType;
        long long int sender;
@@ -241,8 +228,7 @@ typedef message_inboxentry_t message_adaptor_inbox_message_s;
 /**
  * @ brief Message adaptor plugin context structure
  */
-typedef struct message_adaptor_plugin_context_s
-{
+typedef struct message_adaptor_plugin_context_s {
        long long int duid;
        char *access_token;
        char *app_id;
@@ -256,16 +242,16 @@ typedef struct message_adaptor_plugin_context_s
        message_connection_state_t connection_state;
        message_connection_policy_e connection_policy;
 
-       // Encryption
+       /* Encryption */
        unsigned char enc_key[32];
        unsigned char enc_vec[16];
-       //bool enc_key_updated;
+       /* bool enc_key_updated; */
        unsigned char gpb_key[32];
        unsigned char gpb_vec[16];
-       //bool gpb_key_updated;
+       /* bool gpb_key_updated; */
        unsigned char exp_key[32];
        unsigned char exp_vec[16];
-       //bool exp_key_updated;
+       /* bool exp_key_updated; */
 
        char *plugin_uri;
 
@@ -278,15 +264,13 @@ typedef struct message_adaptor_plugin_context_s *message_adaptor_plugin_context_
 /**
  * @ brief Message adaptor result code for internal use
  */
-typedef enum message_plugin_result_code_e
-{
+typedef enum message_plugin_result_code_e {
        MESSAGE_PLUGIN_RESULT_SUCCEDED = 0,
        MESSAGE_PLUGIN_RESULT_FAILED = -1,
        MESSAGE_PLUGIN_RESULT_CANCELED = -2
 } message_plugin_result_code_t;
 
-typedef struct curl_cb_data_s
-{
+typedef struct curl_cb_data_s {
        char *data;
        int size;
 } curl_cb_data_t;
@@ -294,8 +278,7 @@ typedef struct curl_cb_data_s
 /**
  * @ brief Message adaptor phone number structure
  */
-typedef struct
-{
+typedef struct {
        char *phonenumber;
        char *ccc;
 } message_adaptor_phone_number_s;
@@ -303,8 +286,7 @@ typedef struct
 /**
  * @ brief Message adaptor chat id structure
  */
-typedef struct
-{
+typedef struct {
        long long int chatid;
        char *msisdn;
 } message_adaptor_chat_id_s;
@@ -335,10 +317,9 @@ typedef struct message_adaptor_plugin_listener_s *message_adaptor_plugin_listene
 /**
  * @ brief Message adaptor plugin handle
  */
-typedef struct message_adaptor_plugin_handle_s
-{
-       // Mandatory functions to handle plugin in adaptor
-       //struct message_adaptor_plugin_handle_s * (*create_plugin_handle)(void);
+typedef struct message_adaptor_plugin_handle_s {
+       /* Mandatory functions to handle plugin in adaptor */
+       /* struct message_adaptor_plugin_handle_s * (*create_plugin_handle)(void); */
        message_error_code_t (*create_context)(message_adaptor_plugin_context_h *context,
                                                        char *duid,
                                                        char *access_token,
@@ -372,10 +353,10 @@ typedef struct message_adaptor_plugin_handle_s
                                                        message_adaptor_phone_number_s **phone_numbers,
                                                        unsigned int phone_numbers_len,
                                                        void *user_data,
-                                                       message_adaptor_chat_id_s ***chat_ids,
-                                                       unsigned int *chat_ids_len,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void **server_data);
+                                                       message_adaptor_chat_id_s ***chat_ids,
+                                                       unsigned int *chat_ids_len,
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void **server_data);
 
        message_error_code_t (*request_msisdn) (message_adaptor_plugin_context_h handle,
                                                        char *uid,
@@ -400,8 +381,8 @@ typedef struct message_adaptor_plugin_handle_s
 
        message_error_code_t (*client_echo_reply) (message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*create_chatroom_request)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
@@ -424,8 +405,8 @@ typedef struct message_adaptor_plugin_handle_s
                                                        long long int *request_id,
                                                        long long int *chatroom_id,
                                                        message_adaptor_chat_msg_s *msgs,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*allow_chat_request)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
@@ -480,8 +461,8 @@ typedef struct message_adaptor_plugin_handle_s
                                                        long long int *request_id,
                                                        message_adaptor_end_chat_s **end_chats,
                                                        int *end_chats_len,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*unseal_message_request)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
@@ -489,8 +470,8 @@ typedef struct message_adaptor_plugin_handle_s
                                                        long long int *sender_id,
                                                        long long int *message_id,
                                                        const char *message_detail,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*save_call_log_request)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
@@ -500,13 +481,13 @@ typedef struct message_adaptor_plugin_handle_s
                                                        long long int *call_sender_id,
                                                        long long int *call_receiver_id,
                                                        int *conversaction_second,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*current_time_request)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
        message_error_code_t (*is_typing)(message_adaptor_plugin_context_h context,
                                                        long long int *request_id,
@@ -514,16 +495,16 @@ typedef struct message_adaptor_plugin_handle_s
                                                        char **state,
                                                        int *chat_type,
                                                        int *refreshtime,
-                                                       message_adaptor_error_code_t **error_code,
-                                                       void *user_data);
+                                                       message_adaptor_error_code_t **error_code,
+                                                       void *user_data);
 
-       //message_error_code_t (*message_set_key)(message_adaptor_plugin_context_h context, char *key, bool is_gpb);
+       /* message_error_code_t (*message_set_key)(message_adaptor_plugin_context_h context, char *key, bool is_gpb); */
        message_error_code_t (*connect_to_server)(message_adaptor_plugin_context_h context);
        message_error_code_t (*decode_push_message)(message_adaptor_plugin_context_h context, char *in_msg, char **out_msg);
        message_error_code_t (*disconnect_to_server)(message_adaptor_plugin_context_h context);
        message_error_code_t (*get_connection_state)(message_adaptor_plugin_context_h context,
                                                        message_connection_state_t *state);
-       char *plugin_uri;               // get from config file
+       char *plugin_uri;       /* get from config file  */
 
 } message_adaptor_plugin_handle_t;
 typedef struct message_adaptor_plugin_handle_s *message_adaptor_plugin_handle_h;
@@ -791,9 +772,8 @@ typedef void (*message_adaptor_service_completion_cb)(message_adaptor_plugin_con
 
 
 
-typedef struct message_adaptor_listener_s
-{
-       void (*client_echo_cb)(message_adaptor_plugin_context_h context,
+typedef struct message_adaptor_listener_s {
+       void (*client_echo_cb)(message_adaptor_plugin_context_h context,
                                                        long long int request_id,
                                                        message_adaptor_error_code_t **error_code,
                                                        void *server_data);
@@ -909,7 +889,7 @@ typedef struct message_adaptor_listener_s
        void (*completion_cb)(message_adaptor_plugin_context_h context,
                                                        message_connection_state_t state,
                                                        message_adaptor_error_code_t **error_code,
-                                                       void *server_data );
+                                                       void *server_data);
 
 
 } message_adaptor_listener_t;
@@ -1182,8 +1162,7 @@ typedef void (*message_adaptor_plugin_completion_cb)(message_adaptor_plugin_cont
  * Message adaptor listener for plugins
  * Listener is used by plugins
  */
-typedef struct message_adaptor_plugin_listener_s
-{
+typedef struct message_adaptor_plugin_listener_s {
        message_adaptor_plugin_client_echo_cb message_adaptor_client_echo;
        message_adaptor_plugin_create_chatroom_reply_cb message_adaptor_create_chatroom_reply;
        message_adaptor_plugin_change_chatroom_meta_reply_cb message_adaptor_change_chatroom_meta_reply;
@@ -1206,25 +1185,25 @@ typedef struct message_adaptor_plugin_listener_s
 /**
  * Loads plugin from selected path
  */
- EXPORT_API
+EXPORT_API
 int message_adaptor_load_plugin(message_adaptor_h adaptor, const char *plugin_path);
 
 /**
  * Unloads selected plugin
  */
- EXPORT_API
+EXPORT_API
 int message_adaptor_unload_plugin(message_adaptor_h adaptor, message_adaptor_plugin_h plugin);
 
- EXPORT_API
+EXPORT_API
 message_error_code_t message_adaptor_set_connected(message_adaptor_plugin_h plugin, int connected);
 
- EXPORT_API
+EXPORT_API
 message_error_code_t message_adaptor_wait_connected(message_adaptor_plugin_h plugin);
 
 /**
  * Gets plugin name
  */
- EXPORT_API
+EXPORT_API
 const char *message_adaptor_get_plugin_uri(message_adaptor_plugin_h plugin);
 
 /**
@@ -1315,9 +1294,9 @@ void message_adaptor_destroy_plugin_context(message_adaptor_plugin_h plugin, mes
 EXPORT_API
 message_adaptor_plugin_h message_adaptor_get_plugin_by_name(message_adaptor_h adaptor, const char *plugin_uri);
 
-////////////////////////////////////////////////////////////
-// Adaptor Plugin call Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor Plugin call Functions                          */
+/**********************************************************/
 
 /**
 * @brief Set server information for Message Plugin
@@ -1356,12 +1335,12 @@ EXPORT_API
 message_error_code_t message_adaptor_get_key(message_adaptor_plugin_h plugin,
                                                message_adaptor_plugin_context_h context,
                                                char **in_gcmid,
-                                               char **in_del_gcm_id,
-                                               char **key,
-                                               char **expiredkey,
-                                               char **gpbauthkey,
-                                               message_adaptor_error_code_t **error_code,
-                                               void **server_data);
+                                               char **in_del_gcm_id,
+                                               char **key,
+                                               char **expiredkey,
+                                               char **gpbauthkey,
+                                               message_adaptor_error_code_t **error_code,
+                                               void **server_data);
 
 /**
 * @brief Request Chat ID corresponds to MSISDN to remote server
@@ -1403,7 +1382,7 @@ message_error_code_t message_adaptor_request_chat_id(message_adaptor_plugin_h pl
 * @retval error code defined in message_error_code_e - MESSAGE_ADAPTOR_ERROR_NONE if Successful
 */
 EXPORT_API
-message_error_code_t message_adaptor_request_msisdn (message_adaptor_plugin_h plugin,
+message_error_code_t message_adaptor_request_msisdn(message_adaptor_plugin_h plugin,
                                                message_adaptor_plugin_context_h handle,
                                                long long int *chat_ids,
                                                unsigned int chat_ids_len,
@@ -1448,7 +1427,7 @@ message_error_code_t message_adaptor_channel_auth_request(message_adaptor_plugin
 * @retval error code defined in message_error_code_t
 */
 EXPORT_API
-message_error_code_t message_adaptor_client_echo_reply (message_adaptor_plugin_h plugin,
+message_error_code_t message_adaptor_client_echo_reply(message_adaptor_plugin_h plugin,
                                                message_adaptor_plugin_context_h context,
                                                long long int request_id,
                                                message_adaptor_error_code_t **error_code,
@@ -1535,10 +1514,10 @@ message_error_code_t message_adaptor_chat_request(message_adaptor_plugin_h plugi
 * @param[in]   chatroom_id                                     specifies chatroom ID
 * @param[in]   max_count                                       specifies the max number of ForwardUnreadMessage (default : 500)
 * @param[in]   need_delivery_ack                               specifies whether receive delivery ack data or not (0 - do not receive delivery ack data, 1 - receive delivery ack data)
-* @param[in]   need_delivery_ack_timestamp     specifies       latest receipt time of delivery ack data
-* @param[in]   need_read_ack                           specifies whether receive water mark data or not (0 - do not receive water mark data, 1 - receive read_ack data)
-* @param[in]   last_read_ack_timestamp         specifies time of last read_ack
-* @param[in]   need_ordered_chat_member_list   specifies whether need odered chat memebr list or not
+* @param[in]   need_delivery_ack_timestamp                     specifies latest receipt time of delivery ack data
+* @param[in]   need_read_ack                                   specifies whether receive water mark data or not (0 - do not receive water mark data, 1 - receive read_ack data)
+* @param[in]   last_read_ack_timestamp                         specifies time of last read_ack
+* @param[in]   need_ordered_chat_member_list                   specifies whether need odered chat memebr list or not
 * @param[in]   user_data                                       specifies additional user input data (unused)
 * @param[out]  error_code                                      specifies error code
 * @return MESSAGE_ADAPTOR_ERROR_NONE (0) on success, otherwise a positive error value
index 2bd71485f289818352ee03b94ab650581da72885..5da8523e2fad1df2a28bdb1a109bec48c19aef1f 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define push_adaptor_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, push_adaptor_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, push_adaptor_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,push_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,push_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,push_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define push_adaptor_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, push_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 #define plugin_req_enter()                     do { \
                push_adaptor_info("[ENTER] plugin API call -)) -)) -)) -)) -)) -)) -)) -)) -)) -))"); \
index 6829ac6d2e5a33a05369b90a453c8098b941d35b..54ad9c62e05d3a3b92becca17d9de6e8ceb7fe3e 100644 (file)
@@ -28,8 +28,7 @@
 /**
 * @brief Push Adaptor error code
 */
-typedef enum push_error_code_e
-{
+typedef enum push_error_code_e {
        PUSH_ADAPTOR_ERROR_NONE                     =  0,
        PUSH_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        PUSH_ADAPTOR_ERROR_INIT                      = 2,
@@ -68,18 +67,16 @@ typedef struct push_adaptor_s *push_adaptor_h;
 /**
 * @brief Push Adaptor plugin context structure
 */
-typedef struct push_adaptor_plugin_context_s
-{
+typedef struct push_adaptor_plugin_context_s {
        char    *push_app_id;   /**< unique key >*/
        char    *plugin_uri;
-        void   *plugin_info;
+       void    *plugin_info;
 
        int     state;          /* Adaptor defined and share with plugin (getter: adaptor, setter: plugin) */
 } push_adaptor_plugin_context_t;
 typedef struct push_adaptor_plugin_context_s *push_adaptor_plugin_context_h;
 
-typedef enum
-{
+typedef enum {
        PUSH_ADAPTOR_STATE_DISCONNECTED = 0,
        PUSH_ADAPTOR_STATE_CONNECTED    = 1,
 } push_adaptor_connection_state_e;
@@ -87,10 +84,9 @@ typedef enum
 /**
 * @brief Push Adaptor error code
 */
-typedef struct push_adaptor_error_code_s
-{
-        int64_t code;
-        char   *msg;
+typedef struct push_adaptor_error_code_s {
+       int64_t code;
+       char    *msg;
 
 } push_adaptor_error_code_t;
 typedef struct push_adaptor_error_code_s *push_adaptor_error_code_h;
@@ -98,11 +94,10 @@ typedef struct push_adaptor_error_code_s *push_adaptor_error_code_h;
 /**
 * @brief Push Adaptor notification data
 */
-typedef struct push_adaptor_notification_data_s
-{
-        char           *data;
-        char           *msg;
-        long long int   time_stamp;
+typedef struct push_adaptor_notification_data_s {
+       char            *data;
+       char            *msg;
+       long long int   time_stamp;
        char            *sender;
        char            *app_id;
        char            *session_info;
@@ -121,7 +116,7 @@ typedef struct push_adaptor_notification_data_s *push_adaptor_notification_data_
 * @see
 */
 typedef void(*push_adaptor_service_on_notification_received_cb)
-                        (push_adaptor_notification_data_h notification, void *user_data);
+                       (push_adaptor_notification_data_h notification, void *user_data);
 
 /**
 * @brief Callback for service_adaptor_connect_push_service API for push plugin
@@ -133,14 +128,13 @@ typedef void(*push_adaptor_service_on_notification_received_cb)
 * @see
 */
 typedef void(*push_adaptor_plugin_on_notification_received_cb)
-                        (push_adaptor_notification_data_h notification, void *user_data);
+                       (push_adaptor_notification_data_h notification, void *user_data);
 
 /**
 * @brief Push Adaptor listener for Service Adaptor
 */
-typedef struct push_adaptor_listener_s
-{
-        push_adaptor_service_on_notification_received_cb        _on_notification_received;
+typedef struct push_adaptor_listener_s {
+       push_adaptor_service_on_notification_received_cb        _on_notification_received;
 
 } push_adaptor_listener_t;
 typedef struct push_adaptor_listener_s *push_adaptor_listener_h;
@@ -148,9 +142,8 @@ typedef struct push_adaptor_listener_s *push_adaptor_listener_h;
 /**
 * @brief Push Adaptor listener for plugins
 */
-typedef struct push_adaptor_plugin_listener_s
-{
-        push_adaptor_plugin_on_notification_received_cb         _on_notification_received;
+typedef struct push_adaptor_plugin_listener_s {
+       push_adaptor_plugin_on_notification_received_cb         _on_notification_received;
 
 } push_adaptor_plugin_listener_t;
 typedef struct push_adaptor_plugin_listener_s *push_adaptor_plugin_listener_h;
@@ -158,8 +151,7 @@ typedef struct push_adaptor_plugin_listener_s *push_adaptor_plugin_listener_h;
 /**
  * @brief Push Adaptor plugin handle
  */
-typedef struct push_adaptor_plugin_handle_s
-{
+typedef struct push_adaptor_plugin_handle_s {
        /**< mandatory >*/
        push_error_code_t (*create_context)(push_adaptor_plugin_context_h *context,
                                                        const char *push_app_id);
@@ -184,7 +176,7 @@ typedef struct push_adaptor_plugin_handle_s
        push_error_code_t (*connect)(push_adaptor_plugin_context_h context);
 
        /**< optional >*/
-        push_error_code_t (*disconnect)(push_adaptor_plugin_context_h context);
+       push_error_code_t (*disconnect)(push_adaptor_plugin_context_h context);
 
        /**< optional >*/
        push_error_code_t (*request_unread_notification)(push_adaptor_plugin_context_h context);
@@ -396,7 +388,7 @@ push_error_code_t push_adaptor_is_connected(push_adaptor_plugin_h plugin,
 /**
 * @brief Asynchronous request to get unread notifications
 *
-* @param[in]   plugin          specifies push adaptor plugin handle
+* @param[in]   plugin          specifies push adaptor plugin handle
 * @param[in]    context                specifies push adaptor plugin context handle
 * @param[out]  error           specifies error code
 * @return      0 on success, otherwise a positive error value
@@ -411,35 +403,35 @@ push_error_code_t push_adaptor_request_unread_notification(push_adaptor_plugin_h
 /*
 EXPORT_API
 push_error_code_t push_adaptor_register(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_deregister(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_get_notification_data(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_get_notification_message(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_get_notification_time(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_get_unread_notification(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_get_registration_id(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 
 EXPORT_API
 push_error_code_t push_adaptor_free_notification(push_adaptor_plugin_h, push_adaptor_plugin_context_h,
-                                        void *svc_in, void *opt_in, void **svc_out, void **opt_out);
+                                       void *svc_in, void *opt_in, void **svc_out, void **opt_out);
 */
 
 #endif /* __PUSH_ADAPTOR_H__ */
index 61335976acff7670b7188461f396df50b01cbcaa..f112e6a7bab380b9f5ad665c981cf7b2d9129995 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __SHOP_ADAPTOR_LOG_H__\r
 #define __SHOP_ADAPTOR_LOG_H__\r
 \r
-//#define WORK_IN_LOCAL\r
+/* #define WORK_IN_LOCAL */\r
 \r
 /**\r
  *  HOW TO USE IT:\r
@@ -38,7 +38,7 @@
 \r
 /* These defines must be located before #include <dlog.h> */\r
 #define TIZEN_ENGINEER_MODE\r
-// TODO: Investigate why this macro is defined somewhere else\r
+/* TODO: Investigate why this macro is defined somewhere else */\r
 #ifndef TIZEN_DEBUG_ENABLE\r
 #define TIZEN_DEBUG_ENABLE\r
 #endif\r
@@ -98,11 +98,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true\r
  */\r
 #define shop_adaptor_retv_if(expr, val) do { \\r
-            if(expr) { \\r
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, shop_adaptor_gettid());    \\r
-                return (val); \\r
-            } \\r
-        } while (0)\r
+               if (expr) { \\r
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, shop_adaptor_gettid());    \\r
+                       return (val); \\r
+               } \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints debug messages\r
@@ -110,8 +110,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_debug(fmt, arg...) do { \\r
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints info messages\r
@@ -119,8 +119,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_info(fmt, arg...) do { \\r
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid() ,##arg);     \\r
-        } while (0)\r
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints warning messages\r
@@ -128,8 +128,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_warning(fmt, arg...) do { \\r
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,shop_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints error messages\r
@@ -137,8 +137,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_error(fmt, arg...) do { \\r
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,shop_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints fatal messages\r
@@ -146,8 +146,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_fatal(fmt, arg...) do { \\r
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,shop_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 /**\r
  * @brief Prints debug message on entry to particular function\r
@@ -155,8 +155,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed\r
  */\r
 #define shop_adaptor_debug_func(fmt, arg...) do { \\r
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
-        } while (0)\r
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, shop_adaptor_gettid(), ##arg);     \\r
+       } while (0)\r
 \r
 #define plugin_req_enter()                     do { \\r
                shop_adaptor_info("[ENTER] plugin API call -)) -)) -)) -)) -)) -)) -)) -)) -)) -))"); \\r
index 2ae629b4c845311cd89125b9692459b0cc25458b..2882827b4938dc58de053ba5596a98cc2eb94857 100644 (file)
@@ -39,8 +39,7 @@
 /**
  * @ brief Shop adaptor error code
  */
-typedef enum shop_error_code_e
-{
+typedef enum shop_error_code_e {
        SHOP_ADAPTOR_ERROR_NONE                     =  0,
        SHOP_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        SHOP_ADAPTOR_ERROR_INIT                      = 2,
@@ -80,8 +79,7 @@ typedef struct shop_adaptor_s *shop_adaptor_h;
 /**
 * @brief Describes infromation about shop
 */
-typedef struct _service_adaptor_shop_info_s
-{
+typedef struct _service_adaptor_shop_info_s {
        int category_id;                /**< specifies category id of item*/
        long item_id;                   /**< specifies item id*/
        long sticker_id;                /**< specifies sticker id*/
@@ -96,8 +94,7 @@ typedef struct _service_adaptor_shop_info_s
 /**
 * @ brief Describes infromation about item
 */
-typedef struct _service_adaptor_shop_item_s
-{
+typedef struct _service_adaptor_shop_item_s {
        long item_id;                   /**< specifies item id*/
        int category_id;                /**< specifies category id of item*/
        long *sticker_ids;              /**< specifies sticker id*/
@@ -121,8 +118,7 @@ typedef struct _service_adaptor_shop_item_s
 /**
  * @ brief Shop adaptor plugin context structure
  */
-typedef struct shop_adaptor_plugin_context_s
-{
+typedef struct shop_adaptor_plugin_context_s {
        char *duid;
        char *access_token;
        char *appid;
@@ -134,8 +130,7 @@ typedef struct shop_adaptor_plugin_context_s
 typedef struct shop_adaptor_plugin_context_s *shop_adaptor_plugin_context_h;
 
 
-typedef enum shop_plugin_result_code_e
-{
+typedef enum shop_plugin_result_code_e {
        SHOP_PLUGIN_RESULT_SUCCEDED = 0,
        SHOP_PLUGIN_RESULT_FAILED = -1,
        SHOP_PLUGIN_RESULT_CANCELED = -2
@@ -144,8 +139,7 @@ typedef enum shop_plugin_result_code_e
 /**
  * @brief Enumerations of signal code for Service Adaptor
  */
-typedef enum _shop_adaptor_error_e
-{
+typedef enum _shop_adaptor_error_e {
        SERVICE_ADAPTOR_ERROR_NONE = 0,
        SERVICE_ADAPTOR_ERROR_INTERNAL = -1,
        SERVICE_ADAPTOR_ERROR_DBUS = -2,
@@ -155,21 +149,18 @@ typedef enum _shop_adaptor_error_e
 /**
 * @brief Describes infromation about Service Adaptor's error
 */
-typedef struct shop_adaptor_error_code_s
-{
+typedef struct shop_adaptor_error_code_s {
        int64_t code;
-        char *msg;
+       char *msg;
 } shop_adaptor_error_code_t;
 typedef struct shop_adaptor_error_code_s *shop_adaptor_error_code_h;
 
-typedef struct shop_plugin_error_s
-{
-        char *code;
-        char *msg;
+typedef struct shop_plugin_error_s {
+       char *code;
+       char *msg;
 } shop_plugin_error_t;
 
-typedef struct shop_adaptor_listener_s
-{
+typedef struct shop_adaptor_listener_s {
 } shop_adaptor_listener_t;
 typedef struct shop_adaptor_listener_s *shop_adaptor_listener_h;
 
@@ -178,18 +169,16 @@ typedef struct shop_adaptor_listener_s *shop_adaptor_listener_h;
  * Shop adaptor listener for plugins (example)
  * Listener is used by plugins
  */
-typedef struct shop_adaptor_plugin_listener_s
-{
+typedef struct shop_adaptor_plugin_listener_s {
 } shop_adaptor_plugin_listener_t;
 typedef struct shop_adaptor_plugin_listener_s *shop_adaptor_plugin_listener_h;
 
 /**
  * @ brief Shop adaptor plugin handle
  */
-typedef struct shop_adaptor_plugin_handle_s
-{
-       // Mandatory functions to handle plugin in adaptor
-       //struct shop_adaptor_plugin_handle_s * (*create_plugin_handle)(void);
+typedef struct shop_adaptor_plugin_handle_s {
+       /* Mandatory functions to handle plugin in adaptor */
+       /* struct shop_adaptor_plugin_handle_s * (*create_plugin_handle)(void); */
 
        shop_error_code_t (*create_context)(shop_adaptor_plugin_context_h *context,
                                                char *duid,
@@ -202,8 +191,8 @@ typedef struct shop_adaptor_plugin_handle_s
        shop_error_code_t (*destroy_handle)(struct shop_adaptor_plugin_handle_s *handle);
        shop_error_code_t (*set_listener)(shop_adaptor_plugin_listener_h listener);
        shop_error_code_t (*unset_listener)(void);
-       // Mandatory end
-       // Optional
+       /* Mandatory end */
+       /* Optional */
        shop_error_code_t (*get_item_list_v1) (shop_adaptor_plugin_context_h handle,
                                                shop_adaptor_shop_info_s *info,
                                                void *user_data,
@@ -236,11 +225,11 @@ typedef struct shop_adaptor_plugin_handle_s
        shop_error_code_t (*set_server_info)(shop_adaptor_plugin_context_h handle,
                                                GHashTable *server_info,
                                                shop_adaptor_error_code_h *error_code);
-       // Optional end
+       /* Optional end */
 
-       // Mandatory
-       char *plugin_uri;               // get from config file
-       // Mandatory end
+       /* Mandatory */
+       char *plugin_uri;               /* get from config file */
+       /* Mandatory end */
 
 } shop_adaptor_plugin_handle_t;
 typedef struct shop_adaptor_plugin_handle_s *shop_adaptor_plugin_handle_h;
@@ -361,9 +350,9 @@ shop_error_code_t shop_adaptor_set_server_info(shop_adaptor_plugin_h plugin,
                                                GHashTable *server_info,
                                                shop_adaptor_error_code_h *error_code);
 
-////////////////////////////////////////////////////////////
-// Adaptor Plugin call Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor Plugin call Functions                          */
+/**********************************************************/
 
 /**
 * @brief Get List of Item
@@ -380,7 +369,7 @@ shop_error_code_t shop_adaptor_set_server_info(shop_adaptor_plugin_h plugin,
 * @retval error code defined in shop_error_code_e - SHOP_ADAPTOR_ERROR_NONE if Successful
 */
 EXPORT_API
-shop_error_code_t shop_adaptor_get_item_list_v1 (shop_adaptor_plugin_h plugin,
+shop_error_code_t shop_adaptor_get_item_list_v1(shop_adaptor_plugin_h plugin,
                                                shop_adaptor_plugin_context_h context,
                                                shop_adaptor_shop_info_s *info,
                                                void *user_data,
index 55938075b11edf99aec4fe8126090e78c97e735a..a13d3b10761a8823f7dd946ccb74429a3bb7b192 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define storage_adaptor_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, storage_adaptor_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, storage_adaptor_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,storage_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,storage_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,storage_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,15 +143,15 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define storage_adaptor_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, storage_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 #define storage_adaptor_check_param_equal(compare, val, ret_val, exception_handling) {\
-       if ( compare == val ) {\
+       if (compare == val) {\
                LOGD(FONT_COLOR_PURPLE "[%d]<Line :%d>" "Parameter Check catched (equal) \n : Expected(%p) Value(%p)" FONT_COLOR_RESET, storage_adaptor_gettid(), __LINE__, compare, val);\
                exception_handling;\
                return ret_val;\
-       }\
+       } \
 }
 
 #define plugin_req_enter()                     do { \
index 621e27763ed3c8ed929ed4aa79e96e6ba2ec606b..a9e7b175ac837527bd4c6b5293282de03625dd7a 100644 (file)
@@ -36,8 +36,7 @@ extern "C"
 /**
  * Storage adaptor error code
  */
-typedef enum storage_error_code_e
-{
+typedef enum storage_error_code_e {
        STORAGE_ADAPTOR_ERROR_NONE                      = 0,
        STORAGE_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        STORAGE_ADAPTOR_ERROR_INIT                      = 2,
@@ -66,16 +65,15 @@ typedef enum storage_error_code_e
 /**
  * Storage adaptor error code
  */
-typedef enum _storage_plugin_internal_error_code_e
-{
-       STORAGE_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
-       STORAGE_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
+typedef enum _storage_plugin_internal_error_code_e {
+       STORAGE_PLUGIN_ERROR_HTTP_BAD_REQUEST           = 400,
+       STORAGE_PLUGIN_ERROR_HTTP_UNAUTHORIZED          = 401,
        STORAGE_PLUGIN_ERROR_HTTP_FORBIDDEN             = 403,
        STORAGE_PLUGIN_ERROR_HTTP_NOT_FOUND             = 404,
        STORAGE_PLUGIN_ERROR_HTTP_METHOD_NOT_ALLOWED    = 405,
-       STORAGE_PLUGIN_ERROR_HTTP_BAD_GATEWAY           = 502,
+       STORAGE_PLUGIN_ERROR_HTTP_BAD_GATEWAY           = 502,
        STORAGE_PLUGIN_ERROR_HTTP_SERVICE_UNAVAILBLE    = 503,
-       STORAGE_PLUGIN_ERROR_HTTP_INSUFFICIENT_STORAGE  = 507,
+       STORAGE_PLUGIN_ERROR_HTTP_INSUFFICIENT_STORAGE  = 507,
        STORAGE_PLUGIN_ERROR_HTTP_ETC                   = 598,
        STORAGE_PLUGIN_ERROR_HTTP_UNKNOWN               = 599,
 
@@ -87,8 +85,8 @@ typedef enum _storage_plugin_internal_error_code_e
        STORAGE_PLUGIN_ERROR_FILE_OPEN_FAILED           = 701,
        STORAGE_PLUGIN_ERROR_FILE_NOT_EXIST             = 702,
        STORAGE_PLUGIN_ERROR_FILE_TRANSFER_CANCELED     = 703,
-       STORAGE_PLUGIN_ERROR_FILE_AREADY_EXIST          = 704, // EEXIST
-       STORAGE_PLUGIN_ERROR_FILE_ACCESS_DENIED         = 705, // EACCES
+       STORAGE_PLUGIN_ERROR_FILE_AREADY_EXIST          = 704, /* EEXIST */
+       STORAGE_PLUGIN_ERROR_FILE_ACCESS_DENIED         = 705, /* EACCES */
        STORAGE_PLUGIN_ERROR_FILE_ETC                   = 798,
        STORAGE_PLUGIN_ERROR_FILE_UNKNOWN               = 799,
 
@@ -107,29 +105,27 @@ typedef enum _storage_plugin_internal_error_code_e
 /**
  * Storage adaptor status code
  */
-typedef enum _storage_adaptor_transfer_state_e
-{
+typedef enum _storage_adaptor_transfer_state_e {
        STORAGE_ADAPTOR_TRANSFER_STATE_IN_PROGRESS      = 1,
        STORAGE_ADAPTOR_TRANSFER_STATE_FINISHED         = 2,
-       STORAGE_ADAPTOR_TRANSFER_STATE_CANCELED         = 3,    // canceled by request
-       STORAGE_ADAPTOR_TRANSFER_STATE_FAILED           = 4,    // canceled by system
+       STORAGE_ADAPTOR_TRANSFER_STATE_CANCELED         = 3,    /* canceled by request */
+       STORAGE_ADAPTOR_TRANSFER_STATE_FAILED           = 4,    /* canceled by system */
 
-       STORAGE_ADAPTOR_TRANSFER_STATE_RESUME,  // not use this version yet (Next feature)
-       STORAGE_ADAPTOR_TRANSFER_STATE_PAUSED,  // not use this version yet (Next feature)
+       STORAGE_ADAPTOR_TRANSFER_STATE_RESUME,  /* not use this version yet (Next feature) */
+       STORAGE_ADAPTOR_TRANSFER_STATE_PAUSED,  /* not use this version yet (Next feature) */
 
-       // Private feature
+       /* Private feature */
        STORAGE_ADAPTOR_TRANSFER_STATUS_PROGRESS        = 1,
        STORAGE_ADAPTOR_TRANSFER_STATUS_RESUME          = 1,
        STORAGE_ADAPTOR_TRANSFER_STATUS_PAUSE           = 2,
-       STORAGE_ADAPTOR_TRANSFER_STATUS_CANCEL          = 3,    // canceled by request
-       STORAGE_ADAPTOR_TRANSFER_STATUS_STOPPED         = 4,    // canceled by system
+       STORAGE_ADAPTOR_TRANSFER_STATUS_CANCEL          = 3,    /* canceled by request */
+       STORAGE_ADAPTOR_TRANSFER_STATUS_STOPPED         = 4,    /* canceled by system */
        STORAGE_ADAPTOR_TRANSFER_STATUS_FINISHED        = 5
 } storage_adaptor_transfer_state_e;
 
 typedef storage_adaptor_transfer_state_e storage_adaptor_transfer_status_e;
 
-typedef enum
-{
+typedef enum {
        STORAGE_ADAPTOR_FILE_ACCESS_READ        = O_RDONLY,
        STORAGE_ADAPTOR_FILE_ACCESS_WRITE       = O_WRONLY|O_CREAT|O_EXCL,
 } storage_adaptor_file_access_mode_e;
@@ -137,9 +133,8 @@ typedef enum
 /**
  * Storage adaptor content type
  */
-typedef enum _storage_adaptor_content_type_e
-{
-       STORAGE_ADAPTOR_CONTENT_TYPE_DEFAULT            = -1,   // initalize value
+typedef enum _storage_adaptor_content_type_e {
+       STORAGE_ADAPTOR_CONTENT_TYPE_DEFAULT            = -1,   /* initalize value */
 
        STORAGE_ADAPTOR_CONTENT_TYPE_IMGAE              = 160,
        STORAGE_ADAPTOR_CONTENT_TYPE_VIDEO              = 161,
@@ -176,13 +171,12 @@ typedef struct storage_adaptor_s *storage_adaptor_h;
 /**
  * Storage adaptor plugin context structure
  */
-typedef struct storage_adaptor_plugin_context_s
-{
-       // Context variables
+typedef struct storage_adaptor_plugin_context_s {
+       /* Context variables */
        int context_id;
        storage_adaptor_plugin_h plugin_handle;
 
-       // User define (input by service-adaptor)
+       /* User define (input by service-adaptor) */
        char *app_id;
        char *app_secret;
        char *access_token;
@@ -190,24 +184,22 @@ typedef struct storage_adaptor_plugin_context_s
        char *uid;
        char *service_name;
 
-       // Plugin define (input by plugin)
-       char *plugin_uri;       // mandatory (package id)
-       void *plugin_data;      // optional
+       /* Plugin define (input by plugin) */
+       char *plugin_uri;       /* mandatory (package id) */
+       void *plugin_data;      /* optional */
 } storage_adaptor_plugin_context_t;
 typedef struct storage_adaptor_plugin_context_s *storage_adaptor_plugin_context_h;
 
 /**
  * Structure for error code from server
  */
-typedef struct storage_adaptor_error_code_s
-{
+typedef struct storage_adaptor_error_code_s {
        int64_t code;
        char    *msg;
 } storage_adaptor_error_code_t;
 typedef struct storage_adaptor_error_code_s *storage_adaptor_error_code_h;
 
-typedef struct _storage_adaptor_media_meta_s
-{
+typedef struct _storage_adaptor_media_meta_s {
        char *mime_type;
        char *title;
        char *album;
@@ -228,20 +220,18 @@ typedef struct _storage_adaptor_media_meta_s
        char *extra_media_meta;
 } storage_adaptor_media_meta_s;
 
-typedef struct _storage_adaptor_cloud_meta_s
-{
+typedef struct _storage_adaptor_cloud_meta_s {
        char *service_name;
        unsigned long long usage_byte;
        unsigned long long quota_byte;
        char *extra_cloud_meta;
 } storage_adaptor_cloud_meta_s;
 
-// private only!!
+/* private only!! */
 /**
  * Structure Storage File Share token Infomation
  */
-typedef struct storage_adaptor_file_share_token_s
-{
+typedef struct storage_adaptor_file_share_token_s {
        char *public_token;
        char *auth_code;
 } storage_adaptor_file_share_token_t;
@@ -250,16 +240,15 @@ typedef struct storage_adaptor_file_share_token_s *storage_adaptor_file_share_to
 /**
  * Structure Storage File Infomation
  */
-typedef struct storage_adaptor_file_info_s
-{
-       // Common
+typedef struct storage_adaptor_file_info_s {
+       /* Common */
        char    *plugin_uri;            /**< specifies plugin name generated file_info */
        char    *object_id;             /**< specifies file object id be used in storage */
        char    *storage_path;          /**< specifies file path in storage */
        unsigned long long file_size;   /**< specifies file size (recomend byte)*/
        int     file_info_index;        /**< specifies file info index (wide use; e.g : chunk upload, multi download)*/
 
-       // private only!!
+       /* private only!! */
        int     revision;
        unsigned long long timestamp;
        char    *type;
@@ -271,7 +260,7 @@ typedef struct storage_adaptor_file_info_s
        storage_adaptor_file_share_token_h file_share_token;
 
 
-       // public defined
+       /* public defined */
        unsigned long long created_time;        /**< specifies timestamp */
        unsigned long long modified_time;       /**< specifies timestamp */
        storage_adaptor_content_type_e content_type;
@@ -290,9 +279,8 @@ typedef struct storage_adaptor_plugin_listener_s *storage_adaptor_plugin_listene
 /**
  * Storage adaptor plugin handle
  */
-typedef struct storage_adaptor_plugin_handle_s
-{
-       // Mandatory functions to handle plugin in adaptor
+typedef struct storage_adaptor_plugin_handle_s {
+       /* Mandatory functions to handle plugin in adaptor */
        storage_error_code_t (*create_context)(storage_adaptor_plugin_context_h *context,
                                                        const char *app_id,
                                                        const char *app_secret,
@@ -303,22 +291,22 @@ typedef struct storage_adaptor_plugin_handle_s
        storage_error_code_t (*destroy_handle)(struct storage_adaptor_plugin_handle_s *handle);
        storage_error_code_t (*set_listener)(storage_adaptor_plugin_listener_h listener);
        storage_error_code_t (*unset_listener)(void);
-       // Mandatory end
+       /* Mandatory end */
 
-       // Optional
+       /* Optional */
 
-       storage_error_code_t (*open_file) (storage_adaptor_plugin_context_h context,            // Do Not define from plugin (TBD)
+       storage_error_code_t (*open_file) (storage_adaptor_plugin_context_h context,            /* Do Not define from plugin (TBD) */
                                                        const char *file_path,
                                                        storage_adaptor_file_access_mode_e mode,
                                                        int *file_descriptor,
                                                        storage_adaptor_error_code_h *error);
 
-       storage_error_code_t (*close_file) (storage_adaptor_plugin_context_h context,           // Do Not define from plugin (TBD)
+       storage_error_code_t (*close_file) (storage_adaptor_plugin_context_h context,           /* Do Not define from plugin (TBD) */
                                                        int file_descriptor,
                                                        storage_adaptor_error_code_h *error);
 
        storage_error_code_t (*start_upload_task)(storage_adaptor_plugin_context_h context,
-                                                       int src_file_descriptor,                // read only opened
+                                                       int src_file_descriptor,                /* read only opened */
                                                        const char *upload_dir_path,
                                                        const char *file_name,
                                                        bool need_progress,
@@ -328,7 +316,7 @@ typedef struct storage_adaptor_plugin_handle_s
        storage_error_code_t (*start_download_task)(storage_adaptor_plugin_context_h context,
                                                        const char *storage_dir_path,
                                                        const char *file_name,
-                                                       int dst_file_descriptor,                // write only opened
+                                                       int dst_file_descriptor,                /* write only opened */
                                                        bool need_progress,
                                                        storage_adaptor_error_code_h *error,
                                                        void *user_data);
@@ -336,8 +324,8 @@ typedef struct storage_adaptor_plugin_handle_s
        storage_error_code_t (*start_download_thumb_task)(storage_adaptor_plugin_context_h context,
                                                        const char *storage_dir_path,
                                                        const char *file_name,
-                                                       int dst_file_descriptor,                // write only opened
-                                                       int thumbnail_size,                     // level (defined plugin SPEC)
+                                                       int dst_file_descriptor,                /* write only opened */
+                                                       int thumbnail_size,                     /* level (defined plugin SPEC) */
                                                        bool need_progress,
                                                        storage_adaptor_error_code_h *error,
                                                        void *user_data);
@@ -354,21 +342,21 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        int file_descriptor,
                                                        storage_adaptor_error_code_h *error);
 
-       // common (yet)
+       /* common (yet) */
        storage_error_code_t (*set_server_info)(storage_adaptor_plugin_context_h context,
                                                        GHashTable *server_info,
                                                        void *request,
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
-       // Optional end
-       // common
+       /* Optional end */
+       /* common */
        storage_error_code_t (*get_root_folder_path)(storage_adaptor_plugin_context_h context,
                                                        void *request,
                                                        char **root_folder_path,
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*list)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *folder_name,
@@ -378,7 +366,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*make_directory)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *folder_name,
@@ -387,7 +375,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*upload_file_sync)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *file_name,
@@ -398,7 +386,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*download_file_sync)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *file_name,
@@ -407,7 +395,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*download_thumbnail)(storage_adaptor_plugin_context_h context,
                                                        const char *folder_path,
                                                        const char *file_name,
@@ -417,7 +405,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*delete_file)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *file_name,
@@ -426,7 +414,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*remove_directory)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *folder_name,
@@ -435,7 +423,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*move_file)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *file_name,
@@ -446,7 +434,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*move_directory)(storage_adaptor_plugin_context_h context,
                                                        const char *parent_folder_storage_path,
                                                        const char *folder_name,
@@ -457,7 +445,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*set_transfer_state)(storage_adaptor_plugin_context_h context,
                                                        void *transfer_request_id,
                                                        storage_adaptor_transfer_state_e state,
@@ -465,7 +453,7 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // common
+       /* common */
        storage_error_code_t (*get_transfer_state)(storage_adaptor_plugin_context_h context,
                                                        void *transfer_request_id,
                                                        void *request,
@@ -740,11 +728,11 @@ typedef struct storage_adaptor_plugin_handle_s
                                                        storage_adaptor_error_code_h *error,
                                                        void *response);
 
-       // Optional end
+       /* Optional end */
 
-       // Mandatory
-       char *plugin_uri;       // get from config file
-       // Mandatory end
+       /* Mandatory */
+       char *plugin_uri;       /* get from config file */
+       /* Mandatory end */
 
 } storage_adaptor_plugin_handle_t;
 typedef struct storage_adaptor_plugin_handle_s *storage_adaptor_plugin_handle_h;
@@ -753,7 +741,7 @@ typedef struct storage_adaptor_plugin_handle_s *storage_adaptor_plugin_handle_h;
  * Callback function variable for service adaptor
  */
 
-// private feature
+/* private feature */
 typedef void (*storage_adaptor_service_download_file_async_reply_cb)(void *transfer_request_id,
                                                char *download_file_local_path,
                                                storage_adaptor_error_code_h error,
@@ -770,7 +758,7 @@ typedef void (*storage_adaptor_service_file_transfer_progress_reply_cb)(void *tr
                                                storage_adaptor_error_code_h error,
                                                void *response);
 
-// public feature
+/* public feature */
 typedef void (*storage_adaptor_service_download_state_changed_reply_cb)(long long int file_descriptor,
                                                storage_adaptor_transfer_state_e state,
                                                storage_adaptor_error_code_h error,
@@ -792,9 +780,8 @@ typedef void (*storage_adaptor_service_task_progress_reply_cb)(long long int fil
  * Storage adaptor listener for service adaptor
  * Listener is used by service adaptor
  */
-typedef struct storage_adaptor_listener_s
-{
-// private feature
+typedef struct storage_adaptor_listener_s {
+/*/ private feature */
        void (*download_file_async_reply)(void *transfer_request_id,
                                                        char *download_file_local_path,
                                                        storage_adaptor_error_code_h error,
@@ -811,7 +798,7 @@ typedef struct storage_adaptor_listener_s
                                                        storage_adaptor_error_code_h error,
                                                        void *response);
 
-// public feature
+/* public feature */
        void (*download_state_changed_reply)(long long int file_descriptor,
                                                storage_adaptor_transfer_state_e state,
                                                storage_adaptor_error_code_h error,
@@ -834,7 +821,7 @@ typedef struct storage_adaptor_listener_s *storage_adaptor_listener_h;
  * Callback function variables for plugins
  * These callbacks are expected to be support by plugins
  */
-// private feature
+/* private feature */
 typedef void (*storage_adaptor_plugin_download_file_async_reply_cb)(void *transfer_request_id,
                                                char *download_file_local_path,
                                                storage_adaptor_error_code_h error,
@@ -851,7 +838,7 @@ typedef void (*storage_adaptor_plugin_file_transfer_progress_reply_cb)(void *tra
                                                storage_adaptor_error_code_h error,
                                                void *response);
 
-// public feature
+/* public feature */
 typedef void (*storage_adaptor_plugin_download_state_changed_reply_cb)(int file_descriptor,
                                                storage_adaptor_transfer_state_e state,
                                                storage_adaptor_error_code_h error,
@@ -873,17 +860,16 @@ typedef void (*storage_adaptor_plugin_task_progress_reply_cb)(int file_descripto
  * Storage adaptor listener for plugins
  * Listener is used by plugins
  */
-typedef struct storage_adaptor_plugin_listener_s
-{
-// private feature
+typedef struct storage_adaptor_plugin_listener_s {
+/* private feature */
        storage_adaptor_plugin_download_file_async_reply_cb     storage_adaptor_download_file_async_reply;
-       storage_adaptor_plugin_upload_file_async_reply_cb       storage_adaptor_upload_file_async_reply;
-       storage_adaptor_plugin_file_transfer_progress_reply_cb  storage_adaptor_file_transfer_progress_reply;
+       storage_adaptor_plugin_upload_file_async_reply_cb       storage_adaptor_upload_file_async_reply;
+       storage_adaptor_plugin_file_transfer_progress_reply_cb  storage_adaptor_file_transfer_progress_reply;
 
-// public feature
+/* public feature */
        storage_adaptor_plugin_download_state_changed_reply_cb  storage_adaptor_download_state_changed_reply;
-       storage_adaptor_plugin_upload_state_changed_reply_cb    storage_adaptor_upload_state_changed_reply;
-       storage_adaptor_plugin_task_progress_reply_cb   storage_adaptor_task_progress_reply;
+       storage_adaptor_plugin_upload_state_changed_reply_cb    storage_adaptor_upload_state_changed_reply;
+       storage_adaptor_plugin_task_progress_reply_cb   storage_adaptor_task_progress_reply;
 } storage_adaptor_plugin_listener_t;
 
 /**
@@ -893,7 +879,7 @@ EXPORT_API
 int storage_adaptor_load_plugin(storage_adaptor_h,
                                                const char *plugin_path);
 
-// For 3rd party plugin packages
+/* For 3rd party plugin packages */
 EXPORT_API
 int storage_adaptor_load_plugin_from_package(storage_adaptor_h adaptor,
                                                const char *package_id,
@@ -1013,9 +999,9 @@ storage_adaptor_plugin_h storage_adaptor_get_plugin_by_name(storage_adaptor_h ad
 EXPORT_API
 GList *storage_adaptor_get_plugins(storage_adaptor_h adaptor);
 
-////////////////////////////////////////////////////////////
-// Adaptor Util Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor Util Functions                                 */
+/**********************************************************/
 EXPORT_API
 storage_adaptor_file_info_h storage_adaptor_create_file_info(void);
 
@@ -1023,9 +1009,9 @@ EXPORT_API
 int storage_adaptor_destroy_file_info(storage_adaptor_file_info_h *file_info);
 
 
-////////////////////////////////////////////////////////////
-// Adaptor Plugin call Functions
-////////////////////////////////////////////////////////////
+/**********************************************************/
+/* Adaptor Plugin call Functions                          */
+/**********************************************************/
 
 
 EXPORT_API
@@ -1045,7 +1031,7 @@ storage_error_code_t storage_adaptor_close_file(storage_adaptor_plugin_h plugin,
 EXPORT_API
 storage_error_code_t storage_adaptor_start_upload_task(storage_adaptor_plugin_h plugin,
                                                storage_adaptor_plugin_context_h context,
-                                               long long int src_file_descriptor,              // read only opened
+                                               long long int src_file_descriptor,              /* read only opened */
                                                const char *upload_dir_path,
                                                const char *file_name,
                                                bool need_progress,
@@ -1057,7 +1043,7 @@ storage_error_code_t storage_adaptor_start_download_task(storage_adaptor_plugin_
                                                storage_adaptor_plugin_context_h context,
                                                const char *storage_dir_path,
                                                const char *file_name,
-                                               long long int dst_file_descriptor,              // write only opened
+                                               long long int dst_file_descriptor,              /* write only opened */
                                                bool need_progress,
                                                storage_adaptor_error_code_h *error,
                                                void *user_data);
@@ -1067,8 +1053,8 @@ storage_error_code_t storage_adaptor_start_download_thumb_task(storage_adaptor_p
                                                storage_adaptor_plugin_context_h context,
                                                const char *storage_dir_path,
                                                const char *file_name,
-                                               long long int dst_file_descriptor,              // write only opened
-                                               int thumbnail_size,                     // level (defined plugin SPEC)
+                                               long long int dst_file_descriptor,              /* write only opened */
+                                               int thumbnail_size,                     /* level (defined plugin SPEC) */
                                                bool need_progress,
                                                storage_adaptor_error_code_h *error,
                                                void *user_data);
index 08f84ee065b16fd4c3e23b94569c07bee77b194e..5a05c1b038f319ac82032f9f68fca84d2d1ece36 100644 (file)
 #include "service_adaptor_client_type.h"
 #include "service_adaptor_client_private.h"
 
-#define __safe_add_string(x)   (x==NULL)?"":x
+#define __safe_add_string(x)   (x == NULL) ? "" : x
 
 #define SECURITY_SERVER_COOKIE_BUFFER_SIZE     21
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 GDBusProxy *_dbus_get_sac_interface_proxy();
index 4feefc44df097cf99c6aa2162bdc9b16903e5648..915d050c337e3ac1840c7ef75fa7c2dc38b7518a 100644 (file)
@@ -36,8 +36,7 @@
 
 #define CONTACT_PROFILE_IMAGE_PATH_LEN 2048
 
-typedef struct _service_adaptor_profile_image_s
-{
+typedef struct _service_adaptor_profile_image_s {
        service_adaptor_contact_request_type_e type;
        int index;
        char path[CONTACT_PROFILE_IMAGE_PATH_LEN];
index da2057626b17fa5242dde0680e85a82d41d35f41..b1fac97fe6db651f88dae9894f799abb330793a4 100644 (file)
@@ -31,7 +31,7 @@
 #define __TIZEN_SOCIAL_SERVICE_ADAPTOR_DBUS_CLIENT_LAYER_H__
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
index 1765b06f4843395d7a51ab989bd4f36fef9f3a2b..35116e2104384aae833df76f96323c8ef2671024 100644 (file)
@@ -36,9 +36,9 @@
 #include "service_adaptor_client_storage.h"
 #include "service_adaptor_client_storage_internal.h"
 
-//////////////////////// private feature
+/* private feature */
 #include "private/service-adaptor-client-storage.h"
-//////////////////////// private feature
+/* private feature */
 
 void on_storage_signal(GDBusProxy *proxy,
                                                gchar *sender_name,
index 94af9b828a69230af9556d1b1edb6a69d553b120..249f0971b75f992e771c7f0dc46bc050111196e4 100644 (file)
@@ -34,7 +34,7 @@
 #include "service_adaptor_client_type.h"
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
index 75184653b818dadeb4e8dfe1eeb3b4c2bf919f71..c24fb4b5aed44197bc9400409948dd6b7a832439 100644 (file)
@@ -38,8 +38,7 @@ typedef struct _service_adaptor_profile_image_s *service_adaptor_profile_image_h
 /**
 * @brief Describes contact infromation for request
 */
-typedef struct _service_adaptor_contact_info_req_s
-{
+typedef struct _service_adaptor_contact_info_req_s {
        char *tp;               /**< specifies status as none*/
        char *id;               /**< specifies status as none*/
        char *pn;               /**< specifies status as none*/
@@ -50,8 +49,7 @@ typedef struct _service_adaptor_contact_info_req_s
 /**
 * @brief Describes request infromation about contact
 */
-typedef struct _service_adaptor_contact_req_s
-{
+typedef struct _service_adaptor_contact_req_s {
        long long int tt;                               /**< specifies status as none*/
        service_adaptor_contact_info_req_s **cts;       /**< specifies status as none*/
        unsigned int cts_len;                           /**< specifies status as none*/
@@ -60,8 +58,7 @@ typedef struct _service_adaptor_contact_req_s
 /**
 * @brief Describes contact infromation for response
 */
-typedef struct _service_adaptor_contact_info_res_s
-{
+typedef struct _service_adaptor_contact_info_res_s {
        char *duid;             /**< specifies status as none*/
        char *id;               /**< specifies status as none*/
        char *msisdn;           /**< specifies status as none*/
@@ -71,7 +68,7 @@ typedef struct _service_adaptor_contact_info_res_s
        char *nm;               /**< specifies status as none*/
        char **evnt;            /**< specifies status as none*/
        unsigned int evnt_len;  /**< specifies status as none*/
-//     char *img;              /**< specifies status as none*/
+       /* char *img; */        /**< specifies status as none*/
        service_adaptor_profile_image_h *images;
        unsigned int images_len;
        char **adrs;            /**< specifies status as none*/
@@ -89,8 +86,7 @@ typedef struct _service_adaptor_contact_info_res_s
 /**
 * @brief Describes response infromation about contact
 */
-typedef struct _service_adaptor_contact_res_s
-{
+typedef struct _service_adaptor_contact_res_s {
        long long int tt;                               /**< specifies status as none*/
        service_adaptor_contact_info_res_s **cts;       /**< specifies status as none*/
        unsigned int cts_len;                           /**< specifies status as none*/
@@ -99,8 +95,7 @@ typedef struct _service_adaptor_contact_res_s
 /**
 * @brief Describes request infromation about profile
 */
-typedef struct _service_adaptor_profile_req_s
-{
+typedef struct _service_adaptor_profile_req_s {
        char *cc;               /**< specifies status as none*/
        char *pn;               /**< specifies status as none*/
        char *nm;               /**< specifies status as none*/
@@ -119,8 +114,7 @@ typedef struct _service_adaptor_profile_req_s
 /**
 * @brief Describes response infromation about profile
 */
-typedef struct _service_adaptor_profile_res_s
-{
+typedef struct _service_adaptor_profile_res_s {
        char *nm;               /**< specifies status as none*/
        char *img;              /**< specifies status as none*/
        char *prsc;             /**< specifies status as none*/
@@ -130,8 +124,7 @@ typedef struct _service_adaptor_profile_res_s
 /**
 * @brief Describes privacy infromation for request
 */
-typedef struct _service_adaptor_privacy_info_req_s
-{
+typedef struct _service_adaptor_privacy_info_req_s {
        char *cc;               /**< specifies status as none*/
        char *pn;               /**< specifies status as none*/
 } service_adaptor_privacy_info_req_s;
@@ -139,8 +132,7 @@ typedef struct _service_adaptor_privacy_info_req_s
 /**
 * @brief Describes request infromation about privacy
 */
-typedef struct _service_adaptor_privacy_req_s
-{
+typedef struct _service_adaptor_privacy_req_s {
        unsigned int lvl;                               /**< specifies status as none*/
        service_adaptor_privacy_info_req_s **cts;       /**< specifies status as none*/
        unsigned int cts_len;                           /**< specifies status as none*/
@@ -149,8 +141,7 @@ typedef struct _service_adaptor_privacy_req_s
 /**
 * @brief Describes response infromation about privacy
 */
-typedef struct _service_adaptor_privacy_res_s
-{
+typedef struct _service_adaptor_privacy_res_s {
        unsigned int lvl;       /**< specifies status as none*/
        unsigned int prscon;    /**< specifies status as none*/
 } service_adaptor_privacy_res_s;
@@ -158,15 +149,14 @@ typedef struct _service_adaptor_privacy_res_s
 /**
 * @brief Describes presence infromation for request
 */
-typedef struct _service_adaptor_presence_req_s
-{
+typedef struct _service_adaptor_presence_req_s {
        char *prsc;             /**< specifies status as none*/
        char *status;           /**< specifies status as none*/
        unsigned int prscon;    /**< specifies status as none*/
 } service_adaptor_presence_req_s;
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
@@ -396,26 +386,25 @@ int service_adaptor_set_me_profile_type(service_adaptor_h handle,
                                                service_adaptor_error_s **error_code,
                                                void *user_data);
 
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_CONTACT_SET     = 1,
        SERVICE_ADAPTOR_CONTACT_DELETE  = 2,
 } service_adaptor_contact_request_type_e;
 
-int service_adaptor_profile_image_create (service_adaptor_profile_image_h *image);
+int service_adaptor_profile_image_create(service_adaptor_profile_image_h *image);
 
-int service_adaptor_profile_image_set_element (service_adaptor_profile_image_h image,
+int service_adaptor_profile_image_set_element(service_adaptor_profile_image_h image,
                                                service_adaptor_contact_request_type_e req_type,
                                                int index,
                                                const char *path);
 
-int service_adaptor_profile_image_get_index (service_adaptor_profile_image_h image, int *index);
+int service_adaptor_profile_image_get_index(service_adaptor_profile_image_h image, int *index);
 
-int service_adaptor_profile_image_get_url (service_adaptor_profile_image_h image, char **url);
+int service_adaptor_profile_image_get_url(service_adaptor_profile_image_h image, char **url);
 
-int service_adaptor_profile_image_get_req_type (service_adaptor_profile_image_h image, int *req_type);
+int service_adaptor_profile_image_get_req_type(service_adaptor_profile_image_h image, int *req_type);
 
-void service_adaptor_profile_image_destroy (service_adaptor_profile_image_h image);
+void service_adaptor_profile_image_destroy(service_adaptor_profile_image_h image);
 
 
 
index 58d8f8e8a29c69f05eb11d9b2193f95631a638d0..2c97760acdf512a773ca5e6fd135435b60bc526e 100644 (file)
@@ -34,8 +34,7 @@
 #include "service-adaptor-client.h"
 #include "service_adaptor_client_type.h"
 
-typedef enum _service_adaptor_connection_policy_e
-{
+typedef enum _service_adaptor_connection_policy_e {
        SERVICE_ADAPTOR_CONNECTION_POLICY_AUTO          = 0,
        SERVICE_ADAPTOR_CONNECTION_POLICY_CONNECT       = 1,
        SERVICE_ADAPTOR_CONNECTION_POLICY_DISCONNECT    = 2,
@@ -43,8 +42,7 @@ typedef enum _service_adaptor_connection_policy_e
 /**
 * @brief Describes infromation about violation users of wrong receivers
 */
-typedef struct _service_adaptor_did_violation_users_s
-{
+typedef struct _service_adaptor_did_violation_users_s {
        long long int usera;
        long long int userb;
 } service_adaptor_did_violation_users_s;
@@ -52,8 +50,7 @@ typedef struct _service_adaptor_did_violation_users_s
 /**
 * @brief Describes infromation about wrong receivers
 */
-typedef struct _service_adaptor_wrong_receiver_s
-{
+typedef struct _service_adaptor_wrong_receiver_s {
        long long int *invalid_receivers;               /**< specifies status as none*/
        unsigned int invalid_receivers_len;             /**< specifies status as none*/
        long long int *interrupted_receivers;           /**< specifies status as none*/
@@ -72,8 +69,7 @@ typedef struct _service_adaptor_wrong_receiver_s
 /**
 * @brief Describes infromation about chat message
 */
-typedef struct _service_adaptor_chat_msg_s
-{
+typedef struct _service_adaptor_chat_msg_s {
        long long int msg_id;           /**< specifies status as none*/
        int msg_type;                   /**< specifies status as none*/
        char *chatmsg;                  /**< specifies status as none*/
@@ -83,8 +79,7 @@ typedef struct _service_adaptor_chat_msg_s
 /**
 * @brief Describes infromation about processed message
 */
-typedef struct _service_adaptor_processed_msg_s
-{
+typedef struct _service_adaptor_processed_msg_s {
        long long int msg_id;           /**< specifies status as none*/
        long long int sent_time;        /**< specifies status as none*/
 } service_adaptor_processed_msg_s;
@@ -92,8 +87,7 @@ typedef struct _service_adaptor_processed_msg_s
 /**
 * @brief Describes infromation about delivery ack
 */
-typedef struct _service_adaptor_delivery_ack_s
-{
+typedef struct _service_adaptor_delivery_ack_s {
        long long int user_id;
        long long int msg_id;
        long long int timestamp;
@@ -102,8 +96,7 @@ typedef struct _service_adaptor_delivery_ack_s
 /**
 * @brief Describes infromation about read_ack
 */
-typedef struct _service_adaptor_read_ack_s
-{
+typedef struct _service_adaptor_read_ack_s {
        long long int user_id;          /**< specifies status as none*/
        long long int msg_id;           /**< specifies status as none*/
        long long int timestamp;        /**< specifies status as none*/
@@ -112,8 +105,7 @@ typedef struct _service_adaptor_read_ack_s
 /**
 * @brief Describes infromation about ordered chat member
 */
-typedef struct _service_adaptor_ordered_chat_member_s
-{
+typedef struct _service_adaptor_ordered_chat_member_s {
        long long int user_id;          /**< specifies status as none*/
        bool available;                 /**< specifies status as none*/
        char *name;                     /**< specifies status as none*/
@@ -122,8 +114,7 @@ typedef struct _service_adaptor_ordered_chat_member_s
 /**
 * @brief Describes infromation about inbox message
 */
-typedef struct _service_adaptor_inbox_message_s
-{
+typedef struct _service_adaptor_inbox_message_s {
        long long int msg_id;           /**< specifies status as none*/
        int msg_type;                   /**< specifies status as none*/
        long long int sender;           /**< specifies status as none*/
@@ -138,8 +129,7 @@ typedef struct _service_adaptor_inbox_message_s
 /**
 * @brief Describes infromation about end chat
 */
-typedef struct _service_adaptor_end_chat_s
-{
+typedef struct _service_adaptor_end_chat_s {
        long long int chatroom_id;      /**< specifies status as none*/
        bool deny_invitation;
 } service_adaptor_end_chat_s;
@@ -147,8 +137,7 @@ typedef struct _service_adaptor_end_chat_s
 /**
 * @brief Describes infromation about phone number
 */
-typedef struct _service_adaptor_phone_number_s
-{
+typedef struct _service_adaptor_phone_number_s {
        char *phonenumber;              /**< specifies status as none*/
        char *ccc;                      /**< specifies status as none*/
 } service_adaptor_phone_number_s;
@@ -156,8 +145,7 @@ typedef struct _service_adaptor_phone_number_s
 /**
 * @brief Describes infromation about chat id
 */
-typedef struct _service_adaptor_chat_id_s
-{
+typedef struct _service_adaptor_chat_id_s {
        long long int chatid;           /**< specifies status as none*/
        char *msisdn;                   /**< specifies status as none*/
 } service_adaptor_chat_id_s;
@@ -175,7 +163,7 @@ typedef struct _service_adaptor_chat_id_s
 * @pre service_adaptor_request_channel_auth will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_channel_auth_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_channel_auth_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
@@ -191,7 +179,7 @@ typedef void(* service_adaptor_reply_channel_auth_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_client_echo will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_client_echo_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_client_echo_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
@@ -215,7 +203,7 @@ typedef void (*service_adaptor_reply_channel_disconnected_cb)(service_adaptor_h
 * @pre service_adaptor_request_create_chatroom will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_create_chatroom_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_create_chatroom_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                int default_message_ttl,
@@ -224,10 +212,10 @@ typedef void(* service_adaptor_reply_create_chatroom_cb)(service_adaptor_h handl
                                                void *server_data);
 
 typedef void (*service_adaptor_reply_change_chatroom_meta_cb)(service_adaptor_h handle,
-                                                        long long int request_id,
-                                                        long long int chatroom_id,
-                                                       service_adaptor_error_s *error_code,
-                                                        void *server_data);
+                                               long long int request_id,
+                                               long long int chatroom_id,
+                                               service_adaptor_error_s *error_code,
+                                               void *server_data);
 
 
 /**
@@ -244,7 +232,7 @@ typedef void (*service_adaptor_reply_change_chatroom_meta_cb)(service_adaptor_h
 * @pre service_adaptor_request_chat will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_chat_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_chat_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                service_adaptor_processed_msg_s **processed_msgs,
@@ -268,7 +256,7 @@ typedef void(* service_adaptor_reply_chat_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_allow_chat will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_allow_chat_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_allow_chat_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                service_adaptor_delivery_ack_s **delivery_acks,
@@ -295,7 +283,7 @@ typedef void(* service_adaptor_reply_allow_chat_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_all_unread_message will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_all_unread_message_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_all_unread_message_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
@@ -314,7 +302,7 @@ typedef void(* service_adaptor_reply_all_unread_message_cb)(service_adaptor_h ha
 * @pre service_adaptor_register_forward_online_message_listener will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_request_forward_online_message_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_request_forward_online_message_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                int chat_type,
@@ -337,7 +325,7 @@ typedef void(* service_adaptor_request_forward_online_message_cb)(service_adapto
 * @pre service_adaptor_register_forward_online_message_listener will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_request_forward_unread_message_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_request_forward_unread_message_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_inbox_message_s **inbox_msgs,
                                                unsigned int inbox_msgs_len,
@@ -357,7 +345,7 @@ typedef void(* service_adaptor_request_forward_unread_message_cb)(service_adapto
 * @pre service_adaptor_request_read_message will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_read_message_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_read_message_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                service_adaptor_error_s *error_code,
@@ -377,7 +365,7 @@ typedef void(* service_adaptor_reply_read_message_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_invite_chat will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_invite_chat_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_invite_chat_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                long long int sent_time,
@@ -396,7 +384,7 @@ typedef void(* service_adaptor_reply_invite_chat_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_end_chat will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_end_chat_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_end_chat_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
@@ -413,7 +401,7 @@ typedef void(* service_adaptor_reply_end_chat_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_unseal_message will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_unseal_message_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_unseal_message_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int chatroom_id,
                                                service_adaptor_error_s *error_code,
@@ -431,7 +419,7 @@ typedef void(* service_adaptor_reply_unseal_message_cb)(service_adaptor_h handle
 * @pre service_adaptor_request_save_call_log will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_save_call_log_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_save_call_log_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
@@ -448,14 +436,14 @@ typedef void(* service_adaptor_reply_save_call_log_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_current_time will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_reply_current_time_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_reply_current_time_cb)(service_adaptor_h handle,
                                                long long int request_id,
                                                long long int current_time_millis,
                                                service_adaptor_error_s *error_code,
                                                void *server_data);
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 #ifdef NOT_IN_USE
index 1e63d727144b8f9edace1923a23691acd5145b90..ab263f846618296e30d0b69ec4049f685d9814ff 100644 (file)
@@ -36,8 +36,7 @@
 /**
 * @brief Describes push information
 */
-typedef struct _service_adaptor_push_notification_s
-{
+typedef struct _service_adaptor_push_notification_s {
        char *data;                     /**< specifies status as none*/
        char *message;                  /**< specifies status as none*/
        long long int time;             /**< specifies status as none*/
@@ -54,13 +53,13 @@ typedef struct _service_adaptor_push_notification_s
 * @pre service_adaptor_connect_push_service will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_push_notification_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_push_notification_cb)(service_adaptor_h handle,
                                                service_adaptor_push_notification_s *noti_info,
                                                service_adaptor_error_s *error_code,
                                                void *user_data);
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
index 95b426d33c72fdfae19727aeabfdd7927c2b2388..e0efd0e1750c66d1cbecf697926a2e5c54ece307 100644 (file)
@@ -36,8 +36,7 @@
 /**
 * @brief Describes infromation about shop
 */
-typedef struct _service_adaptor_shop_info_s
-{
+typedef struct _service_adaptor_shop_info_s {
        int category_id;                /**< specifies category id of item*/
        long item_id;                   /**< specifies item id*/
        long sticker_id;                /**< specifies sticker id*/
@@ -52,8 +51,7 @@ typedef struct _service_adaptor_shop_info_s
 /**
 * @brief Describes infromation about item
 */
-typedef struct _service_adaptor_shop_item_s
-{
+typedef struct _service_adaptor_shop_item_s {
        long item_id;                   /**< specifies category id of item*/
        int category_id;                /**< specifies category id of item*/
        long *sticker_ids;              /**< specifies category id of item*/
@@ -74,7 +72,7 @@ typedef struct _service_adaptor_shop_item_s
 } service_adaptor_shop_item_s;
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
index 5c99de965988be7cb2743a4f199023a912664389..c42668aa7c62f85e85fde49c519fe125096086d1 100644 (file)
 
 #include "service-adaptor-client.h"
 
-typedef enum _service_adaptor_file_status_code_e
-{
+typedef enum _service_adaptor_file_status_code_e {
        SERVICE_ADAPTOR_TRANSFER_STATUS_PROGRESS        = 1,
        SERVICE_ADAPTOR_TRANSFER_STATUS_RESUME          = 1,
        SERVICE_ADAPTOR_TRANSFER_STATUS_PAUSE           = 2,
-       SERVICE_ADAPTOR_TRANSFER_STATUS_CANCEL          = 3,    // canceled by request
-       SERVICE_ADAPTOR_TRANSFER_STATUS_STOPPED         = 4,    // canceled by system
+       SERVICE_ADAPTOR_TRANSFER_STATUS_CANCEL          = 3,    /* canceled by request */
+       SERVICE_ADAPTOR_TRANSFER_STATUS_STOPPED         = 4,    /* canceled by system */
        SERVICE_ADAPTOR_TRANSFER_STATUS_FINISHED        = 5
 } service_adaptor_file_status_code_e;
 
-typedef enum _service_adaptor_thumbnail_size_e
-{
+typedef enum _service_adaptor_thumbnail_size_e {
        SERVICE_ADAPTOR_THUMBNAIL_XSMALL                = 96,
        SERVICE_ADAPTOR_THUMBNAIL_SMALL                 = 200,
        SERVICE_ADAPTOR_THUMBNAIL_MEDIUM                = 500,
@@ -53,16 +51,14 @@ typedef enum _service_adaptor_thumbnail_size_e
 /**
 * @brief Describes file description about download and upload
 */
-typedef struct _service_adaptor_file_s
-{
+typedef struct _service_adaptor_file_s {
        int file_description;           /**< specifies status as none*/
 } service_adaptor_file_s;
 
 /**
 * @brief Describes file infromation about download and upload
 */
-typedef struct _service_adaptor_file_path_s
-{
+typedef struct _service_adaptor_file_path_s {
        char **file_paths;              /**< specifies status as none*/
        unsigned int file_paths_len;    /**< specifies status as none*/
 } service_adaptor_file_path_s;
@@ -70,8 +66,7 @@ typedef struct _service_adaptor_file_path_s
 /**
 * @brief Describes file status about transfer
 */
-typedef struct _service_adaptor_file_status_s
-{
+typedef struct _service_adaptor_file_status_s {
        long long int total_size;                       /**< specifies status as none*/
        long long int transferred_size;                 /**< specifies status as none*/
        service_adaptor_file_status_code_e status;      /**< specifies status as none*/
@@ -95,7 +90,7 @@ typedef service_adaptor_file_s *service_adaptor_file_h;
 * @pre service_adaptor_request_channel_auth will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_file_progress_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_file_progress_cb)(service_adaptor_h handle,
                                                service_adaptor_file_h file_handle,
                                                unsigned long long transferred_size,
                                                unsigned long long total_size,
@@ -114,14 +109,14 @@ typedef void(* service_adaptor_file_progress_cb)(service_adaptor_h handle,
 * @pre service_adaptor_request_channel_auth will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_file_transfer_completion_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_file_transfer_completion_cb)(service_adaptor_h handle,
                                                service_adaptor_file_h file_handle,
                                                char *publish_url,
                                                service_adaptor_error_s *error_code,
                                                void *user_data);
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 
index 17d0e8f9e7f722e154f108354654c6fd38f6f820..76094ac7a8ea0867a1a9b1490416274a9b6f132f 100644 (file)
 /**
  * @brief Enumerations of result code for Service Adaptor
  */
-typedef enum _service_adaptor_result_e
-{
+typedef enum _service_adaptor_result_e {
        SERVICE_ADAPTOR_RESULT_SUCCEEDED                = SERVICE_ADAPTOR_ERROR_NONE,   /**< specifies status as none*/
        SERVICE_ADAPTOR_RESULT_FAILED                   = -1,   /**< specifies status as none*/
-       SERVICE_ADAPTOR_RESULT_CANCELED                 = -2    /**< specifies status as none*/
+       SERVICE_ADAPTOR_RESULT_CANCELED                 = -2    /**< specifies status as none*/
 } __service_adaptor_result_e;  /*TODO deplicate*/
 
 typedef int service_adaptor_result_e; /* For version compatibility */
@@ -49,8 +48,7 @@ typedef int service_adaptor_result_e; /* For version compatibility */
 /**
  * @brief Enumerations of error code for Service Adaptor
  */
-typedef enum _private_service_adaptor_error_e
-{
+typedef enum _private_service_adaptor_error_e {
        SERVICE_ADAPTOR_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        SERVICE_ADAPTOR_ERROR_INIT                      = 2,
        SERVICE_ADAPTOR_ERROR_DEINIT                    = 3,
@@ -79,8 +77,7 @@ typedef enum _private_service_adaptor_error_e
 /**
  * @brief Type of service in plugin (ext internal)
  */
-typedef enum
-{
+typedef enum {
        SERVICE_PLUGIN_SERVICE_CONTACT  = (0x01 << 2),          /**< Contact service type flag */
        SERVICE_PLUGIN_SERVICE_MESSAGE  = (0x01 << 3),          /**< Message service type flag */
        SERVICE_PLUGIN_SERVICE_SHOP     = (0x01 << 4),          /**< Shop service type flag */
@@ -90,8 +87,7 @@ typedef enum
 /**
 * @brief Describes infromation about plugin
 */
-typedef struct _service_adaptor_plugin_s
-{
+typedef struct _service_adaptor_plugin_s {
        char *name;                             /**< specifies status as none*/
        bool login;                             /**< specifies status as none*/
 } service_adaptor_plugin_s;
@@ -110,13 +106,13 @@ typedef service_adaptor_plugin_s *service_adaptor_plugin_h;
 * @pre service_adaptor_connect() will invoke this callback.
 * @see
 */
-typedef void(* service_adaptor_signal_cb)(service_adaptor_h handle,
+typedef void(*service_adaptor_signal_cb)(service_adaptor_h handle,
                                                service_adaptor_signal_code_e signal,
                                                char *msg);
 
 
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 
index 294e484c57f49539a636e6f5e77af226dffc9874..2ce21756be8aa3c679a992282a546911f068878d 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define sac_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, sac_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+       if (expr) { \
+               LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, sac_gettid());    \
+               return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, sac_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,sac_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,sac_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,sac_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define sac_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, sac_gettid(), ##arg);     \
+       } while (0)
 
 #define sac_api_start()        do { \
                        sac_info("API start <%s>", __FUNCTION__); \
@@ -158,10 +158,10 @@ extern "C"
                        sac_info("API end <%s> : %d", __FUNCTION__, (int)ret); \
                } while (0)
 
-#define FUNC_START()   do{sac_debug_func(FONT_COLOR_BOLDBLACK">>>>>>>> Start\n%s"FONT_COLOR_RESET, __FUNCTION__);}while(0)
-#define FUNC_STEP()    do{sac_debug_func(FONT_COLOR_BOLDBLACK"====== Step\n%s"FONT_COLOR_RESET, __FUNCTION__);}while(0)
-#define FUNC_STOP()    do{sac_debug_func(FONT_COLOR_BOLDBLACK"<<==<<== Stop\n%s"FONT_COLOR_RESET, __FUNCTION__);}while(0)
-#define FUNC_END()     do{sac_debug_func(FONT_COLOR_BOLDBLACK"<<<<<<<< End\n%s"FONT_COLOR_RESET, __FUNCTION__);}while(0)
+#define FUNC_START()   do { sac_debug_func(FONT_COLOR_BOLDBLACK">>>>>>>> Start\n%s"FONT_COLOR_RESET, __FUNCTION__); } while (0)
+#define FUNC_STEP()    do { sac_debug_func(FONT_COLOR_BOLDBLACK"====== Step\n%s"FONT_COLOR_RESET, __FUNCTION__); } while (0)
+#define FUNC_STOP()    do { sac_debug_func(FONT_COLOR_BOLDBLACK"<<==<<== Stop\n%s"FONT_COLOR_RESET, __FUNCTION__); } while (0)
+#define FUNC_END()     do { sac_debug_func(FONT_COLOR_BOLDBLACK"<<<<<<<< End\n%s"FONT_COLOR_RESET, __FUNCTION__); } while (0)
 
 
 #ifdef __cplusplus
index bfe1572dc7f8f9e02c4107c951acf346a7aa57f5..6dff9e892c7fbc13cccb96b594426655c826c759 100644 (file)
@@ -31,9 +31,9 @@
        #define DLL_LOCAL
 #else
        #if __GNUC__ >= 4
-               #define DLL_IMPORT __attribute__ ((visibility ("default")))
-               #define DLL_EXPORT __attribute__ ((visibility ("default")))
-               #define DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+               #define DLL_IMPORT __attribute__ ((visibility("default")))
+               #define DLL_EXPORT __attribute__ ((visibility("default")))
+               #define DLL_LOCAL  __attribute__ ((visibility("hidden")))
        #else
                #define DLL_IMPORT
                #define DLL_EXPORT
 /**
 * @brief Describes infromation about Service Adaptor
 */
-struct _service_adaptor_s
-{
+struct _service_adaptor_s {
        void *on_signal;
 
-//     struct _service_plugin_s **plugins; //TODO
-//     int plugin_count;       // TODO
+/*     struct _service_plugin_s **plugins;  */
+/*     int plugin_count;       /* TODO */
 
-/////////////////////// private feature
+/*  private feature start */
        char *service_name;                     /**< specifies status as none*/
        char *user_id;                          /**< specifies status as none*/
        char *app_id;                           /**< specifies status as none*/
@@ -77,23 +76,20 @@ struct _service_adaptor_s
        GMutex set_auth_mutex;
 
        service_adaptor_plugin_s *plugin;       /**< specifies status as none*/
-/////////////////////// private feature
+/* private feature end */
 };
 
-typedef struct _plugin_entry_s
-{
+typedef struct _plugin_entry_s {
        char *plugin_uri;
        int installed_mask;
-}plugin_entry_t;
+} plugin_entry_t;
 
-typedef enum _client_app_type_e
-{
+typedef enum _client_app_type_e {
        CLIENT_APP_TYPE_APPLICATION = 1,
        CLIENT_APP_TYPE_ETC = 0,
-}client_app_type_e;
+} client_app_type_e;
 
-struct _service_plugin_s
-{
+struct _service_plugin_s {
        struct _service_adaptor_s *adaptor;
 
        char *service_handle_name;
@@ -131,7 +127,7 @@ typedef struct _service_adaptor_s service_adaptor_s;
 
 typedef struct _service_plugin_s service_plugin_s;
 
-void _service_adaptor_set_last_result (int code, const char *message);
+void _service_adaptor_set_last_result(int code, const char *message);
 
 #define service_adaptor_set_last_result(code, msg)     do { \
                                                                sac_error("Error occured (%d)(%s)", (int)(code), (msg)); \
index f6fa6434cf47f477962eab41816e98ff9934e99b..e866d1caf8c6a9ee91fa5a526bb79719c98cb899 100644 (file)
@@ -41,9 +41,8 @@ extern "C" {
 /**
  * Storage adaptor content type
  */
-typedef enum _service_storage_file_content_type_e
-{
-       SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_DEFAULT               = -1,    // initalize value
+typedef enum _service_storage_file_content_type_e {
+       SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_DEFAULT               = -1,    /* initalize value */
 
        SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_IMGAE                 = 160,
        SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_VIDEO                 = 161,
@@ -66,8 +65,7 @@ typedef enum _service_storage_file_content_type_e
        SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_METADATA              = 2048,
 } service_storage_content_type_e;
 
-typedef struct _service_storage_media_meta_s
-{
+typedef struct _service_storage_media_meta_s {
        char *mime_type;
        char *title;
        char *album;
@@ -88,8 +86,7 @@ typedef struct _service_storage_media_meta_s
        char *extra_media_meta;
 } service_storage_media_meta_s;
 
-typedef struct _service_storage_cloud_meta_s
-{
+typedef struct _service_storage_cloud_meta_s {
        char *service_name;
        unsigned long long usage_byte;
        unsigned long long quota_byte;
@@ -99,8 +96,7 @@ typedef struct _service_storage_cloud_meta_s
 /**
 * @brief Describes file information description
 */
-struct _service_storage_file_s
-{
+struct _service_storage_file_s {
        char    *plugin_name;           /**< specifies plugin name generated file_info */
        char    *object_id;             /**< specifies file object id be used in storage */
        char    *storage_path;          /**< specifies file path in storage */
index af3ab76b3b8f8da82e032c9e91af51c3a8540b50..37417df48385f103904a1f621401c3953ad8aa8b 100644 (file)
@@ -28,40 +28,38 @@ extern "C" {
 #define TASK_MESSAGE_FORWARD_UNREAD_MESSAGE    -101
 #define TASK_MESSAGE_CHANNEL_DISCONNECTED_MESSAGE      -102
 
-///////////////// private feature
+/* private feature start */
 #define PRIVATE_SIGNAL_FILE_PROGRESS_ID                        11000
 #define PRIVATE_SIGNAL_FILE_TRANSFER_COMPLETION_ID     11001
-///////////////// private feature
+/* private feature end */
 
 #define SIGNAL_STORAGE_FILE_PROGRESS_ID                1000
 #define SIGNAL_STORAGE_FILE_STATE_CHANGED_ID   1001
 #define SIGNAL_SERVICE_ADAPTOR                 9000
 
-//////////////////////////////////////////////////////////////////////////////////
-///// Signal Task area
-//////////////////////
+/***************************************/
+/* Signal Task area start              */
+/***************************************/
 
-typedef struct _service_storage_task_s
-{
+typedef struct _service_storage_task_s {
        char *service_handle_name;
-       long long int task_id;  // file_uid (matched fd)
+       long long int task_id;  /* file_uid (matched fd) */
        void *param1;
        void *param2;
        void *param3;
 
-       int operation;          // 1: upload, 2: download, 3:thumbnail (TEMP)
+       int operation;          /* 1: upload, 2: download, 3:thumbnail (TEMP) */
        int state;
        service_storage_task_state_cb state_callback;
        void *state_user_data;
        service_storage_task_progress_cb progress_callback;
        void *progress_user_data;
-}service_storage_task_t;
+} service_storage_task_t;
 
 /**
 * @brief Describes infromation about task
 */
-typedef struct _service_adaptor_task_s
-{
+typedef struct _service_adaptor_task_s {
        int64_t id;                     /**< specifies status as none*/
        uint32_t callback;              /**< specifies status as none*/
        void *handle;                   /**< specifies status as none*/
@@ -72,8 +70,7 @@ typedef struct _service_adaptor_task_s
 * @brief Describes infromation about Service Adaptor's error
 * @remarks 'msg' is need free()
 */
-typedef struct _service_adaptor_error_s
-{
+typedef struct _service_adaptor_error_s {
        long long int code;                     /**< specifies status as none*/
        char *msg;                              /**< specifies status as none*/
 } service_adaptor_error_s;
@@ -124,29 +121,16 @@ int service_adaptor_check_handle_validate(service_adaptor_h handle);
 /**
  * @brief Enumerations of signal code for Service Adaptor
  */
-typedef enum _service_adaptor_signal_code_e
-{
+typedef enum _service_adaptor_signal_code_e {
        SERVICE_ADAPTOR_SIGNAL_INITIALIZED              = 1,    /* Service adaptor finished initalization */
        SERVICE_ADAPTOR_SIGNAL_NEW_PLUGIN               = 2,    /* New Plugins loaded in a running time */
        SERVICE_ADAPTOR_SIGNAL_ACTIVATE_PLUGIN          = 3,    /* Some Plugins be activated by policy or user atholization or etc */
        SERVICE_ADAPTOR_SIGNAL_SHUTDOWN                 = 4,    /* Service adaptor was shutdowned by unsuspected issue */
 } service_adaptor_signal_code_e;
 
-//////////////////////
-///// Signal Task area
-//////////////////////////////////////////////////////////////////////////////////
-
-
-//////////////////////////////////////////////////////////////////////////////////
-///// Storage Task area
-//////////////////////
-
-
-//////////////////////
-///// Storage Task area
-//////////////////////////////////////////////////////////////////////////////////
-
-
+/***************************************/
+/* Signal Task area end                */
+/***************************************/
 
 #ifdef __cplusplus
 }
index c613ff17e2d4efd067c87c747cdaa4a75022f027..86cfde71e790d36a5418c30cca217afcd207a560 100644 (file)
@@ -94,10 +94,10 @@ int _ipc_get_simple_result(GVariant *call_result, GError *g_error, service_adapt
 
 #define sac_check_param_null(val, val_name) {\
        if (NULL == (val)) {\
-               sac_error ("\"%s\" is NULL, return SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER(%d)", \
+               sac_error("\"%s\" is NULL, return SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER(%d)", \
                                (const char *)val_name, (int)SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER);\
                return SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;\
-       }\
+       } \
 }
 
 #ifdef __cplusplus
index da9027c1d2482da6ebdee12a05f6860cb35704b5..90a694c0e8959d3a3cd32948c6b4b8898a471cf7 100644 (file)
@@ -35,10 +35,9 @@ extern "C"
 /**
  * @brief Describes infromation about Plugin Handle
  */
-typedef struct _service_provider_s
-{
-       service_adaptor_error_e (*connect)(void);
-       service_adaptor_error_e (*disconnect)(void);
+typedef struct _service_provider_s {
+       service_adaptor_error_e(*connect)(void);
+       service_adaptor_error_e(*disconnect)(void);
 
        auth_provider_h auth_provider;
        storage_provider_h storage_provider;
index 809c32bec8287987c442db419d3565a42c85b84e..00863a8f895ab3d1af344204c0c83d2209e17faf 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -54,9 +54,9 @@ extern "C"
 {
 #endif /* __cplusplus */
 
-       /**
       *  Colors of font
       */
+/**
+ *  Colors of font
+ */
 #define FONT_COLOR_RESET      "\033[0m"
 #define FONT_COLOR_BLACK      "\033[30m"             /* Black */
 #define FONT_COLOR_RED        "\033[31m"             /* Red */
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define LSP_LOG_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, LSP_LOG_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, LSP_LOG_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,LSP_LOG_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,LSP_LOG_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,LSP_LOG_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define LSP_LOG_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, LSP_LOG_gettid(), ##arg);     \
+       } while (0)
 
 #ifdef __cplusplus
 }
index 339a310ee51285c92801ae29934fefa6b03c254d..664dc5a77a1aa4a433c572e3c3f66027eb8dfb1d 100644 (file)
@@ -36,100 +36,100 @@ extern "C" {
 
 #include "pluginConfigTypes.h"
 
-    /**
-     * @brief ...
-     **/
-    typedef void *ConfigHandle;
-
-    /**
-     * @brief General-purpose, class for loading and reading configuration from
-     * simple plaintext files.
-     **/
-
-    /**
-     * @brief Creates a new empty Config object and returns an opaque "handle"
-     *
-     * @return ConfigHandle an opaque pointer to Config object.
-     **/
-       API
-    ConfigHandle plugin_config_create();
-
-    /**
-     * @brief Destroy config object
-     *
-     * @param config_handle an opaque pointer to Config object
-     * @return void
-     **/
-       API
-    void plugin_config_delete(ConfigHandle config_handle);
-
-    /**
-    * @brief Loads the configuration from given file to memory.
-    *
-    * @param config_handle an opaque pointer to Config object
-    * @param filepath configuration will be _loaded from given filepath
-    * @param type expected type of configuration file, this value determines how
-    * the file is parsed
-    * @return void
-    **/
-       API
-    void plugin_config_load(ConfigHandle config_handle, const char *filepath, PluginConfigType type);
-
-    /**
-    * @brief Unloads the configuration from the memory.
-    *
-    * The configuration is automatically un_loaded when the program is exitting,
-    * so this method does not have to be executed unless you need to extremely
-    * lower memory usage and few bytes matter.
-    *
-    * @param config_handle an opaque pointer to Config object
-    * @return void
-    **/
-       API
-    void plugin_config_unload(ConfigHandle config_handle);
-
-    /**
-    * @brief From _loaded configuration, gets string value attached to given key.
-    *
-    * @param config_handle an opaque pointer to Config object
-    * @param section will return value attached to a key from this section
-    * @param key will return value attached to this key
-    * @return :string
-    **/
-       API
-    const char *plugin_config_get_string(ConfigHandle config_handle, const char *section, const char *key);
-
-    /**
-    * @brief From _loaded configuration, gets integer value attached to given key.
-    *
-    * @param config_handle an opaque pointer to Config object
-    * @param section will return value attached to a key from this section
-    * @param key will return value attached to this key
-    * @return int
-    **/
-       API
-    int plugin_config_get_int(ConfigHandle config_handle, const char *section, const char *key);
-
-    /**
-    * @brief From _loaded configuration, gets double value attached to given key.
-    *
-    * @param config_handle an opaque pointer to Config object
-    * @param section will return value attached to a key from this section
-    * @param key will return value attached to this key
-    * @return double
-    **/
-       API
-    double plugin_config_get_double(ConfigHandle config_handle, const char *section, const char *key);
-
-    /**
-     * @brief Checks wheteher config file has been loaded.
-     *
-     * @param config_handle an opaque pointer to Config object
-     * @return 0 if config is not loaded
-     *         1 if config is loaded
-     **/
-       API
-    bool plugin_config_is_loaded(ConfigHandle config_handle);
+/**
+* @brief ...
+**/
+typedef void *ConfigHandle;
+
+/**
+* @brief General-purpose, class for loading and reading configuration from
+* simple plaintext files.
+**/
+
+/**
+* @brief Creates a new empty Config object and returns an opaque "handle"
+*
+* @return ConfigHandle an opaque pointer to Config object.
+**/
+API
+ConfigHandle plugin_config_create();
+
+/**
+* @brief Destroy config object
+*
+* @param config_handle an opaque pointer to Config object
+* @return void
+**/
+API
+void plugin_config_delete(ConfigHandle config_handle);
+
+/**
+* @brief Loads the configuration from given file to memory.
+*
+* @param config_handle an opaque pointer to Config object
+* @param filepath configuration will be _loaded from given filepath
+* @param type expected type of configuration file, this value determines how
+* the file is parsed
+* @return void
+**/
+API
+void plugin_config_load(ConfigHandle config_handle, const char *filepath, PluginConfigType type);
+
+/**
+* @brief Unloads the configuration from the memory.
+*
+* The configuration is automatically un_loaded when the program is exitting,
+* so this method does not have to be executed unless you need to extremely
+* lower memory usage and few bytes matter.
+*
+* @param config_handle an opaque pointer to Config object
+* @return void
+**/
+API
+void plugin_config_unload(ConfigHandle config_handle);
+
+/**
+* @brief From _loaded configuration, gets string value attached to given key.
+*
+* @param config_handle an opaque pointer to Config object
+* @param section will return value attached to a key from this section
+* @param key will return value attached to this key
+* @return :string
+**/
+API
+const char *plugin_config_get_string(ConfigHandle config_handle, const char *section, const char *key);
+
+/**
+* @brief From _loaded configuration, gets integer value attached to given key.
+*
+* @param config_handle an opaque pointer to Config object
+* @param section will return value attached to a key from this section
+* @param key will return value attached to this key
+* @return int
+**/
+API
+int plugin_config_get_int(ConfigHandle config_handle, const char *section, const char *key);
+
+/**
+* @brief From _loaded configuration, gets double value attached to given key.
+*
+* @param config_handle an opaque pointer to Config object
+* @param section will return value attached to a key from this section
+* @param key will return value attached to this key
+* @return double
+**/
+API
+double plugin_config_get_double(ConfigHandle config_handle, const char *section, const char *key);
+
+/**
+* @brief Checks wheteher config file has been loaded.
+*
+* @param config_handle an opaque pointer to Config object
+* @return 0 if config is not loaded
+*         1 if config is loaded
+**/
+API
+bool plugin_config_is_loaded(ConfigHandle config_handle);
 
 #ifdef __cplusplus
 }
index ed837cafa0128290c5b03b62f23b84b00f4ec413..4490194cb499787e7210d6518acac0699e516852 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,7 +86,7 @@ extern "C"
         *  @param[out] val  Value to be returned when expression is true
         */
 #define plugin_config_retv_if(expr, val) do { \
-       if(expr) { \
+       if (expr) { \
                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, plugin_config_gettid());    \
                return (val); \
        } \
@@ -107,7 +107,7 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define plugin_config_info(fmt, arg...) do { \
-       LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, plugin_config_gettid() ,##arg);     \
+       LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, plugin_config_gettid()##arg);     \
 } while (0)
 
 /**
index 49f01d2e4c594d90556731667dd178efb8b5288a..6e11b1c169b49af9ae5aa2e5a44fcb9c1d2f73e3 100644 (file)
 /**
  * @brief Types of supported configuration files.
  **/
-typedef enum PluginConfigType
-{
-    /**
-    * @brief INI file format, as defined here: https://en.wikipedia.org/wiki/INI_file#Format
-    **/
-    CCT_INI = 1,
+typedef enum PluginConfigType {
+       /**
+       * @brief INI file format, as defined here: https://en.wikipedia.org/wiki/INI_file#Format
+       **/
+       CCT_INI = 1,
 
-    /**
-    * @brief Git config file format, as defined here:
-    **/
-    CCT_GIT = 1 << 1,
+       /**
+       * @brief Git config file format, as defined here:
+       **/
+       CCT_GIT = 1 << 1,
 
-    /**
-    * @brief Three column CSV file, columns are: section, key, value.
-    * They are separated with commas.
-    **/
-    CCT_CSV_COMMA = 1 << 2,
+       /**
+       * @brief Three column CSV file, columns are: section, key, value.
+       * They are separated with commas.
+       **/
+       CCT_CSV_COMMA = 1 << 2,
 
-    /**
-    * @brief Three column CSV file, columns are: section, key, value.
-    * They are separated with tabs.
-    **/
-    CCT_CSV_TAB = 1 << 3,
+       /**
+       * @brief Three column CSV file, columns are: section, key, value.
+       * They are separated with tabs.
+       **/
+       CCT_CSV_TAB = 1 << 3,
 
-    /**
-    * @brief Three column CSV file, columns are: section, key, value.
-    * They are separated with colons.
-    **/
-    CCT_CSV_COLON = 1 << 4,
+       /**
+       * @brief Three column CSV file, columns are: section, key, value.
+       * They are separated with colons.
+       **/
+       CCT_CSV_COLON = 1 << 4,
 
-    /**
-    * @brief Three column CSV file, columns are: section, key, value.
-    * They are separated with semicolons.
-    **/
-    CCT_CSV_SEMICOLON = 1 << 5,
+       /**
+       * @brief Three column CSV file, columns are: section, key, value.
+       * They are separated with semicolons.
+       **/
+       CCT_CSV_SEMICOLON = 1 << 5,
 
-    /**
-    * @brief As the name suggessts.
-    **/
-    CCT_INVALID = 0
+       /**
+       * @brief As the name suggessts.
+       **/
+       CCT_INVALID = 0
 } PluginConfigType;
 
 #endif /* PLUGIN_CONFIG_TYPES */
index 332ef387beb2d2bcedfd4ff037869e1b26d9379b..89e8206c1c02d14f4b4359aaad2ebefff36f9716 100644 (file)
@@ -29,8 +29,7 @@ extern "C"
 {
 #endif
 
-typedef enum
-{
+typedef enum {
        PLUGIN_MESSAGE_TYPE_FUNCTION = 1,
        PLUGIN_MESSAGE_TYPE_CALLBACK = 2,
 } plugin_message_type_e;
@@ -40,7 +39,7 @@ typedef enum
 #define        PLUGIN_DATA_TYPE_LONG           'l'
 */
 
-// INT/LONG -> NUM (64bit)
+/* INT/LONG -> NUM (64bit) */
 #define PLUGIN_DATA_TYPE_NUM           'n'
 #define        PLUGIN_DATA_TYPE_STRING         's'
 #define        PLUGIN_DATA_TYPE_BOOL           'b'
@@ -51,8 +50,7 @@ typedef char plugin_data_type;
 
 
 /*
-typedef enum
-{
+typedef enum {
        PM_TYPE_FALSE = 0,
        PM_TYPE_TRUE = 1,
 } pmbool_type_e;
@@ -62,8 +60,7 @@ typedef long long int pmnumber;
 typedef char *pmstring;
 typedef bool pmbool;
 
-typedef enum
-{
+typedef enum {
        PLUGIN_MESSAGE_ELEMENT_CONTEXT_ID,
        PLUGIN_MESSAGE_ELEMENT_FUNCTION_NAME,
        PLUGIN_MESSAGE_ELEMENT_PARAMETER_MANDATORY,
index f0c27acb7625a99b58ac545ee7d896342d05796e..17edea708552a2ab910714c52cd60f94a44f6308 100644 (file)
  * <br>Service adaptor provides functions kind of Auth, Storage and it will provides more kinds of service infra.
  * <table>
  * <tr>
- *     <th>API</th>
+ *     <th>API</th>
  *     <th>Description</th>
  * </tr>
  * <tr>
- *     <td>@ref SERVICE_PLUGIN_MODULE</td>
+ *     <td>@ref SERVICE_PLUGIN_MODULE</td>
  *     <td> Provide functions for handling service plugin</td>
  * </tr>
  * </table>
index a9a0485d9ba02d5ef239515f5f5f6e1d1ae88196..103579eb0778c4839ea29e134e15a7b131852bc2 100644 (file)
  * <br>It means kind of plugin set, the APIs can set property for using service and handling service plugin.
  * <table>
  * <tr>
- *     <th>API</th>
+ *     <th>API</th>
  *     <th>Description</th>
  * </tr>
  * <tr>
- *     <td>@ref SERVICE_ADAPTOR_STORAGE_MODULE</td>
+ *     <td>@ref SERVICE_ADAPTOR_STORAGE_MODULE</td>
  *     <td> Provide functions for access and manage storage service</td>
  * </tr>
  * </table>
index 8d1c7a31599ef9010bd1601224304f454eaf2746..db75d23547ea28b866283596a14d339bd80ae975 100644 (file)
@@ -22,9 +22,9 @@
  * @ingroup    SERVICE_PLUGIN_MODULE
  * @defgroup   SERVICE_ADAPTOR_STORAGE_MODULE Storage
  * @brief      Provide functions for access and managing storage service
- * @section    SERVICE_ADAPTOR_STORAGE_MODULE_HEADER Require Header
+ * @section    SERVICE_ADAPTOR_STORAGE_MODULE_HEADER Require Header
  * \#include <service_adaptor_client.h>
- * @section    SERVICE_ADAPTOR_STORAGE_MODULE_OVERVIEW Overview
+ * @section    SERVICE_ADAPTOR_STORAGE_MODULE_OVERVIEW Overview
  * It privides common APIs for using various service infra
  * <div>
  * In this APIs, there are needed two kind of path types.
index ef1934a0e80498f48386f63f635d035a8a67ee6a..f9b91f2ddd148e08d5d3fae645315e7264a72d4b 100644 (file)
@@ -44,8 +44,7 @@ extern "C" {
 /**
  * @brief Enumerations of result code for Service Adaptor
  */
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_ERROR_NONE                      = TIZEN_ERROR_NONE,                     /**< Success */
        SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED             = TIZEN_ERROR_NOT_SUPPORTED,            /**< Service plugin does not support API */
        SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER         = TIZEN_ERROR_INVALID_PARAMETER,        /**< The parameter is invalid */
@@ -57,7 +56,7 @@ typedef enum
        SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED             = TIZEN_ERROR_SERVICE_ADAPTOR | 0x02,   /**< The error occured from Plugin, See detail from service_adaptor_get_last_result() and Plugin SPEC */
        SERVICE_ADAPTOR_ERROR_NOT_AUTHORIZED            = TIZEN_ERROR_SERVICE_ADAPTOR | 0x03,   /**< Need Authorization */
        SERVICE_ADAPTOR_ERROR_INVALID_STATE             = TIZEN_ERROR_SERVICE_ADAPTOR | 0x04,   /**< The handle state is invalid for processing API */
-}service_adaptor_error_e;
+} service_adaptor_error_e;
 
 /**
 * @brief The handle for connection and managing plugin handle of Service Adaptor
@@ -88,7 +87,7 @@ typedef bool (*service_adaptor_plugin_cb)(char *plugin_uri,
                                                int service_mask,
                                                void *user_data);
 /*==================================================================================================
-                                         FUNCTION PROTOTYPES
+                                       FUNCTION PROTOTYPES
 ==================================================================================================*/
 
 /**
index 976386310be115093b96b1e01aa963063368a42e..9019ce7abdebeeacb41d853372f991e5181d3590 100644 (file)
@@ -30,11 +30,10 @@ extern "C" {
 /**
  * @brief Type of service in plugin
  */
-typedef enum
-{
+typedef enum {
        SERVICE_PLUGIN_SERVICE_AUTH     = (0x01 << 0),          /**< Auth service type flag */
        SERVICE_PLUGIN_SERVICE_STORAGE  = (0x01 << 1),          /**< Storage service type flag */
-}service_plugin_service_type_e;
+} service_plugin_service_type_e;
 
 /**
 * @brief Definition for the service_plugin property: The application id be issued from service provider for 3rd party developer.
index 56894814cb132ced5f3964bb3cba4774733e679e..126cce69b62be1943126c89dd7b6928481809b9d 100644 (file)
@@ -70,8 +70,7 @@ typedef struct _service_storage_file_list_s *service_storage_file_list_h;
 /**
  * @brief Type of storage task
  */
-typedef enum
-{
+typedef enum {
        SERVICE_STORAGE_TASK_IN_PROGRESS        = 1,    /**< The task is progressing */
        SERVICE_STORAGE_TASK_COMPLETED          = 2,    /**< The task was completed */
        SERVICE_STORAGE_TASK_CANCELED           = 3,    /**< The task was canceled */
@@ -331,7 +330,7 @@ int service_storage_create_download_task(service_plugin_h plugin,
 * @retval #SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
 * @pre API prerequires #service_plugin_start()
 */
-int service_storage_create_download_thumbnail_task (service_plugin_h plugin,
+int service_storage_create_download_thumbnail_task(service_plugin_h plugin,
                                                const char *storage_path,
                                                const char *download_path,
                                                int thumbnail_size,
index b4d4c4067ba47607bd90402ece496cedf46a98e8..5e57dbeb5d1b7ee3c98e9802224fa70915514b3b 100644 (file)
@@ -34,4 +34,3 @@ int dbus_ipc_server_layer_init();
 void dbus_ipc_server_layer_deinit();
 
 #endif /* __DBUS_IPC_H__ */
-// EOF
index 9b1e84965d050dc2ae8e09b1890d00de2a1e4cb5..504d26ec3d1c11938ce5a77b951bbd7ab931fe71 100644 (file)
@@ -30,14 +30,14 @@ void push_adaptor_method_call(GDBusConnection *connection,
                                                gpointer user_data);
 
 void dbus_send_to_push_with_activation(int bus_type,
-                                                const char *bus_name,
-                                                const char *object_path,
-                                                const char *interface,
-                                                const char *method,
-                                                void **proxy,
-                                                long long int timestamp,
-                                                const char *data,
-                                                const char *message);
+                                               const char *bus_name,
+                                               const char *object_path,
+                                               const char *interface,
+                                               const char *method,
+                                               void **proxy,
+                                               long long int timestamp,
+                                               const char *data,
+                                               const char *message);
 
 #endif /* __DBUS_PUSH_ADAPTOR_H__ */
 
index b9b70b1333e5a0900f06f350619eae7b343379c1..655d8744cea0f1fdb80facbda69c4e58a289e3af 100644 (file)
  */
 #define SERVICE_ADAPTOR_START_KEY_PATH         tzplatform_mkpath(TZ_SYS_SHARE, "/service-adaptor/.fingerprint")
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               private feature
-///////////////////
-
+/***********************************************************************/
+/*                                private feature                      */
 #define private_service_adaptor_essential_s_type_length 1
 #define private_service_adaptor_essential_s_type \
        "(" \
        "s" /* char *service_file_name */ \
        ")"
 
-///////////////////
-///////////////////               private feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               public feature
-///////////////////
+/*                                private feature                      */
+/***********************************************************************/
 
+/***********************************************************************/
+/*                                public feature                       */
 
 #define service_adaptor_essential_s_type_length 1
 #define service_adaptor_essential_s_type \
        "s" /* char * service_name */ \
        service_adaptor_file_descriptor_s_type \
        ")"
-// jwkim async5
 #define service_adaptor_start_upload_file_req_s_type_length 5
 #define service_adaptor_start_upload_file_req_s_type \
        "(" \
        "x" /* int64 time_stamp */ \
        ")"
 
-///////////////////
-///////////////////               public feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                public feature                       */
+/***********************************************************************/
 
+/***********************************************************************/
+/*                                private feature                      */
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               private feature
-///////////////////
 
 /**
  * array of structures
 #define private_message_inbox_message_list_type                "a" private_service_adaptor_inbox_message_s_type
 
 
-///////////////////
-///////////////////               private feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                private feature                      */
+/***********************************************************************/
+
+/***********************************************************************/
+/*                                public feature                       */
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               public feature
-///////////////////
 
 
 #define plugin_list_type                       "a" service_adaptor_plugin_s_type
 #define storage_file_info_list_type            "a" service_adaptor_file_info_s_type
 
-///////////////////
-///////////////////               public feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                public feature                       */
+/***********************************************************************/
+
+/***********************************************************************/
+/*                                common                               */
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               common
-///////////////////
 
 
 /**
  * DBus APIs
  */
 #define DBUS_SERVICE_ADAPTOR   "dbus_00"
-#define DBUS_AUTH_ADAPTOR      "dbus_01"
-#define DBUS_CONTACT_ADAPTOR   "dbus_02"
-#define DBUS_MESSAGE_ADAPTOR   "dbus_03"
-#define DBUS_DISCOVERY_ADAPTOR         "dbus_04"
-#define DBUS_SHOP_ADAPTOR      "dbus_05"
-#define DBUS_STORAGE_ADAPTOR   "dbus_06"
-#define DBUS_PUSH_ADAPTOR      "dbus_07"
+#define DBUS_AUTH_ADAPTOR      "dbus_01"
+#define DBUS_CONTACT_ADAPTOR   "dbus_02"
+#define DBUS_MESSAGE_ADAPTOR   "dbus_03"
+#define DBUS_DISCOVERY_ADAPTOR "dbus_04"
+#define DBUS_SHOP_ADAPTOR      "dbus_05"
+#define DBUS_STORAGE_ADAPTOR   "dbus_06"
+#define DBUS_PUSH_ADAPTOR      "dbus_07"
 #define DBUS_NAME_LENGTH       7
 
 
-///////////////////
-///////////////////               common
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                common                               */
+/***********************************************************************/
+
+/***********************************************************************/
+/*                                private feature                      */
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               private feature
-///////////////////
 
 
 #define PRIVATE_DBUS_CONNECT_SERVICE_ADAPTOR_METHOD            DBUS_SERVICE_ADAPTOR "_private""_connect_service_adaptor"
 #define PRIVATE_DBUS_SERVICE_ADAPTOR_SIGNAL                    DBUS_SERVICE_ADAPTOR "_private" "_service_adaptor_signal"
 
 
-///////////////////
-///////////////////               private feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                private feature                      */
+/***********************************************************************/
+
+/***********************************************************************/
+/*                                public feature                       */
 
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               public feature
-///////////////////
 
 #define DBUS_CONNECT_SERVICE_ADAPTOR_METHOD            DBUS_SERVICE_ADAPTOR "_connect_service_adaptor"
 #define DBUS_DISCONNECT_SERVICE_ADAPTOR_METHOD         DBUS_SERVICE_ADAPTOR "_disconnect_service_adaptor"
 #define SERVICE_ADAPTOR_FILE_TRANSFER_STATE_CANCELED 3
 #define SERVICE_ADAPTOR_FILE_TRANSFER_STATE_FAILED 4
 
+/*                                public feature                       */
+/***********************************************************************/
 
-///////////////////
-///////////////////               public feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-///////////////////
-///////////////////               private feature
-///////////////////
+/***********************************************************************/
+/*                                private feature                      */
 
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_PROTOCOL_RETURN_CODE_NONE                       = 0,
        SERVICE_ADAPTOR_PROTOCOL_RETURN_CODE_COMMON_NO_DATA             = 101,
        SERVICE_ADAPTOR_PROTOCOL_RETURN_CODE_COMMON_TIMED_OUT           = 102,
@@ -1314,8 +1267,7 @@ typedef enum
        SERVICE_ADAPTOR_PROTOCOL_RETURN_CODE_MESSAGE_NETWORK            = 601,
 } service_adaptor_protocol_return_code_e;
 
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_PROTOCOL_SERVICE_TYPE_AUTH              = (0x01 << 0),
        SERVICE_ADAPTOR_PROTOCOL_SERVICE_TYPE_STORAGE           = (0x01 << 1),
        SERVICE_ADAPTOR_PROTOCOL_SERVICE_TYPE_CONTACT           = (0x01 << 2),
@@ -1324,10 +1276,7 @@ typedef enum
        SERVICE_ADAPTOR_PROTOCOL_SERVICE_TYPE_PUSH              = (0x01 << 5),
 } service_adaptor_protocol_service_type_e;
 
-///////////////////
-///////////////////               private feature
-///////////////////
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
+/*                                private feature                       */
+/***********************************************************************/
 
 #endif /* __DBUS_SERVER_H__ */
index 3e6fafb32617b4107d3badb0781edeba437a498b..78f2b08293a3081d90e3310a6320212b5c4567ee 100644 (file)
@@ -26,7 +26,7 @@ void storage_adaptor_method_call(GDBusConnection *connection,
                                                GDBusMethodInvocation *invocation,
                                                gpointer user_data);
 
-// private feature
+/* private feature */
 service_adaptor_internal_error_code_e private_dbus_storage_file_progress_callback(int32_t fd,
                                                uint64_t progress_size,
                                                uint64_t total_size,
@@ -38,7 +38,7 @@ service_adaptor_internal_error_code_e private_dbus_storage_file_transfer_complet
                                                storage_adaptor_error_code_h error_code,
                                                void *server_data);
 
-// public feature
+/* public feature */
 service_adaptor_internal_error_code_e dbus_storage_file_progress_callback(long long int file_uid,
                                                unsigned long long progress_size,
                                                unsigned long long total_size);
index 6670f78b72bd0fdd76486707dfa86163aaa96c7e..56a3ad7243182dbfedb7e6e1abe180f35d01929e 100644 (file)
@@ -20,7 +20,7 @@
 #include <glib.h>
 #include <gio/gio.h>
 
-#define __safe_add_string(x)   (x==NULL)?"":x
+#define __safe_add_string(x)   (x == NULL) ? "" : x
 
 void free_string(gpointer data);
 void safe_g_variant_builder_add_string(GVariantBuilder *builder, const char *data);
index af87d086fd47cb1e60f27d135e566dcea801d916..77b91fee7a667b9f3dcee9f9a0c7f12450bedb7c 100644 (file)
@@ -36,7 +36,7 @@
 
 /* These defines must be located before #include <dlog.h> */
 #define TIZEN_ENGINEER_MODE
-// TODO: Investigate why this macro is defined somewhere else
+/* TODO: Investigate why this macro is defined somewhere else */
 #ifndef TIZEN_DEBUG_ENABLE
 #define TIZEN_DEBUG_ENABLE
 #endif
@@ -86,11 +86,11 @@ extern "C"
  *  @param[out] val  Value to be returned when expression is true
  */
 #define service_adaptor_retv_if(expr, val) do { \
-            if(expr) { \
-                LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, service_adaptor_gettid());    \
-                return (val); \
-            } \
-        } while (0)
+               if (expr) { \
+                       LOGE(FONT_COLOR_PURPLE"[%d]"FONT_COLOR_RESET, service_adaptor_gettid());    \
+                       return (val); \
+               } \
+       } while (0)
 
 /**
  * @brief Prints debug messages
@@ -98,8 +98,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_debug(fmt, arg...) do { \
-            LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_GREEN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints info messages
@@ -107,8 +107,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_info(fmt, arg...) do { \
-            LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid() ,##arg);     \
-        } while (0)
+               LOGI(FONT_COLOR_BLUE"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints warning messages
@@ -116,8 +116,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_warning(fmt, arg...) do { \
-            LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET,service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGW(FONT_COLOR_YELLOW"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints error messages
@@ -125,8 +125,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_error(fmt, arg...) do { \
-            LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET,service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGE(FONT_COLOR_RED"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints fatal messages
@@ -134,8 +134,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_fatal(fmt, arg...) do { \
-            LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET,service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGF(FONT_COLOR_BOLDRED"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -143,8 +143,8 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_debug_func(fmt, arg...) do { \
-            LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
 /**
  * @brief Prints debug message on entry to particular function
@@ -152,12 +152,12 @@ extern "C"
  * @param[in]  args Arguments to be displayed
  */
 #define service_adaptor_debug_secure(fmt, arg...) do { \
-            SECURE_LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
-        } while (0)
+               SECURE_LOGD(FONT_COLOR_CYAN"[%d]"fmt""FONT_COLOR_RESET, service_adaptor_gettid(), ##arg);     \
+       } while (0)
 
-#define FUNC_START() do{service_adaptor_debug_func("\033[1m\033[32m""Start >>%s>>\n""\033[0m", __FUNCTION__);}while(0)
-#define FUNC_STEP() do{service_adaptor_debug_func("\033[1m\033[32m""Step logging >>%s<<\n""\033[0m", __FUNCTION__);}while(0)
-#define FUNC_END() do{service_adaptor_debug_func("\033[1m\033[36m""End <<%s<<\n""\033[0m", __FUNCTION__);}while(0)
+#define FUNC_START() do {service_adaptor_debug_func("\033[1m\033[32m""Start >>%s>>\n""\033[0m", __FUNCTION__); } while (0)
+#define FUNC_STEP() do {service_adaptor_debug_func("\033[1m\033[32m""Step logging >>%s<<\n""\033[0m", __FUNCTION__); } while (0)
+#define FUNC_END() do {service_adaptor_debug_func("\033[1m\033[36m""End <<%s<<\n""\033[0m", __FUNCTION__); } while (0)
 
 #ifdef __cplusplus
 }
index ace8744dd6efdf20784a1dc29c8bbbe65a5c0395..a787f5214d513a483c2cc9991a1f703ce822af9b 100644 (file)
@@ -20,9 +20,9 @@
 #include <tizen.h>
 #include "service-adaptor-type.h"
 
-// TODO It will be re-define another header
+/* TODO It will be re-define another header */
 #define SERVICE_ADAPTOR_3RD_PARTY_METADATA_KEY_VERSION "http://tizen.org/service-adaptor/version"
-#define SERVICE_ADAPTOR_3RD_PARTY_METADATA_KEY_AUTH            "http://tizen.org/service-adaptor/auth"
+#define SERVICE_ADAPTOR_3RD_PARTY_METADATA_KEY_AUTH    "http://tizen.org/service-adaptor/auth"
 #define SERVICE_ADAPTOR_3RD_PARTY_METADATA_KEY_STORAGE "http://tizen.org/service-adaptor/storage"
 
 
index c8884a85ba36b77652974c18b0d474b65fe8fe1b..e38e62c53f765a2d0b7dd7e263f82c28c740fb9d 100644 (file)
@@ -21,8 +21,7 @@
 #include "push-adaptor.h"
 
 
-typedef struct _push_activate_s
-{
+typedef struct _push_activate_s {
        /* service_file_name (unique) */
        char *file_name;
 
index bf8462f0218297c145529c0c71a6f705e2cb73fb..a4d165945a55d771d8d0db9f59c4c43d3731787c 100644 (file)
@@ -30,8 +30,7 @@
 
 #define SERVICE_ADAPTOR_OPERATION_PUSH_NOTI_TO_APPCONTROL "http://tizen.org/serviceadaptor/operation/v1/push"
 
-typedef struct _service_adaptor_context_info_s
-{
+typedef struct _service_adaptor_context_info_s {
        char *user_id;
        char *app_id;
        unsigned int service_id;
@@ -43,9 +42,8 @@ typedef struct _service_adaptor_context_info_s
        void *property;
 } service_adaptor_context_info_s;
 
-typedef struct _service_adaptor_service_context_s
-{
-       char *service_name;             // com.serviceadaptor.service1
+typedef struct _service_adaptor_service_context_s {
+       char *service_name;             /* com.serviceadaptor.service1 */
        char *plugin_uri;
 
        int authenticated;
@@ -66,8 +64,7 @@ typedef struct _service_adaptor_service_context_s
 } service_adaptor_service_context_s;
 typedef struct _service_adaptor_service_context_s *service_adaptor_service_context_h;
 
-typedef struct _service_adaptor_s
-{
+typedef struct _service_adaptor_s {
        int started;
 
        GMutex service_adaptor_mutex;
@@ -87,17 +84,17 @@ typedef struct _service_adaptor_s
        storage_adaptor_listener_h      storage_listener;
        push_adaptor_listener_h         push_listener;
 
-       GList *service_list;            // service_adaptor_service_context_h
+       GList *service_list;            /* service_adaptor_service_context_h */
 } service_adaptor_s;
 typedef struct _service_adaptor_s *service_adaptor_h;
 
-// Gets service adaptor handle
+/* Gets service adaptor handle */
 service_adaptor_h service_adaptor_get_handle();
 
 service_adaptor_internal_error_code_e service_adaptor_init();
 void service_adaptor_deinit();
 
-// Gets adaptor context
+/* Gets adaptor context */
 service_adaptor_service_context_h service_adaptor_get_service_context(service_adaptor_h service_adaptor,
                                                const char *service_name);
 
@@ -116,11 +113,11 @@ service_adaptor_internal_error_code_e service_adaptor_bind_push_context(service_
                                                service_adaptor_service_context_h service_src,
                                                service_adaptor_service_context_h service_dst);
 
-// Create / Destroy adaptors (Internal function)
+/* Create / Destroy adaptors (Internal function) */
 service_adaptor_h service_adaptor_create();
 void service_adaptor_destroy(service_adaptor_h service_adaptor);
 
-// Connects / Disconnects adaptors
+/* Connects / Disconnects adaptors */
 service_adaptor_internal_error_code_e service_adaptor_connect(service_adaptor_h service_adaptor,
                                                service_adaptor_context_info_s *context_info,
                                                const char *service_name,
@@ -153,15 +150,14 @@ int service_adaptor_is_service_binded(service_adaptor_h service_adaptor,
 void debug_service_context(GList *service_list);
 #endif
 
-typedef enum
-{
+typedef enum {
        SA_TIME_CHECK_FLAG_AUTH,
        SA_TIME_CHECK_FLAG_STORAGE,
        SA_TIME_CHECK_FLAG_CONTACT,
        SA_TIME_CHECK_FLAG_MESSAGE,
        SA_TIME_CHECK_FLAG_PUSH,
        SA_TIME_CHECK_FLAG_SHOP,
-}sa_time_check_flag_e;
+} sa_time_check_flag_e;
 
 void SERVICE_ADAPTOR_API_TIME_CHECK_START();
 void SERVICE_ADAPTOR_API_TIME_CHECK_PAUSE();
index d302a10e5246ee7a82157e0fabe75e43915f60f0..815d3a7fd8adfb7ef66666323ac5b21bd16c9152 100644 (file)
@@ -20,9 +20,8 @@
 #include <stdbool.h>
 #include <glib.h>
 
-typedef enum
-{
-        SERVICE_ADAPTOR_INTERNAL_ERROR_NONE                     =  0,
+typedef enum {
+       SERVICE_ADAPTOR_INTERNAL_ERROR_NONE                     = 0,
        SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH                    = 1,    /**< 1 ~ 99: internal error*/
        SERVICE_ADAPTOR_INTERNAL_ERROR_INIT                      = 2,
        SERVICE_ADAPTOR_INTERNAL_ERROR_DEINIT                    = 3,
@@ -46,12 +45,10 @@ typedef enum
        SERVICE_ADAPTOR_INTERNAL_ERROR_CALLBACK_TIME_OUT         = 21,
        SERVICE_ADAPTOR_INTERNAL_ERROR_INTERNAL_MAX              = 99,
        SERVICE_ADAPTOR_INTERNAL_ERROR_NO_DATA,
-        SERVICE_ADAPTOR_INTERNAL_ERROR_MAX
-
+       SERVICE_ADAPTOR_INTERNAL_ERROR_MAX
 } service_adaptor_internal_error_code_e;
 
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_INTERNAL_RESULT_SUCCEEDED               = 0,
        SERVICE_ADAPTOR_INTERNAL_RESULT_FAILED                  = -1,
        SERVICE_ADAPTOR_INTERNAL_RESULT_CANCELED                = -2,
@@ -59,29 +56,26 @@ typedef enum
 
 } service_adaptor_internal_result_e;
 
-typedef enum
-{
+typedef enum {
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_NONE                     = 0,    /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_INITIALIZED              = 1,    /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_NEW_PLUGIN               = 2,    /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_ACTIVATE_PLUGIN          = 3,    /**< specifies status as none*/
-       SERVICE_ADAPTOR_INTERNAL_SIGNAL_SHUTDOWN                 = 4,    /**< specifies status as none*/
+       SERVICE_ADAPTOR_INTERNAL_SIGNAL_SHUTDOWN                 = 4,    /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_OTHER                    = 99,   /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_UNKNOWN                  = 999,  /**< specifies status as none*/
        SERVICE_ADAPTOR_INTERNAL_SIGNAL_MAX,
 
 } service_adaptor_internal_signal_code_e;
 
-typedef struct service_adaptor_internal_error_s
-{
+typedef struct service_adaptor_internal_error_s {
        long long int code;
        char *msg;
 
 } service_adaptor_internal_error_t;
 typedef struct service_adaptor_internal_error_s *service_adaptor_internal_error_h;
 
-typedef struct service_adaptor_internal_plugin_s
-{
+typedef struct service_adaptor_internal_plugin_s {
        char *name;
        bool login;
 } service_adaptor_internal_plugin_t;
index 0de97881bfb61e4f81ecb4993a264d8211b526c5..7f1b3fafa6a471f10e81b2233b5004234ca09742 100644 (file)
@@ -17,8 +17,7 @@
 #ifndef __SERVICE_FILE_MANAGER_H__
 #define __SERVICE_FILE_MANAGER_H__
 
-typedef enum
-{
+typedef enum {
        SERVICE_FILE_DIRECTORY_AUTH     = (0x01 << 0),
        SERVICE_FILE_DIRECTORY_STORAGE  = (0x01 << 1),
        SERVICE_FILE_DIRECTORY_CONTACT  = (0x01 << 2),
@@ -30,8 +29,7 @@ typedef enum
        SERVICE_FILE_DIRECTORY_PLUGINS  = (0x01 << 10) & 0x02,
 } service_file_directory_e;
 
-typedef enum
-{
+typedef enum {
        SERVICE_FILE_SECTION_GENERAL    = 1,
        SERVICE_FILE_SECTION_PUSH       = 2,
        SERVICE_FILE_SECTION_BUS        = 3,