Rename edbus->eldbus

devs/devilhorns/e_wayland
Lucas De Marchi 10 years ago
parent 646943d897
commit f8a2dd4d95
  1. 4
      ChangeLog
  2. 16
      configure.ac
  3. 2
      src/bin/e.h
  4. 148
      src/bin/e_dbusmenu.c
  5. 4
      src/bin/e_dbusmenu.h
  6. 2
      src/bin/e_fm/e_fm_main.c
  7. 336
      src/bin/e_fm/e_fm_main_udisks.c
  8. 26
      src/bin/e_fm_cmdline.c
  9. 8
      src/bin/e_fm_shared_types.h.in
  10. 336
      src/bin/e_msgbus.c
  11. 8
      src/bin/e_msgbus.h
  12. 200
      src/bin/e_notification.c
  13. 2
      src/bin/e_notification.h
  14. 10
      src/modules/Makefile_music_control.am
  15. 4
      src/modules/appmenu/e_mod_appmenu_private.h
  16. 106
      src/modules/appmenu/e_mod_dbus_registrar_server.c
  17. 10
      src/modules/appmenu/e_mod_main.c
  18. 6
      src/modules/battery/e_mod_main.h
  19. 166
      src/modules/battery/e_mod_upower.c
  20. 140
      src/modules/bluez4/agent.c
  21. 4
      src/modules/bluez4/agent.h
  22. 6
      src/modules/bluez4/e_mod_main.c
  23. 268
      src/modules/bluez4/ebluez4.c
  24. 30
      src/modules/bluez4/ebluez4.h
  25. 20
      src/modules/connman/E_Connman.h
  26. 156
      src/modules/connman/agent.c
  27. 250
      src/modules/connman/e_connman.c
  28. 10
      src/modules/connman/e_mod_main.c
  29. 2
      src/modules/connman/e_mod_main.h
  30. 62
      src/modules/fileman/e_mod_dbus.c
  31. 48
      src/modules/mixer/sys_pulse.c
  32. 4
      src/modules/msgbus/e_mod_main.c
  33. 20
      src/modules/msgbus/msgbus_audit.c
  34. 112
      src/modules/msgbus/msgbus_desktop.c
  35. 26
      src/modules/msgbus/msgbus_lang.c
  36. 16
      src/modules/music-control/e_mod_main.c
  37. 923
      src/modules/music-control/gen/edbus_media_player2_player.c
  38. 47
      src/modules/music-control/gen/edbus_media_player2_player.h
  39. 350
      src/modules/music-control/gen/edbus_mpris_media_player2.c
  40. 22
      src/modules/music-control/gen/edbus_mpris_media_player2.h
  41. 24
      src/modules/music-control/gen/edbus_utils.h
  42. 923
      src/modules/music-control/gen/eldbus_media_player2_player.c
  43. 47
      src/modules/music-control/gen/eldbus_media_player2_player.h
  44. 350
      src/modules/music-control/gen/eldbus_mpris_media_player2.c
  45. 22
      src/modules/music-control/gen/eldbus_mpris_media_player2.h
  46. 24
      src/modules/music-control/gen/eldbus_utils.h
  47. 10
      src/modules/music-control/private.h
  48. 16
      src/modules/systray/e_mod_notifier_host.c
  49. 160
      src/modules/systray/e_mod_notifier_host_dbus.c
  50. 8
      src/modules/systray/e_mod_notifier_host_private.h
  51. 80
      src/modules/systray/e_mod_notifier_watcher.c
  52. 28
      src/modules/wizard/page_110.c

@ -303,9 +303,9 @@
2013-01-03 José Roberto de Souza
* Modules ported to edbus: battery, connman, mixer, notification,
* Modules ported to eldbus: battery, connman, mixer, notification,
illume-indicator
* Fileman and Wizard also ported to edbus
* Fileman and Wizard also ported to eldbus
* HAL backend for EFM removed
* Systray: added DBus notification
* Added music-control module: control any mpris2-compatible music

@ -467,7 +467,7 @@ ecore-file >= $efl_version \
ecore-ipc >= $efl_version \
eet >= $efl_version \
efreet >= $efl_version \
edbus2 >= $efl_version \
eldbus >= $efl_version \
eina >= $efl_version"
efm_requires="$efm_requires $eeze_mount $dbus_mount $udisks_mount"
@ -477,7 +477,7 @@ PKG_CHECK_MODULES(E_FM_CMDLINE, [
eina >= ${efl_version}
ecore >= ${efl_version}
ecore-file >= ${efl_version}
edbus2 >= ${efl_version}
eldbus >= ${efl_version}
efreet >= ${efl_version}
])
@ -535,7 +535,7 @@ PKG_CHECK_MODULES(E, [
efreet-mime >= ${efl_version}
efreet-trash >= ${efl_version}
eina >= ${efl_version}
edbus2 >= ${efl_version}
eldbus >= ${efl_version}
eio >= ${efl_version}
$eeze_mount
$udisks_mount
@ -555,7 +555,7 @@ efreet >= ${efl_version} \
efreet-mime >= ${efl_version} \
efreet-trash >= ${efl_version} \
eina >= ${efl_version} \
edbus2 \
eldbus \
eio >= ${efl_version} \
$udisks_mount \
$eeze_mount \
@ -688,7 +688,7 @@ define([CHECK_MODULE_TEMPERATURE],
AM_CONDITIONAL(MUSIC_CONTROL, false)
define([CHECK_MODULE_MUSIC_CONTROL],
[
AC_E_CHECK_PKG(MUSIC_CONTROL, [ ecore >= $efl_version eina >= $efl_version edbus2 ], [], [MUSIC_CONTROL=false])
AC_E_CHECK_PKG(MUSIC_CONTROL, [ ecore >= $efl_version eina >= $efl_version eldbus ], [], [MUSIC_CONTROL=false])
])
##have_exchange=no
@ -717,7 +717,7 @@ AC_ARG_ENABLE([enotify],
AC_CACHE_VAL([e_cv_want_enotify], [e_cv_want_enotify=yes])
)
if test "x$e_cv_want_enotify" != "xno" ; then
AC_E_CHECK_PKG(ENOTIFY, [ edbus2 >= $efl_version ],
AC_E_CHECK_PKG(ENOTIFY, [ eldbus >= $efl_version ],
[
AC_DEFINE_UNQUOTED([HAVE_ENOTIFY], [1], [enable enotify])
],
@ -803,7 +803,7 @@ AM_CONDITIONAL(HAVE_ECONNMAN, false)
AM_CONDITIONAL(HAVE_DUMMY, false)
define([CHECK_MODULE_CONNMAN],
[
AC_E_CHECK_PKG(ECONNMAN, [ edbus2 >= $efl_version ], [], [CONNMAN=false])
AC_E_CHECK_PKG(ECONNMAN, [ eldbus >= $efl_version ], [], [CONNMAN=false])
dnl AC_E_CHECK_PKG(DUMMY, [ connman >= 1.0 ], [], [CONNMAN=false])
])
AC_SUBST(ECONNMAN_CFLAGS)
@ -813,7 +813,7 @@ AM_CONDITIONAL(HAVE_BLUEZ4, false)
AM_CONDITIONAL(HAVE_DUMMY, false)
define([CHECK_MODULE_BLUEZ4],
[
AC_E_CHECK_PKG(BLUEZ4, [ edbus2 ],)
AC_E_CHECK_PKG(BLUEZ4, [ eldbus ],)
])
AC_SUBST(EBLUEZ4_CFLAGS)
AC_SUBST(EBLUEZ4_LIBS)

@ -114,7 +114,7 @@ void *alloca (size_t);
# include <Efreet.h>
# include <Efreet_Mime.h>
# include <Edje.h>
# include <EDBus.h>
# include <Eldbus.h>
# include <Eio.h>
# ifdef HAVE_HAL

@ -4,7 +4,7 @@
struct _E_DBusMenu_Ctx
{
EDBus_Proxy *proxy;
Eldbus_Proxy *proxy;
E_DBusMenu_Item *root_menu;
void *data;
E_DBusMenu_Pop_Request_Cb pop_request_cb;
@ -45,7 +45,7 @@ id_find(const char *text, const char *array_of_names[], unsigned max)
}
static void
dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
dbus_menu_prop_dict_cb(void *data, const void *key, Eldbus_Message_Iter *var)
{
E_DBusMenu_Item *m = data;
if (!strcmp(key, "label"))
@ -54,7 +54,7 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
Eina_Strbuf *label_buf = eina_strbuf_new();
int i;
edbus_message_iter_arguments_get(var, "s", &label);
eldbus_message_iter_arguments_get(var, "s", &label);
for (i = 0; label[i]; i++)
{
if (label[i] != '_')
@ -76,17 +76,17 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
else if (!strcmp(key, "type"))
{
const char *type;
edbus_message_iter_arguments_get(var, "s", &type);
eldbus_message_iter_arguments_get(var, "s", &type);
m->type = id_find(type, Menu_Item_Type_Names, E_DBUSMENU_ITEM_TYPE_LAST);
}
else if (!strcmp(key, "icon-data"))
{
EDBus_Message_Iter *array;
Eldbus_Message_Iter *array;
int size;
const unsigned char *img_data;
edbus_message_iter_arguments_get(var, "ay", &array);
edbus_message_iter_fixed_array_get(array, 'y', &img_data, &size);
eldbus_message_iter_arguments_get(var, "ay", &array);
eldbus_message_iter_fixed_array_get(array, 'y', &img_data, &size);
if (!size)
return;
m->icon_data = malloc(sizeof(unsigned char) * size);
@ -97,20 +97,20 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
else if (!strcmp(key, "icon-name"))
{
const char *icon_name;
edbus_message_iter_arguments_get(var, "s", &icon_name);
eldbus_message_iter_arguments_get(var, "s", &icon_name);
eina_stringshare_replace(&m->icon_name, icon_name);
}
else if (!strcmp(key, "toggle-type"))
{
const char *toggle_type;
edbus_message_iter_arguments_get(var, "s", &toggle_type);
eldbus_message_iter_arguments_get(var, "s", &toggle_type);
m->toggle_type = id_find(toggle_type, Menu_Item_Toggle_Type_Names,
E_DBUSMENU_ITEM_TOGGLE_TYPE_LAST);
}
else if (!strcmp(key, "toggle-state"))
{
int state;
edbus_message_iter_arguments_get(var, "i", &state);
eldbus_message_iter_arguments_get(var, "i", &state);
if (state == 1)
m->toggle_state = EINA_TRUE;
else
@ -119,7 +119,7 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
else if (!strcmp(key, "children-display"))
{
const char *display;
edbus_message_iter_arguments_get(var, "s", &display);
eldbus_message_iter_arguments_get(var, "s", &display);
if (!strcmp(display, "submenu"))
m->is_submenu = EINA_TRUE;
else
@ -128,27 +128,27 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
else if (!strcmp(key, "disposition"))
{
const char *disposition;
edbus_message_iter_arguments_get(var, "s", &disposition);
eldbus_message_iter_arguments_get(var, "s", &disposition);
m->disposition = id_find(disposition, Menu_Item_Dispostion_Names,
E_DBUSMENU_ITEM_DISPOSTION_LAST);
}
else if (!strcmp(key, "enabled"))
edbus_message_iter_arguments_get(var, "b", &m->enabled);
eldbus_message_iter_arguments_get(var, "b", &m->enabled);
else if (!strcmp(key, "visible"))
edbus_message_iter_arguments_get(var, "b", &m->visible);
eldbus_message_iter_arguments_get(var, "b", &m->visible);
}
static E_DBusMenu_Item *
parse_layout(EDBus_Message_Iter *layout, E_DBusMenu_Item *parent, E_DBusMenu_Ctx *ctx)
parse_layout(Eldbus_Message_Iter *layout, E_DBusMenu_Item *parent, E_DBusMenu_Ctx *ctx)
{
EDBus_Message_Iter *menu_item_prop, *sub_menu_items_prop, *var;
Eldbus_Message_Iter *menu_item_prop, *sub_menu_items_prop, *var;
E_DBusMenu_Item *m = calloc(1, sizeof(E_DBusMenu_Item));
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
m->ctx = ctx;
m->enabled = EINA_TRUE;
m->visible = EINA_TRUE;
if (!edbus_message_iter_arguments_get(layout, "ia{sv}av", &m->id,
if (!eldbus_message_iter_arguments_get(layout, "ia{sv}av", &m->id,
&menu_item_prop, &sub_menu_items_prop))
{
ERR("Error reading message");
@ -156,12 +156,12 @@ parse_layout(EDBus_Message_Iter *layout, E_DBusMenu_Item *parent, E_DBusMenu_Ctx
return NULL;
}
edbus_message_iter_dict_iterate(menu_item_prop, "sv", dbus_menu_prop_dict_cb, m);
eldbus_message_iter_dict_iterate(menu_item_prop, "sv", dbus_menu_prop_dict_cb, m);
while (edbus_message_iter_get_and_next(sub_menu_items_prop, 'v', &var))
while (eldbus_message_iter_get_and_next(sub_menu_items_prop, 'v', &var))
{
EDBus_Message_Iter *st;
if (!edbus_message_iter_arguments_get(var, "(ia{sv}av)", &st))
Eldbus_Message_Iter *st;
if (!eldbus_message_iter_arguments_get(var, "(ia{sv}av)", &st))
{
ERR("Error readding message.");
continue;
@ -198,21 +198,21 @@ dbus_menu_free(E_DBusMenu_Item *m)
}
static void
layout_get_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
layout_get_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
E_DBusMenu_Item *m;
const char *error, *error_msg;
EDBus_Message_Iter *layout;
Eldbus_Message_Iter *layout;
unsigned revision;
E_DBusMenu_Ctx *ctx = data;
if (edbus_message_error_get(msg, &error, &error_msg))
if (eldbus_message_error_get(msg, &error, &error_msg))
{
ERR("%s %s", error, error_msg);
return;
}
if (!edbus_message_arguments_get(msg, "u(ia{sv}av)", &revision, &layout))
if (!eldbus_message_arguments_get(msg, "u(ia{sv}av)", &revision, &layout))
{
ERR("Error reading message");
return;
@ -250,14 +250,14 @@ dbus_menu_find(E_DBusMenu_Ctx *ctx, int id)
}
static void
menu_pop_request(void *data, const EDBus_Message *msg)
menu_pop_request(void *data, const Eldbus_Message *msg)
{
E_DBusMenu_Ctx *ctx = data;
int id;
unsigned timestamp;
E_DBusMenu_Item *m;
if (!edbus_message_arguments_get(msg, "iu", &id, &timestamp))
if (!eldbus_message_arguments_get(msg, "iu", &id, &timestamp))
{
ERR("Error reading values.");
return;
@ -271,38 +271,38 @@ menu_pop_request(void *data, const EDBus_Message *msg)
}
static void
icon_theme_path_get_cb(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
icon_theme_path_get_cb(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
const char *error, *error_msg;
EDBus_Message_Iter *var, *array;
Eldbus_Message_Iter *var, *array;
const char *path;
if (edbus_message_error_get(msg, &error, &error_msg))
if (eldbus_message_error_get(msg, &error, &error_msg))
{
ERR("%s %s", error, error_msg);
return;
}
if (!edbus_message_arguments_get(msg, "v", &var) ||
!edbus_message_iter_arguments_get(var, "as", &array))
if (!eldbus_message_arguments_get(msg, "v", &var) ||
!eldbus_message_iter_arguments_get(var, "as", &array))
{
ERR("Error reading message.");
return;
}
while (edbus_message_iter_get_and_next(array, 's', &path))
while (eldbus_message_iter_get_and_next(array, 's', &path))
{
//TODO
}
}
static void
prop_changed_cb(void *data EINA_UNUSED, const EDBus_Message *msg)
prop_changed_cb(void *data EINA_UNUSED, const Eldbus_Message *msg)
{
const char *interface, *propname;
EDBus_Message_Iter *variant, *array;
Eldbus_Message_Iter *variant, *array;
if (!edbus_message_arguments_get(msg, "ssv", &interface, &propname, &variant))
if (!eldbus_message_arguments_get(msg, "ssv", &interface, &propname, &variant))
{
ERR("Error getting values");
return;
@ -311,7 +311,7 @@ prop_changed_cb(void *data EINA_UNUSED, const EDBus_Message *msg)
if (strcmp(propname, "IconThemePath"))
return;
if (!edbus_message_iter_arguments_get(variant, "as", &array))
if (!eldbus_message_iter_arguments_get(variant, "as", &array))
{
//TODO
}
@ -320,27 +320,27 @@ prop_changed_cb(void *data EINA_UNUSED, const EDBus_Message *msg)
static void
layout_update(E_DBusMenu_Ctx *ctx)
{
EDBus_Message *msg;
EDBus_Message_Iter *main_iter, *array;
msg = edbus_proxy_method_call_new(ctx->proxy, "GetLayout");
main_iter = edbus_message_iter_get(msg);
edbus_message_iter_arguments_append(main_iter, "iias", 0, -1, &array);
edbus_message_iter_container_close(main_iter, array);
edbus_proxy_send(ctx->proxy, msg, layout_get_cb, ctx, -1);
Eldbus_Message *msg;
Eldbus_Message_Iter *main_iter, *array;
msg = eldbus_proxy_method_call_new(ctx->proxy, "GetLayout");
main_iter = eldbus_message_iter_get(msg);
eldbus_message_iter_arguments_append(main_iter, "iias", 0, -1, &array);
eldbus_message_iter_container_close(main_iter, array);
eldbus_proxy_send(ctx->proxy, msg, layout_get_cb, ctx, -1);
}
static void
layout_updated_cb(void *data, const EDBus_Message *msg EINA_UNUSED)
layout_updated_cb(void *data, const Eldbus_Message *msg EINA_UNUSED)
{
E_DBusMenu_Ctx *ctx = data;
layout_update(ctx);
}
EAPI E_DBusMenu_Ctx *
e_dbusmenu_load(EDBus_Connection *conn, const char *bus, const char *path, const void *data)
e_dbusmenu_load(Eldbus_Connection *conn, const char *bus, const char *path, const void *data)
{
EDBus_Object *obj;
Eldbus_Object *obj;
E_DBusMenu_Ctx *ctx;
EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
@ -350,23 +350,23 @@ e_dbusmenu_load(EDBus_Connection *conn, const char *bus, const char *path, const
ctx->data = (void *)data;
edbus_connection_ref(conn);
obj = edbus_object_get(conn, bus, path);
ctx->proxy = edbus_proxy_get(obj, DBUS_MENU_IFACE);
eldbus_connection_ref(conn);
obj = eldbus_object_get(conn, bus, path);
ctx->proxy = eldbus_proxy_get(obj, DBUS_MENU_IFACE);
layout_update(ctx);
edbus_proxy_signal_handler_add(ctx->proxy,
eldbus_proxy_signal_handler_add(ctx->proxy,
"ItemActivationRequested",
menu_pop_request, ctx);
edbus_proxy_property_get(ctx->proxy, "IconThemePath",
eldbus_proxy_property_get(ctx->proxy, "IconThemePath",
icon_theme_path_get_cb, ctx);
edbus_proxy_properties_changed_callback_add(ctx->proxy,
eldbus_proxy_properties_changed_callback_add(ctx->proxy,
prop_changed_cb, ctx);
edbus_proxy_signal_handler_add(ctx->proxy, "ItemsPropertiesUpdated",
eldbus_proxy_signal_handler_add(ctx->proxy, "ItemsPropertiesUpdated",
layout_updated_cb, ctx);
edbus_proxy_signal_handler_add(ctx->proxy, "LayoutUpdated",
eldbus_proxy_signal_handler_add(ctx->proxy, "LayoutUpdated",
layout_updated_cb, ctx);
return ctx;
}
@ -374,44 +374,44 @@ e_dbusmenu_load(EDBus_Connection *conn, const char *bus, const char *path, const
EAPI void
e_dbusmenu_event_send(E_DBusMenu_Item *m, E_DBusMenu_Item_Event event)
{
EDBus_Message *msg;
EDBus_Message_Iter *main_iter, *var;
Eldbus_Message *msg;
Eldbus_Message_Iter *main_iter, *var;
unsigned int timestamp = (unsigned int)time(NULL);
EINA_SAFETY_ON_NULL_RETURN(m);
EINA_SAFETY_ON_FALSE_RETURN(event < E_DBUSMENU_ITEM_EVENT_LAST);
EINA_SAFETY_ON_NULL_RETURN(m->ctx);
msg = edbus_proxy_method_call_new(m->ctx->proxy, "Event");
main_iter = edbus_message_iter_get(msg);
edbus_message_iter_arguments_append(main_iter, "is", m->id,
msg = eldbus_proxy_method_call_new(m->ctx->proxy, "Event");
main_iter = eldbus_message_iter_get(msg);
eldbus_message_iter_arguments_append(main_iter, "is", m->id,
Menu_Item_Event_Names[event]);
var = edbus_message_iter_container_new(main_iter, 'v', "s");
var = eldbus_message_iter_container_new(main_iter, 'v', "s");
/* dummy data */
edbus_message_iter_arguments_append(var, "s", "");
edbus_message_iter_container_close(main_iter, var);
eldbus_message_iter_arguments_append(var, "s", "");
eldbus_message_iter_container_close(main_iter, var);
edbus_message_iter_arguments_append(main_iter, "u", timestamp);
eldbus_message_iter_arguments_append(main_iter, "u", timestamp);
edbus_proxy_send(m->ctx->proxy, msg, NULL, NULL, -1);
edbus_message_unref(msg);
eldbus_proxy_send(m->ctx->proxy, msg, NULL, NULL, -1);
eldbus_message_unref(msg);
}
EAPI void
e_dbusmenu_unload(E_DBusMenu_Ctx *ctx)
{
EDBus_Connection *conn;
EDBus_Object *obj;
Eldbus_Connection *conn;
Eldbus_Object *obj;
EINA_SAFETY_ON_NULL_RETURN(ctx);
if (ctx->root_menu)
dbus_menu_free(ctx->root_menu);
obj = edbus_proxy_object_get(ctx->proxy);
conn = edbus_object_connection_get(obj);
edbus_proxy_unref(ctx->proxy);
edbus_object_unref(obj);
edbus_connection_unref(conn);
obj = eldbus_proxy_object_get(ctx->proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(ctx->proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
free(ctx);
}

@ -2,7 +2,7 @@
#define _E_DBUSMENU_H_
#include <Eina.h>
#include <EDBus.h>
#include <Eldbus.h>
typedef enum {
E_DBUSMENU_ITEM_TYPE_STANDARD = 0,
@ -61,7 +61,7 @@ struct _E_DBusMenu_Item
typedef void (*E_DBusMenu_Pop_Request_Cb)(void *data, const E_DBusMenu_Item *item);
typedef void (*E_DBusMenu_Update_Cb)(void *data, E_DBusMenu_Item *new_root_item);
EAPI E_DBusMenu_Ctx * e_dbusmenu_load(EDBus_Connection *conn, const char *bus, const char *path, const void *data);
EAPI E_DBusMenu_Ctx * e_dbusmenu_load(Eldbus_Connection *conn, const char *bus, const char *path, const void *data);
EAPI void e_dbusmenu_unload(E_DBusMenu_Ctx *ctx);
EAPI void e_dbusmenu_update_cb_set(E_DBusMenu_Ctx *menu_data, E_DBusMenu_Update_Cb cb);
EAPI void e_dbusmenu_pop_request_cb_set(E_DBusMenu_Ctx *menu_data, E_DBusMenu_Pop_Request_Cb cb);

@ -71,7 +71,7 @@ static Efm_Mode mode = EFM_MODE_USING_RASTER_MOUNT;
/* FIXME: things to add to the slave enlightenment_fm process and ipc to e:
*
* * reporting results of fop's (current status - what has been don, what failed etc.)
* * dbus removable device monitoring (in e17 itself now via edbus - move to enlightenment_fm and ipc removable device add/del and anything else)
* * dbus removable device monitoring (in e17 itself now via eldbus - move to enlightenment_fm and ipc removable device add/del and anything else)
* * mount/umount of removable devices (to go along with removable device support - put it in here and message back mount success/failure and where it is now mounted - remove from e17 itself)
*
*/

@ -45,7 +45,7 @@ void *alloca(size_t);
#include <Ecore_Ipc.h>
#include <Ecore_File.h>
#include <Eet.h>
#include <EDBus.h>
#include <Eldbus.h>
#include "e_fm_shared_device.h"
#include "e_fm_shared_codec.h"
@ -60,22 +60,22 @@ void *alloca(size_t);
#define UDISKS_INTERFACE "org.freedesktop.UDisks"
#define UDISKS_DEVICE_INTERFACE "org.freedesktop.UDisks.Device"
static EDBus_Connection *_e_fm_main_udisks_conn = NULL;
static EDBus_Proxy *_e_fm_main_udisks_proxy = NULL;
static Eldbus_Connection *_e_fm_main_udisks_conn = NULL;
static Eldbus_Proxy *_e_fm_main_udisks_proxy = NULL;
static Eina_List *_e_stores = NULL;
static Eina_List *_e_vols = NULL;
static void _e_fm_main_udisks_cb_dev_all(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static void _e_fm_main_udisks_cb_dev_verify(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static void _e_fm_main_udisks_cb_dev_add(void *data, const EDBus_Message *msg);
static void _e_fm_main_udisks_cb_dev_del(void *data, const EDBus_Message *msg);
static void _e_fm_main_udisks_cb_prop_modified(void *data, const EDBus_Message *msg);
static void _e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static void _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static void _e_fm_main_udisks_cb_dev_all(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending);
static void _e_fm_main_udisks_cb_dev_verify(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending);
static void _e_fm_main_udisks_cb_dev_add(void *data, const Eldbus_Message *msg);
static void _e_fm_main_udisks_cb_dev_del(void *data, const Eldbus_Message *msg);
static void _e_fm_main_udisks_cb_prop_modified(void *data, const Eldbus_Message *msg);
static void _e_fm_main_udisks_cb_store_prop(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending);
static void _e_fm_main_udisks_cb_vol_prop(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending);
static void _e_fm_main_udisks_cb_vol_mounted(E_Volume *v);
static void _e_fm_main_udisks_cb_vol_unmounted(E_Volume *v);
static void _e_fm_main_udisks_cb_vol_unmounted_before_eject(E_Volume *v);
@ -95,56 +95,56 @@ static E_Volume *_volume_find_by_dbus_path(const char *path);
static void _volume_del(E_Volume *v);
static void
_e_fm_main_udisks_name_start(void *data __UNUSED__, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_name_start(void *data __UNUSED__, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
unsigned flag = 0;
EDBus_Object *obj;
Eldbus_Object *obj;
if (!edbus_message_arguments_get(msg, "u", &flag) || !flag)
if (!eldbus_message_arguments_get(msg, "u", &flag) || !flag)
{
_e_fm_main_udisks_catch(EINA_FALSE);
return;
}
obj = edbus_object_get(_e_fm_main_udisks_conn, UDISKS_BUS, UDISKS_PATH);
_e_fm_main_udisks_proxy = edbus_proxy_get(obj, UDISKS_INTERFACE);
obj = eldbus_object_get(_e_fm_main_udisks_conn, UDISKS_BUS, UDISKS_PATH);
_e_fm_main_udisks_proxy = eldbus_proxy_get(obj, UDISKS_INTERFACE);
edbus_proxy_call(_e_fm_main_udisks_proxy, "EnumerateDevices",
eldbus_proxy_call(_e_fm_main_udisks_proxy, "EnumerateDevices",
_e_fm_main_udisks_cb_dev_all, NULL, -1, "");
edbus_proxy_signal_handler_add(_e_fm_main_udisks_proxy, "DeviceAdded",
eldbus_proxy_signal_handler_add(_e_fm_main_udisks_proxy, "DeviceAdded",
_e_fm_main_udisks_cb_dev_add, NULL);
edbus_proxy_signal_handler_add(_e_fm_main_udisks_proxy, "DeviceRemoved",
eldbus_proxy_signal_handler_add(_e_fm_main_udisks_proxy, "DeviceRemoved",
_e_fm_main_udisks_cb_dev_del, NULL);
_e_fm_main_udisks_catch(EINA_TRUE); /* signal usage of udisks for mounting */
}
static void
_e_fm_main_udisks_cb_dev_all(void *data __UNUSED__, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_cb_dev_all(void *data __UNUSED__, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
const char *name, *txt, *path;
EDBus_Message_Iter *array;
Eldbus_Message_Iter *array;
if (edbus_message_error_get(msg, &name, &txt))
if (eldbus_message_error_get(msg, &name, &txt))
{
ERR("Error %s %s.", name, txt);
return;
}
if (!edbus_message_arguments_get(msg, "ao", &array))
if (!eldbus_message_arguments_get(msg, "ao", &array))
{
ERR("Error getting arguments.");
return;
}
while (edbus_message_iter_get_and_next(array, 'o', &path))
while (eldbus_message_iter_get_and_next(array, 'o', &path))
{
EDBus_Message *new_msg;
new_msg = edbus_message_method_call_new(UDISKS_BUS, path,
EDBUS_FDO_INTERFACE_PROPERTIES, "Get");
edbus_message_arguments_append(new_msg, "ss", UDISKS_DEVICE_INTERFACE, "IdUsage");
edbus_connection_send(_e_fm_main_udisks_conn, new_msg,
Eldbus_Message *new_msg;
new_msg = eldbus_message_method_call_new(UDISKS_BUS, path,
ELDBUS_FDO_INTERFACE_PROPERTIES, "Get");
eldbus_message_arguments_append(new_msg, "ss", UDISKS_DEVICE_INTERFACE, "IdUsage");
eldbus_connection_send(_e_fm_main_udisks_conn, new_msg,
_e_fm_main_udisks_cb_dev_verify,
eina_stringshare_add(path), -1);
INF("DB INIT DEV+: %s", path);
@ -153,25 +153,25 @@ _e_fm_main_udisks_cb_dev_all(void *data __UNUSED__, const EDBus_Message *msg,
static void
_e_fm_main_udisks_cb_dev_verify(void *data, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_cb_dev_verify(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
const char *name, *txt, *id_usage, *path = data;
EDBus_Message_Iter *variant;
Eldbus_Message_Iter *variant;
if (edbus_message_error_get(msg, &name, &txt))
if (eldbus_message_error_get(msg, &name, &txt))
{
ERR("Error %s %s.", name, txt);
goto error;
}
if (!edbus_message_arguments_get(msg, "v", &variant))
if (!eldbus_message_arguments_get(msg, "v", &variant))
{
ERR("Error getting arguments.");
goto error;
}
if (!edbus_message_iter_arguments_get(variant, "s", &id_usage))
if (!eldbus_message_iter_arguments_get(variant, "s", &id_usage))
{
ERR("Type of variant not expected");
goto error;
@ -189,25 +189,25 @@ error:
}
static void
_e_fm_main_udisks_cb_dev_verify_added(void *data, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_cb_dev_verify_added(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
const char *name, *txt, *id_usage, *path = data;
EDBus_Message_Iter *variant;
Eldbus_Message_Iter *variant;
if (edbus_message_error_get(msg, &name, &txt))
if (eldbus_message_error_get(msg, &name, &txt))
{
ERR("Error %s %s.", name, txt);
goto error;
}
if (!edbus_message_arguments_get(msg, "v", &variant))
if (!eldbus_message_arguments_get(msg, "v", &variant))
{
ERR("Error getting arguments.");
goto error;
}
if (!edbus_message_iter_arguments_get(variant, "s", &id_usage))
if (!eldbus_message_iter_arguments_get(variant, "s", &id_usage))
{
ERR("Type of variant not expected");
goto error;
@ -221,7 +221,7 @@ _e_fm_main_udisks_cb_dev_verify_added(void *data, const EDBus_Message *msg,
if (!s)
_e_fm_main_udisks_storage_add(path);
else
edbus_proxy_property_get_all(s->proxy,
eldbus_proxy_property_get_all(s->proxy,
_e_fm_main_udisks_cb_store_prop, s);
}
else if(!strcmp(id_usage, "filesystem"))
@ -231,7 +231,7 @@ _e_fm_main_udisks_cb_dev_verify_added(void *data, const EDBus_Message *msg,
if (!v)
_e_fm_main_udisks_volume_add(path, EINA_TRUE);
else
edbus_proxy_property_get_all(v->proxy,
eldbus_proxy_property_get_all(v->proxy,
_e_fm_main_udisks_cb_vol_prop, v);
}
else
@ -242,37 +242,37 @@ error:
}
static void
_e_fm_main_udisks_cb_dev_add(void *data __UNUSED__, const EDBus_Message *msg)
_e_fm_main_udisks_cb_dev_add(void *data __UNUSED__, const Eldbus_Message *msg)
{
EDBus_Message *new;
Eldbus_Message *new;
E_Volume *v;
char *path;
if (!edbus_message_arguments_get(msg, "o", &path))
if (!eldbus_message_arguments_get(msg, "o", &path))
return;
DBG("DB DEV+: %s", path);
v = _volume_find_by_dbus_path(path);
if (v)
{
edbus_proxy_property_get_all(v->proxy, _e_fm_main_udisks_cb_vol_prop, v);
eldbus_proxy_property_get_all(v->proxy, _e_fm_main_udisks_cb_vol_prop, v);
return;
}
new = edbus_message_method_call_new(UDISKS_BUS, path, EDBUS_FDO_INTERFACE_PROPERTIES, "Get");
edbus_message_arguments_append(new, "ss", UDISKS_DEVICE_INTERFACE, "IdUsage");
edbus_connection_send(_e_fm_main_udisks_conn, new,
new = eldbus_message_method_call_new(UDISKS_BUS, path, ELDBUS_FDO_INTERFACE_PROPERTIES, "Get");
eldbus_message_arguments_append(new, "ss", UDISKS_DEVICE_INTERFACE, "IdUsage");
eldbus_connection_send(_e_fm_main_udisks_conn, new,
_e_fm_main_udisks_cb_dev_verify_added,
eina_stringshare_add(path), -1);
}
static void
_e_fm_main_udisks_cb_dev_del(void *data __UNUSED__, const EDBus_Message *msg)
_e_fm_main_udisks_cb_dev_del(void *data __UNUSED__, const Eldbus_Message *msg)
{
char *path;
E_Volume *v;
if (!edbus_message_arguments_get(msg, "o", &path))
if (!eldbus_message_arguments_get(msg, "o", &path))
return;
DBG("DB DEV-: %s", path);
if ((v = _volume_find_by_dbus_path(path)))
@ -286,10 +286,10 @@ _e_fm_main_udisks_cb_dev_del(void *data __UNUSED__, const EDBus_Message *msg)
static void
_e_fm_main_udisks_cb_prop_modified(void *data,
const EDBus_Message *msg __UNUSED__)
const Eldbus_Message *msg __UNUSED__)
{
E_Volume *v = data;
edbus_proxy_property_get_all(v->proxy, _e_fm_main_udisks_cb_vol_prop, v);
eldbus_proxy_property_get_all(v->proxy, _e_fm_main_udisks_cb_vol_prop, v);
}
static Eina_Bool
@ -301,41 +301,41 @@ _storage_del(void *data)
}
static void
_e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_cb_store_prop(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
E_Storage *s = data;
const char *name, *txt;
EDBus_Message_Iter *dict, *entry;
Eldbus_Message_Iter *dict, *entry;
if (edbus_message_error_get(msg, &name, &txt))
if (eldbus_message_error_get(msg, &name, &txt))
{
ERR("Error %s %s.", name, txt);
return;
}
if (!edbus_message_arguments_get(msg, "a{sv}", &dict))
if (!eldbus_message_arguments_get(msg, "a{sv}", &dict))
{
ERR("Error getting arguments.");
return;
}
while (edbus_message_iter_get_and_next(dict, 'e', &entry))
while (eldbus_message_iter_get_and_next(dict, 'e', &entry))
{
char *key;
EDBus_Message_Iter *var;
Eldbus_Message_Iter *var;
if (!edbus_message_iter_arguments_get(entry, "sv", &key, &var))
if (!eldbus_message_iter_arguments_get(entry, "sv", &key, &var))
continue;
if (!strcmp(key, "DeviceFile"))
{
const char *udi;
if (edbus_message_iter_arguments_get(var, "s", &udi))
if (eldbus_message_iter_arguments_get(var, "s", &udi))
eina_stringshare_replace(&s->udi, udi);
}
else if (!strcmp(key, "DriveConnectionInterface"))
{
const char *bus;
if (edbus_message_iter_arguments_get(var, "s", &bus))
if (eldbus_message_iter_arguments_get(var, "s", &bus))
{
if (s->bus)
eina_stringshare_del(bus);
@ -344,13 +344,13 @@ _e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
}
else if (!strcmp(key, "DriveMediaCompatibility"))
{
EDBus_Message_Iter *inner_array;
Eldbus_Message_Iter *inner_array;
const char *media;
if (!edbus_message_iter_arguments_get(var, "as", &inner_array))
if (!eldbus_message_iter_arguments_get(var, "as", &inner_array))
continue;
while(edbus_message_iter_get_and_next(inner_array, 's', &media))
while(eldbus_message_iter_get_and_next(inner_array, 's', &media))
{
eina_stringshare_replace(&s->drive_type, media);
break;
@ -359,13 +359,13 @@ _e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "DriveModel"))
{
const char *model;
if (edbus_message_iter_arguments_get(var, "s", &model))
if (eldbus_message_iter_arguments_get(var, "s", &model))
eina_stringshare_replace(&s->model, model);
}
else if (!strcmp(key, "DriveVendor"))
{
const char *vendor;
if (edbus_message_iter_arguments_get(var, "s", &vendor))
if (eldbus_message_iter_arguments_get(var, "s", &vendor))
{
if (s->vendor)
eina_stringshare_del(s->vendor);
@ -375,7 +375,7 @@ _e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "DriveSerial"))
{
const char *serial;
if (edbus_message_iter_arguments_get(var, "s", &serial))
if (eldbus_message_iter_arguments_get(var, "s", &serial))
{
if (s->serial)
eina_stringshare_del(s->serial);
@ -383,21 +383,21 @@ _e_fm_main_udisks_cb_store_prop(void *data, const EDBus_Message *msg,
}
}
else if (!strcmp(key, "DeviceIsSystemInternal"))
edbus_message_iter_arguments_get(var, "b", &s->system_internal);
eldbus_message_iter_arguments_get(var, "b", &s->system_internal);
else if (!strcmp(key, "DeviceIsMediaAvailable"))
edbus_message_iter_arguments_get(var, "b", &s->media_available);
eldbus_message_iter_arguments_get(var, "b", &s->media_available);
else if (!strcmp(key, "DeviceSize"))
edbus_message_iter_arguments_get(var, "t", &s->media_size);
eldbus_message_iter_arguments_get(var, "t", &s->media_size);
else if (!strcmp(key, "DriveIsMediaEjectable"))
edbus_message_iter_arguments_get(var, "b", &s->requires_eject);
eldbus_message_iter_arguments_get(var, "b", &s->requires_eject);
else if (!strcmp(key, "DriveCanDetach"))
edbus_message_iter_arguments_get(var, "b", &s->hotpluggable);
eldbus_message_iter_arguments_get(var, "b", &s->hotpluggable);
else if (!strcmp(key, "DeviceIsMediaChangeDetectionInhibited"))
edbus_message_iter_arguments_get(var, "b", &s->media_check_enabled);
eldbus_message_iter_arguments_get(var, "b", &s->media_check_enabled);
else if (!strcmp(key, "DevicePresentationIconName"))
{
const char *icon;
if (edbus_message_iter_arguments_get(var, "s", &icon))
if (eldbus_message_iter_arguments_get(var, "s", &icon))
{
if (s->icon.drive)
eina_stringshare_del(s->icon.drive);
@ -450,39 +450,39 @@ _idler_volume_del(void *data)
}
static void
_e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
EDBus_Pending *pending __UNUSED__)
_e_fm_main_udisks_cb_vol_prop(void *data, const Eldbus_Message *msg,
Eldbus_Pending *pending __UNUSED__)
{
E_Volume *v = data;
E_Storage *s = NULL;
const char *txt, *message;
EDBus_Message_Iter *array, *dict;
Eldbus_Message_Iter *array, *dict;
DBG("volume=%s",v->dbus_path);
if (edbus_message_error_get(msg, &txt, &message))
if (eldbus_message_error_get(msg, &txt, &message))
{
ERR("Error: %s %s\nVolume: %s", txt, message, v->udi);
return;
}
if (!edbus_message_arguments_get(msg, "a{sv}", &array))
if (!eldbus_message_arguments_get(msg, "a{sv}", &array))
{
ERR("Error getting values.");
return;
}
while (edbus_message_iter_get_and_next(array, 'e', &dict))
while (eldbus_message_iter_get_and_next(array, 'e', &dict))
{
EDBus_Message_Iter *var;
Eldbus_Message_Iter *var;
const char *key;
if (!edbus_message_iter_arguments_get(dict, "sv", &key, &var))
if (!eldbus_message_iter_arguments_get(dict, "sv", &key, &var))
continue;
if (!strcmp(key, "DeviceFile"))
{
const char *udi;
if (!edbus_message_iter_arguments_get(var, "s", &udi))
if (!eldbus_message_iter_arguments_get(var, "s", &udi))
continue;
if (udi && v->first_time)
eina_stringshare_replace(&v->udi, udi);
@ -490,7 +490,7 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "DeviceIsSystemInternal"))
{
Eina_Bool internal;
edbus_message_iter_arguments_get(var, "b", &internal);
eldbus_message_iter_arguments_get(var, "b", &internal);
if (internal)
{
DBG("removing is internal %s", v->dbus_path);
@ -501,7 +501,7 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "DeviceIsMediaChangeDetectionInhibited"))
{
Eina_Bool inibited;
edbus_message_iter_arguments_get(var, "b", &inibited);
eldbus_message_iter_arguments_get(var, "b", &inibited);
if (inibited)
{
/* skip volumes with volume.ignore set */
@ -511,30 +511,30 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
}
}
else if (!strcmp(key, "DeviceIsLuks"))
edbus_message_iter_arguments_get(var, "b", &v->encrypted);
eldbus_message_iter_arguments_get(var, "b", &v->encrypted);
else if (!strcmp(key, "IdUuid"))
{
const char *uuid;
if (!edbus_message_iter_arguments_get(var, "s", &uuid))
if (!eldbus_message_iter_arguments_get(var, "s", &uuid))
continue;
eina_stringshare_replace(&v->uuid, uuid);
}
else if (!strcmp(key, "IdLabel"))
{
const char *label;
if (!edbus_message_iter_arguments_get(var, "s", &label))
if (!eldbus_message_iter_arguments_get(var, "s", &label))
continue;
eina_stringshare_replace(&v->label, label);
}
else if (!strcmp(key, "DeviceMountPaths"))
{
EDBus_Message_Iter *inner_array;
Eldbus_Message_Iter *inner_array;
const char *path;
if (!edbus_message_iter_arguments_get(var, "as", &inner_array))
if (!eldbus_message_iter_arguments_get(var, "as", &inner_array))
continue;
while (edbus_message_iter_get_and_next(inner_array, 's', &path))
while (eldbus_message_iter_get_and_next(inner_array, 's', &path))
{
eina_stringshare_replace(&v->mount_point, path);
break;
@ -543,24 +543,24 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "IdType"))
{
const char *type;
if (!edbus_message_iter_arguments_get(var, "s", &type))
if (!eldbus_message_iter_arguments_get(var, "s", &type))
continue;
eina_stringshare_replace(&v->fstype, type);
}
else if (!strcmp(key, "DeviceSize"))
edbus_message_iter_arguments_get(var, "t", &v->size);
eldbus_message_iter_arguments_get(var, "t", &v->size);
else if (!strcmp(key, "DeviceIsMounted"))
edbus_message_iter_arguments_get(var, "b", &v->mounted);
eldbus_message_iter_arguments_get(var, "b", &v->mounted);
else if (!strcmp(key, "DeviceIsLuksCleartext"))
edbus_message_iter_arguments_get(var, "b", &v->unlocked);
eldbus_message_iter_arguments_get(var, "b", &v->unlocked);
else if (!strcmp(key, "DeviceIsPartition"))
edbus_message_iter_arguments_get(var, "b", &v->partition);
eldbus_message_iter_arguments_get(var, "b", &v->partition);
else if (!strcmp(key, "PartitionNumber"))
edbus_message_iter_arguments_get(var, "i", &v->partition_number);
eldbus_message_iter_arguments_get(var, "i", &v->partition_number);
else if (!strcmp(key, "PartitionLabel"))
{
const char *partition_label;
if (!edbus_message_iter_arguments_get(var, "s", &partition_label))
if (!eldbus_message_iter_arguments_get(var, "s", &partition_label))
continue;
eina_stringshare_replace(&v->partition_label, partition_label);
}
@ -568,7 +568,7 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
{
const char *enc;
E_Volume *venc;
if (!edbus_message_iter_arguments_get(var, "o", &enc))
if (!eldbus_message_iter_arguments_get(var, "o", &enc))
continue;
eina_stringshare_replace(&v->partition_label, enc);
venc = _e_fm_main_udisks_volume_find(enc);
@ -581,7 +581,7 @@ _e_fm_main_udisks_cb_vol_prop(void *data, const EDBus_Message *msg,
else if (!strcmp(key, "PartitionSlave"))
{
char *partition_slave, buf[4096];
if (!edbus_message_iter_arguments_get(var, "o", &partition_slave))
if (!eldbus_message_iter_arguments_get(var, "o", &partition_slave))
continue;
if ((!partition_slave) || (strlen(partition_slave) < sizeof("/org/freedesktop/UDisks/devices/")))
eina_stringshare_replace(&v->parent, partition_slave);
@ -688,7 +688,7 @@ _e_fm_main_udisks_vol_mount_timeout(E_Volume *v)
v->guard = NULL;
if (v->op)
edbus_pending_cancel(v->op);
eldbus_pending_cancel(v->op);
v->op = NULL;
v->optype = E_VOLUME_OP_TYPE_NONE;
size = _e_fm_main_udisks_format_error_msg(&buf, v,
@ -737,7 +737,7 @@ _e_fm_main_udisks_vol_unmount_timeout(E_Volume *v)
v->guard = NULL;
if (v->op)
edbus_pending_cancel(v->op);
eldbus_pending_cancel(v->op);
v->op = NULL;
v->optype = E_VOLUME_OP_TYPE_NONE;
size = _e_fm_main_udisks_format_error_msg(&buf, v,
@ -788,7 +788,7 @@ _e_fm_main_udisks_vol_eject_timeout(E_Volume *v)
v->guard = NULL;
if (v->op)
edbus_pending_cancel(v->op);
eldbus_pending_cancel(v->op);
v->op = NULL;
v->optype = E_VOLUME_OP_TYPE_NONE;
size = _e_fm_main_udisks_format_error_msg(&buf, v,
@ -802,63 +802,63 @@ _e_fm_main_udisks_vol_eject_timeout(E_Volume *v)
}
static void
_volume_task_cb(void *data __UNUSED__, const EDBus_Message *msg __UNUSED__,
EDBus_Pending *pending __UNUSED__)
_volume_task_cb(void *data __UNUSED__, const Eldbus_Message *msg __UNUSED__,
Eldbus_Pending *pending __UNUSED__)
{
/**
* if edbus_proxy_send has callback == NULL it will return a NULL
* but we need a EDBus_Pending to be able to cancel it when timeout occurs
* if eldbus_proxy_send has callback == NULL it will return a NULL
* but we need a Eldbus_Pending to be able to cancel it when timeout occurs
*/
/* FIXME: this should not matter. If we don't have a callback, there's no
* reason to cancel it... cancelling has no effect other than saying edbus we
* reason to cancel it... cancelling has no effect other than saying eldbus we
* are not interested in the return anymore. I.e.: don't bother to cancel it
*/
}
static EDBus_Pending *
_volume_umount(EDBus_Proxy *proxy)
static Eldbus_Pending *
_volume_umount(Eldbus_Proxy *proxy)
{
EDBus_Message *msg;
EDBus_Message_Iter *array, *main_iter;
Eldbus_Message *msg;
Eldbus_Message_Iter *array, *main_iter;
msg = edbus_proxy_method_call_new(proxy, "FilesystemUnmount");
main_iter = edbus_message_iter_get(msg);
edbus_message_iter_arguments_append(main_iter, "as", &array);
edbus_message_iter_container_close(main_iter, array);
msg = eldbus_proxy_method_call_new(proxy, "FilesystemUnmount");
main_iter = eldbus_message_iter_get(msg);
eldbus_message_iter_arguments_append(main_iter, "as", &array);
eldbus_message_iter_container_close(main_iter, array);
return edbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
return eldbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
}
static EDBus_Pending *
_volume_eject(EDBus_Proxy *proxy)
static Eldbus_Pending *
_volume_eject(Eldbus_Proxy *proxy)
{
EDBus_Message *msg;
EDBus_Message_Iter *array, *main_iter;
Eldbus_Message *msg;
Eldbus_Message_Iter *array, *main_iter;
msg = edbus_proxy_method_call_new(proxy, "DriveEject");
main_iter = edbus_message_iter_get(msg);
edbus_message_iter_arguments_append(main_iter, "as", &array);
edbus_message_iter_container_close(main_iter, array);
msg = eldbus_proxy_method_call_new(proxy, "DriveEject");
main_iter = eldbus_message_iter_get(msg);
eldbus_message_iter_arguments_append(main_iter, "as", &array);
eldbus_message_iter_container_close(main_iter, array);
return edbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
return eldbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
}
static EDBus_Pending *
_volume_mount(EDBus_Proxy *proxy, const char *fstype, Eina_List *opt)
static Eldbus_Pending *
_volume_mount(Eldbus_Proxy *proxy, const char *fstype, Eina_List *opt)
{
EDBus_Message *msg;
EDBus_Message_Iter *array, *main_iter;
Eldbus_Message *msg;
Eldbus_Message_Iter *array, *main_iter;
Eina_List *l;
const char *opt_txt;
msg = edbus_proxy_method_call_new(proxy, "FilesystemMount");
main_iter = edbus_message_iter_get(msg);
edbus_message_iter_arguments_append(main_iter, "sas", fstype, &array);
msg = eldbus_proxy_method_call_new(proxy, "FilesystemMount");
main_iter = eldbus_message_iter_get(msg);
eldbus_message_iter_arguments_append(main_iter, "sas", fstype, &array);
EINA_LIST_FOREACH(opt, l, opt_txt)
edbus_message_iter_basic_append(array, 's', opt_txt);
edbus_message_iter_container_close(main_iter, array);
eldbus_message_iter_basic_append(array, 's', opt_txt);
eldbus_message_iter_container_close(main_iter, array);
return edbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
return eldbus_proxy_send(proxy, msg, _volume_task_cb, NULL, -1);
}
static Eina_Bool
@ -907,7 +907,7 @@ _e_fm_main_udisks_volume_add(const char *path,
Eina_Bool first_time)
{
E_Volume *v;
EDBus_Object *obj;
Eldbus_Object *obj;