media_content_db_update_item_type_e update_item;
media_content_db_update_type_e update_type;
GList *uuids;
+ media_content_noti_h noti_handle;
};
static Eina_Bool __gl_db_update_idler(void *data)
uuid, path, mime_type, data);
}
-/*
-static void __gl_db_update_coud_cb(media_content_error_e error, int pid,
- media_content_db_update_item_type_e update_item,
- media_content_db_update_type_e update_type,
- media_content_type_e media_type, char *uuid,
- char *path, char *mime_type, void *data)
-{
- gl_dbg("update_item[%d], update_type[%d], media_type[%d]", update_item,
- update_type, media_type);
- GL_CHECK(data);
- __gl_db_update_op(error, pid, update_item, update_type, media_type,
- uuid, path, mime_type, data);
-}
-*/
-
int _gl_db_update_add_timer(void *data)
{
GL_CHECK_VAL(data, -1);
int ret = -1;
gl_dbg("Set db updated callback");
- ret = media_content_set_db_updated_cb(__gl_db_update_cb, data);
+ ret = media_content_add_db_updated_cb(__gl_db_update_cb, data, &ad->db_noti_d->noti_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
gl_dbgE("Set db updated cb failed[%d]!", ret);
}
-// ret = media_content_set_db_updated_cloud_cb(&(ad->db_noti_d->cloud_h),
-// __gl_db_update_coud_cb,
-// data);
-// if (ret != MEDIA_CONTENT_ERROR_NONE)
-// gl_dbgE("Set db updated cloud cb failed[%d]!", ret);
return true;
}
int ret = -1;
gl_dbg("Unset db updated callback");
- ret = media_content_unset_db_updated_cb();
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- gl_dbgE("UNSet db updated cb failed[%d]!", ret);
- }
-
GL_CHECK_FALSE(data);
gl_appdata *ad = (gl_appdata *)data;
GL_CHECK_FALSE(ad->db_noti_d);
gl_db_noti_s *db_noti = ad->db_noti_d;
-// if (ad->db_noti_d->cloud_h) {
-// ret = media_content_unset_db_updated_cloud_cb(ad->db_noti_d->cloud_h);
-// if (ret != MEDIA_CONTENT_ERROR_NONE)
-// gl_dbgE("UNSet db updated cloud cb failed[%d]!", ret);
-// ad->db_noti_d->cloud_h = NULL;
-// }
+ ret = media_content_remove_db_updated_cb(db_noti->noti_handle);
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ gl_dbgE("UNSet db updated cb failed[%d]!", ret);
+ }
+
if (db_noti->uuids) {
g_list_free_full(db_noti->uuids, g_free);
db_noti->uuids = NULL;