int badge_ipc_add_deferred_task(void (*badge_add_deferred_task)(void *data), void *user_data);
int badge_ipc_del_deferred_task(void (*badge_add_deferred_task)(void *data));
-int badge_ipc_setting_property_set(const char *pkgname, const char *property, const char *value, uid_t uid);
-int badge_ipc_setting_property_get(const char *pkgname, const char *property, char **value, uid_t uid);
-
int badge_ipc_request_get_list(badge_foreach_cb callback, void *data, uid_t uid);
int badge_ipc_request_is_existing(const char *pkgname, bool *existing, uid_t uid);
DBG("badge_ipc_request_get_display done [result: %d]", result);
return result;
}
-
-int badge_ipc_setting_property_set(const char *pkgname, const char *property, const char *value, uid_t uid)
-{
- int result;
- GDBusMessage *reply = NULL;
- GVariant *body;
-
- result = _dbus_init();
- if (result != BADGE_ERROR_NONE) {
- ERR("Can't init dbus %d", result);
- return result;
- }
- body = g_variant_new("(sssi)", pkgname, property, value, uid);
-
- result = _send_sync_badge(body, &reply, "set_noti_property");
- if (reply)
- g_object_unref(reply);
-
- DBG("badge_ipc_setting_property_set done [result: %d]", result);
- return result;
-}
-
-int badge_ipc_setting_property_get(const char *pkgname, const char *property, char **value, uid_t uid)
-{
- int result;
- GDBusMessage *reply = NULL;
- GVariant *body;
- GVariant *reply_body;
- char *ret_val = NULL;
-
- result = _dbus_init();
- if (result != BADGE_ERROR_NONE) {
- ERR("Can't init dbus %d", result);
- return result;
- }
- body = g_variant_new("(ssi)", pkgname, property, uid);
-
- result = _send_sync_badge(body, &reply, "get_noti_property");
- if (result == BADGE_ERROR_NONE) {
- reply_body = g_dbus_message_get_body(reply);
- g_variant_get(reply_body, "(&s)", ret_val);
-
- if (ret_val != NULL)
- *value = strdup(ret_val);
- else
- result = BADGE_ERROR_IO_ERROR;
- }
- if (reply)
- g_object_unref(reply);
-
- DBG("badge_ipc_setting_property_get done [result: %d]", result);
- return result;
-}
-