Adjust coding rules 78/64178/2 accepted/tizen/common/20160413.131004 accepted/tizen/ivi/20160413.123455 accepted/tizen/mobile/20160413.123234 accepted/tizen/tv/20160413.123407 accepted/tizen/wearable/20160413.123430 submit/tizen/20160412.075243
authorMyungki Lee <mk5004.lee@samsung.com>
Thu, 31 Mar 2016 03:01:59 +0000 (12:01 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Thu, 31 Mar 2016 03:01:59 +0000 (12:01 +0900)
Change-Id: Ia6d8cae6885ca7502f0ef70385edbedf44962523
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
lib/include/shortcut.h
lib/include/shortcut_manager.h
lib/src/shortcut_db.c
lib/src/shortcut_manager.c

index aad37b9..538579b 100755 (executable)
@@ -44,7 +44,7 @@ extern "C" {
  * @param[in] pid The process ID of who handle this add_to_home request
  * @param[in] data The callback data
  * @return int @c 0 if there is no error,
              otherwise errno
*     otherwise errno
  * @see add_to_home_shortcut()
  */
 typedef int (*result_internal_cb_t)(int ret, int pid, void *data);
@@ -76,7 +76,7 @@ enum shortcut_internal_type {
        DYNAMICBOX_TYPE_2x2       = 0x10040000, /**< 2x2 */
        DYNAMICBOX_TYPE_4x1       = 0x10080000, /**< 4x1 */
        DYNAMICBOX_TYPE_4x2       = 0x10100000, /**< 4x2 */
-       DYNAMICBOX_TYPE_4x3       = 0x10200000, /**< 4x3 */
+       DYNAMICBOX_TYPE_4x3       = 0x10200000, /**< 4x3 */
        DYNAMICBOX_TYPE_4x4       = 0x10400000, /**< 4x4 */
        DYNAMICBOX_TYPE_4x5       = 0x11000000, /**< 4x5 */
        DYNAMICBOX_TYPE_4x6       = 0x12000000, /**< 4x6 */
@@ -86,7 +86,7 @@ enum shortcut_internal_type {
        DYNAMICBOX_TYPE_UNKNOWN   = 0x1FFF0000, /**< Error */
 };
 
-#define SHORTCUT_ERROR (shortcut_error_quark ())
+#define SHORTCUT_ERROR (shortcut_error_quark())
 GQuark shortcut_error_quark(void);
 
 
index 388afb7..0e6ef1f 100755 (executable)
@@ -95,7 +95,7 @@ typedef enum shortcut_widget_size {
  *                otherwise it returns an errno
  * @param[in] data The callback data
  * @return int @c 0 if there is no error,
              otherwise errno
*     otherwise errno
  * @see shortcut_add_to_home()
  */
 typedef int (*result_cb_t)(int ret, void *data);
@@ -145,11 +145,11 @@ typedef int (*result_cb_t)(int ret, void *data);
  *
  * static int result_cb(int ret, int pid, void *data)
  * {
- *     if (ret < 0)
- *             dlog_print("Failed to add a shortcut: %s\n", perror(ret));
+ *     if (ret < 0)
+ *             dlog_print("Failed to add a shortcut: %s\n", perror(ret));
  *
  *     dlog_print("Processed by the %d\n", pid);
- *     return 0;
+ *     return 0;
  * }
  *
  * static int app_create(void *data)
@@ -159,14 +159,14 @@ typedef int (*result_cb_t)(int ret, void *data);
  *     char * path = malloc(path_len);
  *     memset(path, 0, path_len);
  *     strncat(path, data_path, path_len);
- *     strncat(path, "Friend.jpg", path_len); 
+ *     strncat(path, "Friend.jpg", path_len);
  *
- *     shortcut_add_to_home("With friends",
- *                                     LAUNCH_BY_URI, "gallery:0000-0000",
- *                                     path, 0, result_cb, NULL);
+ *     shortcut_add_to_home("With friends",
+ *                                     LAUNCH_BY_URI, "gallery:0000-0000",
+ *                                     path, 0, result_cb, NULL);
  *     free(path);
  *
- *     return 0;
+ *     return 0;
  * }
  *
  * @endcode
@@ -220,23 +220,23 @@ extern int shortcut_add_to_home(const char *name, shortcut_type type, const char
  *
  * static int result_cb(int ret, int pid, void *data)
  * {
- *     if (ret < 0)
- *             dlog_print("Failed to add a widget: %s\n", perror(ret));
+ *     if (ret < 0)
+ *             dlog_print("Failed to add a widget: %s\n", perror(ret));
  *
  *     dlog_print("Processed by the %d\n", pid);
- *     return 0;
+ *     return 0;
  * }
  *
  * static int app_create(void *data)
  * {
- *     char *image_root = NULL;
- *     char image_path[TIZEN_PATH_MAX] = {0, };
- *     storage_get_directory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES, &image_root);
- *     snprintf(image_path, TIZEN_PATH_MAX, "%s/alter_icon.png", image_root);
- *     shortcut_add_to_home_widget("alter_name",
- *                                     WIDGET_SIZE_1x1, "org.tizen.testwidget",
- *                                     image_path, -1.0f, 0, result_cb, NULL);
- *     return 0;
+ *     char *image_root = NULL;
+ *     char image_path[TIZEN_PATH_MAX] = {0, };
+ *     storage_get_directory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES, &image_root);
+ *     snprintf(image_path, TIZEN_PATH_MAX, "%s/alter_icon.png", image_root);
+ *     shortcut_add_to_home_widget("alter_name",
+ *                                     WIDGET_SIZE_1x1, "org.tizen.testwidget",
+ *                                     image_path, -1.0f, 0, result_cb, NULL);
+ *     return 0;
  * }
  *
  * @endcode
index 4385cc4..787abe1 100755 (executable)
@@ -8,7 +8,7 @@
 
 
 
-static sqlite3 * _open_db(void)
+static sqlite3 *_open_db(void)
 {
        int ret;
        const char *dbfile = DB_PATH;
@@ -23,7 +23,7 @@ static sqlite3 * _open_db(void)
        return db;
 }
 
-static int _close_db(sqlite3 ** db)
+static int _close_db(sqlite3 **db)
 {
        int ret = 0;
 
index d4894ed..b722687 100755 (executable)
@@ -46,8 +46,7 @@ static GDBusConnection *_gdbus_conn = NULL;
 static int monitor_id = 0;
 static int provider_monitor_id = 0;
 
-static const GDBusErrorEntry dbus_error_entries[] =
-{
+static const GDBusErrorEntry dbus_error_entries[] = {
        {SHORTCUT_ERROR_INVALID_PARAMETER, "org.freedesktop.Shortcut.Error.INVALID_PARAMETER"},
        {SHORTCUT_ERROR_OUT_OF_MEMORY,     "org.freedesktop.Shortcut.Error.OUT_OF_MEMORY"},
        {SHORTCUT_ERROR_IO_ERROR,          "org.freedesktop.Shortcut.Error.IO_ERROR"},
@@ -75,10 +74,10 @@ static shortcut_cb_info _callback_info;
 static int _dbus_init();
 static char *_shortcut_get_pkgname_by_pid(void);
 
-EXPORT_API GQuark shortcut_error_quark (void)
+EXPORT_API GQuark shortcut_error_quark(void)
 {
        static volatile gsize quark_volatile = 0;
-       g_dbus_error_register_error_domain ("shortcut-error-quark",
+       g_dbus_error_register_error_domain("shortcut-error-quark",
                        &quark_volatile,
                        dbus_error_entries,
                        G_N_ELEMENTS(dbus_error_entries));
@@ -599,7 +598,7 @@ EAPI int shortcut_get_list(const char *package_name, shortcut_list_cb list_cb, v
                g_variant_iter_free(iter);
        }
 
-       if(reply)
+       if (reply)
                g_object_unref(reply);
 
        return count;