2010-10-13 01:30:06 -07:00
|
|
|
#include "e_fm_shared_types.h"
|
|
|
|
#include "e_fm_shared_device.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
_e_fm_shared_device_storage_free(E_Storage *s)
|
|
|
|
{
|
|
|
|
E_Volume *v;
|
|
|
|
EINA_LIST_FREE(s->volumes, v)
|
|
|
|
{
|
|
|
|
v->storage = NULL;
|
2011-11-17 21:58:08 -08:00
|
|
|
_e_fm_shared_device_volume_free(v);
|
2010-10-13 01:30:06 -07:00
|
|
|
}
|
2011-11-17 21:58:08 -08:00
|
|
|
eina_stringshare_del(s->udi);
|
|
|
|
eina_stringshare_del(s->bus);
|
|
|
|
eina_stringshare_del(s->drive_type);
|
|
|
|
eina_stringshare_del(s->model);
|
|
|
|
eina_stringshare_del(s->vendor);
|
|
|
|
eina_stringshare_del(s->serial);
|
|
|
|
eina_stringshare_del(s->icon.drive);
|
|
|
|
eina_stringshare_del(s->icon.volume);
|
2013-01-02 05:16:19 -08:00
|
|
|
eina_stringshare_del(s->dbus_path);
|
|
|
|
#if HAVE_EEZE_MOUNT
|
2011-01-05 17:29:03 -08:00
|
|
|
if (s->disk) eeze_disk_free(s->disk);
|
|
|
|
#endif
|
2010-10-13 01:30:06 -07:00
|
|
|
free(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_e_fm_shared_device_volume_free(E_Volume *v)
|
|
|
|
{
|
|
|
|
if (v->storage)
|
|
|
|
{
|
2013-01-02 05:16:19 -08:00
|
|
|
v->storage->volumes = eina_list_remove(v->storage->volumes, v);
|
2013-01-11 02:34:29 -08:00
|
|
|
v->storage = NULL;
|
2010-10-13 01:30:06 -07:00
|
|
|
}
|
|
|
|
if (v->udi) eina_stringshare_del(v->udi);
|
|
|
|
if (v->uuid) eina_stringshare_del(v->uuid);
|
|
|
|
if (v->label) eina_stringshare_del(v->label);
|
|
|
|
if (v->icon) eina_stringshare_del(v->icon);
|
|
|
|
if (v->fstype) eina_stringshare_del(v->fstype);
|
|
|
|
if (v->partition_label) eina_stringshare_del(v->partition_label);
|
|
|
|
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
|
|
|
if (v->parent) eina_stringshare_del(v->parent);
|
2013-01-02 05:16:19 -08:00
|
|
|
eina_stringshare_del(v->dbus_path);
|
2010-10-13 01:30:06 -07:00
|
|
|
free(v);
|
|
|
|
}
|
2013-01-11 02:34:29 -08:00
|
|
|
|