#include "media-server-db-manage.h"
#include "media-server-device-block.h"
-#ifndef _USE_DEVICED_DBUS
-static int __ms_get_added_storage_path(const char *add_path, char **device_id)
-{
- int ret = MS_MEDIA_ERR_NONE;
- char *id = NULL;
-
- *device_id = NULL;
-
- /* read deive information */
- ret = ms_read_device_info(add_path, &id);
- if (id == NULL) {
- if (ret == MS_MEDIA_ERR_FILE_NOT_EXIST) {
- ret = ms_genarate_uuid(&id);
- ret = ms_write_device_info(add_path , id);
- if (ret == MS_MEDIA_ERR_NONE)
- *device_id = strdup(id);
- }
- } else {
- *device_id = strdup(id);
- }
-
- MS_SAFE_FREE(id);
-
- return ret;
-}
-#endif
-
int ms_storage_insert_handler(const char *mount_path, const char *mount_uuid)
{
int ret = MS_MEDIA_ERR_NONE;
if (mount_path != NULL) {
MS_DBG_SWARN("added path [%s]", mount_path);
- __ms_get_added_storage_path(mount_path, &storage_id);
+ ms_get_added_storage_path(mount_path, &storage_id);
if (storage_id != NULL) {
/* update storage information into media DB */