* @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);
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 */
DYNAMICBOX_TYPE_UNKNOWN = 0x1FFF0000, /**< Error */
};
-#define SHORTCUT_ERROR (shortcut_error_quark ())
+#define SHORTCUT_ERROR (shortcut_error_quark())
GQuark shortcut_error_quark(void);
* 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);
*
* 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)
* 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
*
* 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
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"},
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));
g_variant_iter_free(iter);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
return count;