Add mtp_get_partial_object implementation 47/98647/1 accepted/tizen/common/20161118.090700 accepted/tizen/ivi/20161121.012105 accepted/tizen/mobile/20161121.012027 accepted/tizen/tv/20161121.012042 submit/tizen/20161118.061041
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 15 Nov 2016 02:15:18 +0000 (11:15 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Fri, 18 Nov 2016 05:53:16 +0000 (14:53 +0900)
Change-Id: Iae8c39407fe02eda825f2e73aa2c122af937144c

src/daemon/include/mtp_daemon.h
src/daemon/include/mtp_daemon_db.h
src/daemon/include/mtp_daemon_gdbus_manager.h
src/daemon/mtp_daemon_db.c
src/daemon/mtp_daemon_event.c
src/daemon/mtp_daemon_gdbus.c
src/daemon/mtp_daemon_gdbus_manager.c
src/daemon/mtp_daemon_gdbus_objectinfo.c
src/daemon/mtp_gdbuslib.xml

index 7373e33a3560476eef6c86dd5eeffd4187f59bc9..6817b953b9caf2c6876451614f2c4b249709a943 100755 (executable)
@@ -127,6 +127,7 @@ struct _mtp_device_info {
        int bus_location;
        int device_number;
        char *model_name;
+       GMainLoop *event_loop;
 };
 
 struct _mtp_device_list {
index 983eba5a2d67f5f69c07b422e03692914cf3b592..77377a6094c5780d94b88cdee4ab5969a22b35b5 100755 (executable)
@@ -21,7 +21,7 @@
 
 mtp_error_e mtp_daemon_db_init(mtp_context *mtp_ctx);
 mtp_error_e mtp_daemon_db_deinit(mtp_context *mtp_ctx);
-bool mtp_daemon_db_is_exist(int mtp_device, int object_handle, mtp_context *mtp_ctx);
+bool mtp_daemon_db_is_exist(int mtp_device, int mtp_storage, int object_handle, mtp_context *mtp_ctx);
 mtp_error_e mtp_daemon_db_insert(int mtp_device, int mtp_storage,
        int object_handle, MTPObjectInfo *object_info, mtp_context *mtp_ctx);
 mtp_error_e mtp_daemon_db_delete(int mtp_device, int mtp_storage,
index 9ac0c981a14422b48769f60a80303dfa59abbc49..fcceea9539cdc8ac735b2358f015b1dafff7d26f 100755 (executable)
@@ -47,6 +47,16 @@ gboolean manager_get_object(
                gchar *dest_path,
                gpointer user_data);
 
+gboolean manager_get_partial_object(
+               mtpgdbuslibManager *manager,
+               GDBusMethodInvocation *invocation,
+               gint mtp_device,
+               gint object_handle,
+               gchar *dest_path,
+               gint offset,
+               gint max_bytes,
+               gpointer user_data);
+
 gboolean manager_get_thumbnail(
                mtpgdbuslibManager *manager,
                GDBusMethodInvocation *invocation,
index da25c53c8b2cd0048adf2f2d4d88be423e5d7d44..42e87aaa34ffd3f4d546fc25f95e2b21406c43cf 100755 (executable)
@@ -182,7 +182,7 @@ MTPObjectInfo* mtp_daemon_db_get_object_info(int mtp_device,
 }
 
 /* db exist check function */
-bool mtp_daemon_db_is_exist(int mtp_device, int object_handle, mtp_context *mtp_ctx)
+bool mtp_daemon_db_is_exist(int mtp_device, int mtp_storage, int object_handle, mtp_context *mtp_ctx)
 {
        int sql_ret;
        int count = 0;
@@ -194,8 +194,8 @@ bool mtp_daemon_db_is_exist(int mtp_device, int object_handle, mtp_context *mtp_
                return false;
        }
 
-       sql = sqlite3_mprintf("SELECT count(*) FROM %s WHERE mtp_device=%d and object_handle=%d;",
-               MTP_DB_TABLE, mtp_device, object_handle);
+       sql = sqlite3_mprintf("SELECT count(*) FROM %s WHERE mtp_device=%d and mtp_storage=%d and object_handle=%d;",
+               MTP_DB_TABLE, mtp_device, mtp_storage, object_handle);
 
        if (sql != NULL) {
                sql_ret = sqlite3_prepare_v2(mtp_ctx->db, sql, strlen(sql), &stmt, NULL);
index 2dbd30ae705897e40fbed2dda91c2e6bfaa6bdd0..ee585f4e68d383e1363863f6182849c307146bb8 100755 (executable)
@@ -258,12 +258,13 @@ void __usb_host_status_changed_cb(const char *dev_path, int bus_no, usbhost_stat
        LIBMTP_raw_device_t *raw_devices;
        LIBMTP_mtpdevice_t *device;
        mtp_device_info *device_info;
+       int device_count = mtp_ctx->device_list->device_num;
 
        MTP_LOGI("host_status: %d, bus_no: %d, dev_path: %s", host_status, bus_no, dev_path);
 
        if (host_status == USB_HOST_ADDED) {
                LIBMTP_Detect_Raw_Devices(&raw_devices, &num_of_devices);
-               for (slot = 0; slot < num_of_devices; slot++) {
+               for (slot = 1; slot <= num_of_devices; slot++) {
                        if (bus_no == raw_devices[slot].bus_location) {
                                int empty_slot = 0;
                                char usb_node[256] = {0,};
@@ -305,7 +306,22 @@ void __usb_host_status_changed_cb(const char *dev_path, int bus_no, usbhost_stat
                g_free(raw_devices);
                __print_device_list(mtp_ctx);
        } else if (host_status == USB_HOST_REMOVED) {
-               MTP_LOGI("disconnected bus_no: %d", bus_no);
+               MTP_LOGI("disconnected bus_no: %d, dev_no: %d", bus_no);
+
+               for (slot = 1; slot <= device_count; slot++) {
+                       device_info = mtp_ctx->device_list->device_info_list[slot];
+                       /*
+                       if (device_info &&
+                               bus_no == device_info->bus_location && device_info->event_loop != NULL) {
+                       */
+                       /* It is temp implemntation ! */
+                       if (!strcmp(device_info->model_name, "SM-C200")) {
+                               MTP_LOGI("Event loop exists. Quit loop.");
+                               g_main_loop_quit(device_info->event_loop);
+                               g_main_loop_unref(device_info->event_loop);
+                               device_info->event_loop = NULL;
+                       }
+               }
        }
 }
 
@@ -316,59 +332,59 @@ static void* __event_thread(gpointer dev, gpointer data)
        LIBMTP_event_t device_event;
        uint32_t param1;
        int device_id = -1;
+       mtp_device_info *device_info;
 
        MTP_LOGI("Event loop is started");
 
-       mtp_daemon_gdbus_emit_event(MTP_INITIATOR_EVENT_DEVICE_ADDED,
-               mtp_daemon_util_get_device_id(device, mtp_ctx), mtp_ctx);
-
-       while (LIBMTP_Read_Event(device, &device_event, &param1) == 0) {
-               MTP_LOGI("device %d device_event is occured %d", device, device_event);
-
-               device_id = mtp_daemon_util_get_device_id(device, mtp_ctx);
-
-               if (device_event == LIBMTP_EVENT_STORE_ADDED) {
-                       LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
-               } else if (device_event == LIBMTP_EVENT_STORE_REMOVED) {
-                       if (device_id >= 0)
-                               mtp_daemon_db_delete(device_id, param1, 0, mtp_ctx);
-                       LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
-               } else if (device_event == LIBMTP_EVENT_OBJECT_REMOVED) {
-                       if (device_id >= 0)
-                               mtp_daemon_db_delete(device_id, 0, param1, mtp_ctx);
-               } else if (device_event == LIBMTP_EVENT_OBJECT_ADDED) {
-                       MTPObjectInfo *object_info;
-                       object_info = LIBMTP_Get_Object_Info(device, param1);
-
-                       /* scan db and if exist, then update db */
-                       if (object_info != NULL && device_id >= 0) {
-                               if (mtp_daemon_db_is_exist(device_id, param1, mtp_ctx) == true) {
-                                       MTP_LOGI("DB Update");
-                                       mtp_daemon_db_update(device_id, param1, object_info, mtp_ctx);
-                               } else {
-                                       MTP_LOGI("DB Insert");
-                                       mtp_daemon_db_insert(device_id, object_info->StorageID, param1, object_info, mtp_ctx);
+       device_id = mtp_daemon_util_get_device_id(device, mtp_ctx);
+       device_info = mtp_ctx->device_list->device_info_list[device_id];
+
+       mtp_daemon_gdbus_emit_event(MTP_INITIATOR_EVENT_DEVICE_ADDED, device_id, mtp_ctx);
+
+       if(!strcmp(device_info->model_name, "SM-C200")) {
+               device_info->event_loop = g_main_loop_new(NULL, FALSE);
+               g_main_loop_run(device_info->event_loop);
+       } else {
+               while (LIBMTP_Read_Event(device, &device_event, &param1) == 0) {
+                       MTP_LOGI("device %d device_event is occured %d", device, device_event);
+
+                       if (device_event == LIBMTP_EVENT_STORE_ADDED) {
+                               LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
+                       } else if (device_event == LIBMTP_EVENT_STORE_REMOVED) {
+                               if (device_id >= 0)
+                                       mtp_daemon_db_delete(device_id, param1, 0, mtp_ctx);
+                               LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
+                       } else if (device_event == LIBMTP_EVENT_OBJECT_REMOVED) {
+                               if (device_id >= 0)
+                                       mtp_daemon_db_delete(device_id, 0, param1, mtp_ctx);
+                       } else if (device_event == LIBMTP_EVENT_OBJECT_ADDED) {
+                               MTPObjectInfo *object_info;
+                               object_info = LIBMTP_Get_Object_Info(device, param1);
+
+                               /* scan db and if exist, then update db */
+                               if (object_info != NULL && device_id >= 0) {
+                                       if (mtp_daemon_db_is_exist(device_id, object_info->StorageID, param1, mtp_ctx) == true) {
+                                               MTP_LOGI("DB Update");
+                                               mtp_daemon_db_update(device_id, param1, object_info, mtp_ctx);
+                                       } else {
+                                               MTP_LOGI("DB Insert");
+                                               mtp_daemon_db_insert(device_id, object_info->StorageID, param1, object_info, mtp_ctx);
+                                       }
                                }
                        }
+                       mtp_daemon_gdbus_emit_event(device_event, (int)param1, mtp_ctx);
                }
-
-               mtp_daemon_gdbus_emit_event(device_event, (int)param1, mtp_ctx);
        }
 
-       MTP_LOGI("device is closing down!! device: %p", device);
+       MTP_LOGI("device is closing down!! device_id : %d", device_id);
 
-       mtp_daemon_gdbus_emit_event(MTP_INITIATOR_EVENT_DEVICE_REMOVED,
-               mtp_daemon_util_get_device_id(device, mtp_ctx), mtp_ctx);
+       mtp_daemon_gdbus_emit_event(MTP_INITIATOR_EVENT_DEVICE_REMOVED, device_id, mtp_ctx);
 
        /* remove the device into device list */
-       device_id = mtp_daemon_util_get_device_id(device, mtp_ctx);
 
        if (device_id >= 0) {
-               mtp_device_info *device_info;
-
                MTP_LOGI("remove device from the list!!");
 
-               device_info = mtp_ctx->device_list->device_info_list[device_id];
                mtp_ctx->device_list->device_num--;
 
                LIBMTP_Release_Device(device_info->device);
@@ -509,7 +525,8 @@ mtp_error_e mtp_daemon_event_init(mtp_context *mtp_ctx)
                device_info = (mtp_device_info *)mtp_ctx->device_list->device_info_list[slot];
 
                if (device_info != NULL) {
-                       MTP_LOGI("%d. bus %d, dev %d, %p", slot, device_info->bus_location, device_info->device_number, device_info->device);
+                       MTP_LOGI("%d. bus %d, dev %d, %p", slot, device_info->bus_location,
+                               device_info->device_number, device_info->device);
 
                        g_thread_pool_push(mtp_ctx->device_list->threads,
                                (gpointer) device_info->device, NULL);
index 97db0fc0354d1d9df313283c25e26f61cab36607..72f213526d33eb927309cd5ea65757fc2d046dc3 100755 (executable)
@@ -59,6 +59,12 @@ static gboolean __manager_init(mtp_context *mtp_ctx)
                        G_CALLBACK(manager_get_object),
                        mtp_ctx);
 
+       g_signal_connect(
+                       manager_skeleton,
+                       "handle-get-partial-object",
+                       G_CALLBACK(manager_get_partial_object),
+                       mtp_ctx);
+
        g_signal_connect(
                        manager_skeleton,
                        "handle-get-thumbnail",
index d92e92cce723969a2b3c92fd3540a6abf580746a..a3c9394e4398091a2e66087db52ce9ea53438b79 100755 (executable)
@@ -187,6 +187,18 @@ static void __manager_get_object_handles_thread_func(gpointer user_data)
        MTP_LOGI("device_id: %d, storage id: %d, format: %d, parent: %d, device: %p",
                param->param1, param->param2, param->param3, param->param4, device);
 
+       /* loop over storages */
+       g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+
+       if (parent_object_handle > 0) {
+               MTPObjectInfo *object_info = NULL;
+               object_info = LIBMTP_Get_Object_Info(device, parent_object_handle);
+               if (object_info->StorageID != mtp_storage) {
+                       MTP_LOGE("Not Equal between real object storage id and parameter");
+                       goto END;
+               }
+       }
+
        if (device_info != NULL) {
                ret = LIBMTP_Get_Object_Handles(device, (uint32_t)mtp_storage,
                        (uint32_t)format, (uint32_t)parent_object_handle,
@@ -196,11 +208,6 @@ static void __manager_get_object_handles_thread_func(gpointer user_data)
                        MTP_LOGE("LIBMTP_Get_Object_Handles is failed : %d", ret);
        }
 
-       /*MTP_LOGI("Total Object number: %d", temp);*/
-
-       /* loop over storages */
-       g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
-
        if (device_info != NULL) {
                mtp_daemon_db_begin(param->mtp_ctx);
 
@@ -211,7 +218,7 @@ static void __manager_get_object_handles_thread_func(gpointer user_data)
                        if (object_info != NULL)
                                mtp_daemon_db_insert(device_id, storage_id, object_list[slot], object_info, param->mtp_ctx);*/
 
-                       if (mtp_daemon_db_is_exist(device_id, object_list[slot], param->mtp_ctx) == false) {
+                       if (mtp_daemon_db_is_exist(device_id, mtp_storage, object_list[slot], param->mtp_ctx) == false) {
                                MTP_LOGI("Objectinfo is Not stored. device_id: %d, object_list[%d]: %d",
                                        device_id, slot, object_list[slot]);
                                object_info = LIBMTP_Get_Object_Info(device, (uint32_t)object_list[slot]);
@@ -228,12 +235,13 @@ static void __manager_get_object_handles_thread_func(gpointer user_data)
                                /*MTP_LOGI("object id: %d, format : %d, filename : %s", object_list[slot],
                                        object_info->ObjectFormat, object_info->Filename);*/
 
-                               if ((format == LIBMTP_FILETYPE_ALL &&
-                                               (object_info->ObjectFormat == LIBMTP_FILETYPE_FOLDER ||
-                                               LIBMTP_FILETYPE_IS_IMAGE(object_info->ObjectFormat))) ||
+                               if (format == LIBMTP_FILETYPE_ALL ||
                                        (format == LIBMTP_FILETYPE_ALL_IMAGE &&
                                                LIBMTP_FILETYPE_IS_IMAGE(object_info->ObjectFormat)) ||
                                        (format == object_info->ObjectFormat)) {
+                                       MTP_LOGI("The object handle (id : %d, format : %d) will be pass to caller",
+                                               object_list[slot],object_info->ObjectFormat);
+
                                        g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
 
                                        g_variant_builder_add(&b, "{sv}", "object_handle",
@@ -253,6 +261,7 @@ static void __manager_get_object_handles_thread_func(gpointer user_data)
                result = MTP_ERROR_NO_DEVICE;
        }
 
+END:
        gv = g_variant_builder_end(&b);
 
        /*MTP_LOGI("Real object_num: %d", target_object_num);*/
@@ -336,6 +345,86 @@ static void __manager_get_object_thread_func(gpointer user_data)
        g_free(param);
 }
 
+static void __manager_get_partial_object_thread_func(gpointer user_data)
+{
+       /* variable definition */
+       mtp_param *param = (mtp_param *)user_data;
+       mtp_error_e result = MTP_ERROR_NONE;
+       int ret;
+       int fd;
+
+       LIBMTP_mtpdevice_t *device;
+       mtp_device_info *device_info;
+       int device_id;
+       int object_handle;
+       int offset;
+       int max_bytes;
+       char *dest_path;
+       unsigned int actual_written;
+       unsigned char *data;
+
+       /* check precondition */
+       g_assert(param != NULL);
+       g_assert(param->object != NULL);
+       g_assert(param->invocation != NULL);
+       g_assert(param->mtp_ctx != NULL);
+
+       /*MTP_LOGI("%s", __func__);*/
+
+       /* parameter unpacking */
+       device_id = param->param1;
+       object_handle = param->param2;
+       offset = param->param3;
+       max_bytes = param->param4;
+       dest_path = param->char_param1;
+
+       device_info = (mtp_device_info *)param->mtp_ctx->device_list->device_info_list[device_id];
+
+       if (device_info != NULL) {
+               device = (LIBMTP_mtpdevice_t *)device_info->device;
+               MTP_LOGI("device_id: %d, device: %p, oh : %d, dest_path: %s", device_id, device, object_handle, dest_path);
+
+               /* file remove */
+               unlink(dest_path);
+
+               /* file open */
+               fd = open(dest_path, O_WRONLY | O_CREAT | O_EXCL, 0644);
+
+               if (fd < 0) {
+                       MTP_LOGE("file open fail - fd: %d, dest_path: %s", fd, dest_path);
+                       result = MTP_ERROR_IO_ERROR;
+               } else {
+                       MTP_LOGI("offset : %d, max_bytes : %d", offset, max_bytes);
+                       ret = LIBMTP_GetPartialObject(device, object_handle, (uint32_t)offset, (uint32_t)max_bytes, &data, &actual_written);
+                       MTP_LOGI("actual_written : %d", actual_written);
+
+                       if (ret == 0) {
+                               ret = write(fd, data, actual_written);
+                               if (ret == 0)
+                                       result = MTP_ERROR_OUT_OF_MEMORY;
+                       } else {
+                               MTP_LOGE("get partial object fail - ret: %d", ret);
+                               result = MTP_ERROR_PLUGIN_FAIL;
+                       }
+
+                       close(fd);
+               }
+       } else {
+               MTP_LOGE("!!! no MTP device");
+               result = MTP_ERROR_NO_DEVICE;
+       }
+
+       mtp_gdbuslib_manager_complete_get_partial_object(param->object,
+               param->invocation, actual_written, result);
+
+       /* deinitializing */
+       g_free(dest_path);
+
+       g_object_unref(param->invocation);
+       g_object_unref(param->object);
+       g_free(param);
+}
+
 static void __manager_get_thumbnail_thread_func(gpointer user_data)
 {
        /* variable definition */
@@ -663,6 +752,62 @@ OUT:
        return TRUE;
 }
 
+gboolean manager_get_partial_object(
+               mtpgdbuslibManager *manager,
+               GDBusMethodInvocation *invocation,
+               gint mtp_device,
+               gint object_handle,
+               gchar *dest_path,
+               gint offset,
+               gint max_bytes,
+               gpointer user_data)
+{
+       mtp_param *param = NULL;
+       gint result = MTP_ERROR_NONE;
+
+       /*MTP_LOGI(">>> REQUEST from [%s]",
+               g_dbus_method_invocation_get_sender(invocation));*/
+
+       param = g_try_new0(mtp_param, 1);
+       if (param == NULL) {
+               MTP_LOGE("Memory allocation failed");
+               result = MTP_ERROR_OUT_OF_MEMORY;
+               goto OUT;
+       }
+
+       param->object = g_object_ref(manager);
+       param->invocation = g_object_ref(invocation);
+       param->mtp_ctx = (mtp_context *)user_data;
+       param->param1 = mtp_device;
+       param->param2 = object_handle;
+       param->param3 = offset;
+       param->param4 = max_bytes;
+       param->char_param1 = g_strdup(dest_path);
+
+       if (mtp_daemon_controller_push(__manager_get_partial_object_thread_func,
+               param, param->mtp_ctx) != MTP_ERROR_NONE) {
+               /* return error if queue was blocked */
+               MTP_LOGE("controller is processing important message..");
+               result = MTP_ERROR_CONTROLLER;
+
+               goto OUT;
+       }
+
+       return TRUE;
+
+OUT:
+       if (param != NULL) {
+               g_object_unref(param->invocation);
+               g_object_unref(param->object);
+
+               g_free(param);
+       }
+
+       mtp_gdbuslib_manager_complete_get_partial_object(manager, invocation, 0, result);
+
+       return TRUE;
+}
+
 gboolean manager_get_thumbnail(
                mtpgdbuslibManager *manager,
                GDBusMethodInvocation *invocation,
index 8184be229fb7533526ca38182e55e4bbc22103ca..75631ba6fdcc94fd6dd10257e1df9d6b965126e4 100755 (executable)
@@ -23,7 +23,6 @@ static void __objectinfo_get_property_thread_func(gpointer user_data)
 {
        mtp_param *param = (mtp_param *)user_data;
        mtp_error_e result = MTP_ERROR_NONE;
-       LIBMTP_mtpdevice_t *mtp_device = NULL;
        mtp_device_info *device_info = NULL;
        int device_id;
        int object_handle;
@@ -45,19 +44,9 @@ static void __objectinfo_get_property_thread_func(gpointer user_data)
        device_info = (mtp_device_info *)param->mtp_ctx->device_list->device_info_list[device_id];
 
        if (device_info != NULL) {
-               mtp_device = (LIBMTP_mtpdevice_t *)device_info->device;
-               /*MTP_LOGI("device_id: %d, device: %p", device_id, device_handle);*/
-
                MTP_LOGI("Get property start - property %d", property);
 
-               if (mtp_daemon_db_is_exist(device_id, object_handle, param->mtp_ctx) == false) {
-                       object_info = LIBMTP_Get_Object_Info(mtp_device, object_handle);
-
-                       if (object_info != NULL)
-                               mtp_daemon_db_insert(device_id, object_info->StorageID, object_handle, object_info, param->mtp_ctx);
-               } else {
-                       object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
-               }
+               object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
 
                if (object_info != NULL) {
                        switch (property) {
@@ -135,7 +124,6 @@ static void __objectinfo_get_property_string_thread_func(gpointer user_data)
 {
        mtp_param *param = (mtp_param *)user_data;
        mtp_error_e result = MTP_ERROR_NONE;
-       LIBMTP_mtpdevice_t *mtp_device = NULL;
        mtp_device_info *device_info = NULL;
        int device_id;
        int object_handle;
@@ -157,19 +145,9 @@ static void __objectinfo_get_property_string_thread_func(gpointer user_data)
        device_info = (mtp_device_info *)param->mtp_ctx->device_list->device_info_list[device_id];
 
        if (device_info != NULL) {
-               mtp_device = (LIBMTP_mtpdevice_t *)device_info->device;
-               /*MTP_LOGI("device_id: %d, device: %p", device_id, device_handle);*/
-
                MTP_LOGI("Get property start - property %d", property);
 
-               if (mtp_daemon_db_is_exist(device_id, object_handle, param->mtp_ctx) == false) {
-                       object_info = LIBMTP_Get_Object_Info(mtp_device, object_handle);
-
-                       if (object_info != NULL)
-                               mtp_daemon_db_insert(device_id, object_info->StorageID, object_handle, object_info, param->mtp_ctx);
-               } else {
-                       object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
-               }
+               object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
 
                if (object_info != NULL) {
                        switch (property) {
index 03998e30ecd41e32ee6dc78077de56d4cd941b90..f497f7edebbedfb719905415e5d14d910974be48 100755 (executable)
                        <arg type="i" name="result" direction="out" />
                </method>
 
+               <method name="GetPartialObject">
+                       <arg type="i" name="mtp_device" direction="in" />
+                       <arg type="i" name="object_handle" direction="in" />
+                       <arg type="s" name="dest_path" direction="in" />
+                       <arg type="i" name="offset" direction="in" />
+                       <arg type="i" name="max_bytes" direction="in" />
+                       <arg type="i" name="actual_written" direction="out" />
+                       <arg type="i" name="result" direction="out" />
+               </method>
+
                <method name="GetThumbnail">
                        <arg type="i" name="mtp_device" direction="in" />
                        <arg type="i" name="object_handle" direction="in" />