From 33bf589e68df36cc73d3d0c2a0e72ad5b5a35780 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Fri, 23 Apr 2021 09:11:24 +0200 Subject: [PATCH] cleanup files structure and backend names --- meson.build | 2 +- src/{e_mod_eeze.c => backend_eeze.c} | 0 src/{e_mod_eeze.h => backend_eeze.h} | 0 src/{e_mod_mount.c => backend_mount.c} | 0 src/{e_mod_mount.h => backend_mount.h} | 2 +- src/{e_mod_systemd.c => backend_systemd.c} | 5 ++--- src/{e_mod_systemd.h => backend_systemd.h} | 2 +- ..._mod_udisks_eldbus.c => backend_udisks1.c} | 8 ++++---- src/backend_udisks1.h | 8 ++++++++ src/{e_mod_udisks2.c => backend_udisks2.c} | 0 src/{e_mod_udisks2.h => backend_udisks2.h} | 2 +- src/e_mod_places.c | 20 +++++++++---------- src/e_mod_udisks_eldbus.h | 8 -------- src/meson.build | 13 ++++++------ 14 files changed, 34 insertions(+), 36 deletions(-) rename src/{e_mod_eeze.c => backend_eeze.c} (100%) rename src/{e_mod_eeze.h => backend_eeze.h} (100%) rename src/{e_mod_mount.c => backend_mount.c} (100%) rename src/{e_mod_mount.h => backend_mount.h} (74%) rename src/{e_mod_systemd.c => backend_systemd.c} (99%) rename src/{e_mod_systemd.h => backend_systemd.h} (74%) rename src/{e_mod_udisks_eldbus.c => backend_udisks1.c} (99%) create mode 100644 src/backend_udisks1.h rename src/{e_mod_udisks2.c => backend_udisks2.c} (100%) rename src/{e_mod_udisks2.h => backend_udisks2.h} (74%) delete mode 100644 src/e_mod_udisks_eldbus.h diff --git a/meson.build b/meson.build index 300ec9b..d1f3a65 100644 --- a/meson.build +++ b/meson.build @@ -38,7 +38,7 @@ endif #### Udisks1 support #### if get_option('udisks') == true dependency('udisks', required: true) - config_h.set('PLACES_HAVE_UDISKS', 1) + config_h.set('PLACES_HAVE_UDISKS1', 1) endif diff --git a/src/e_mod_eeze.c b/src/backend_eeze.c similarity index 100% rename from src/e_mod_eeze.c rename to src/backend_eeze.c diff --git a/src/e_mod_eeze.h b/src/backend_eeze.h similarity index 100% rename from src/e_mod_eeze.h rename to src/backend_eeze.h diff --git a/src/e_mod_mount.c b/src/backend_mount.c similarity index 100% rename from src/e_mod_mount.c rename to src/backend_mount.c diff --git a/src/e_mod_mount.h b/src/backend_mount.h similarity index 74% rename from src/e_mod_mount.h rename to src/backend_mount.h index d1a1712..49b37c7 100644 --- a/src/e_mod_mount.h +++ b/src/backend_mount.h @@ -1,7 +1,7 @@ #ifndef E_MOD_PLACES_MOUNT_H #define E_MOD_PLACES_MOUNT_H -void places_mount_init(void); +Eina_Bool places_mount_init(void); void places_mount_shutdown(void); #endif diff --git a/src/e_mod_systemd.c b/src/backend_systemd.c similarity index 99% rename from src/e_mod_systemd.c rename to src/backend_systemd.c index cc3784d..9d54354 100644 --- a/src/e_mod_systemd.c +++ b/src/backend_systemd.c @@ -11,9 +11,9 @@ /* -NOTE +NOTES -- I remoti li vede solo con opzione "auto" in fstab !!!! +- mounts in fstab seems to need the "auto" option to be seen over dbus :/ */ @@ -25,7 +25,6 @@ NOTE #define SYSTEMD_MOUNT_IFACE "org.freedesktop.systemd1.Mount" - /* Local backend data */ typedef struct Places_Systemd_Backend_Data { diff --git a/src/e_mod_systemd.h b/src/backend_systemd.h similarity index 74% rename from src/e_mod_systemd.h rename to src/backend_systemd.h index b5e527e..82f6ea5 100644 --- a/src/e_mod_systemd.h +++ b/src/backend_systemd.h @@ -1,7 +1,7 @@ #ifndef E_MOD_PLACES_SYSTEMD_H #define E_MOD_PLACES_SYSTEMD_H -void places_systemd_init(void); +Eina_Bool places_systemd_init(void); void places_systemd_shutdown(void); #endif diff --git a/src/e_mod_udisks_eldbus.c b/src/backend_udisks1.c similarity index 99% rename from src/e_mod_udisks_eldbus.c rename to src/backend_udisks1.c index f7b4fa8..efea547 100644 --- a/src/e_mod_udisks_eldbus.c +++ b/src/backend_udisks1.c @@ -2,7 +2,7 @@ #include "places_config.h" -#ifdef PLACES_HAVE_UDISKS +#ifdef PLACES_HAVE_UDISKS1 #include #include @@ -37,9 +37,9 @@ static Eldbus_Proxy *_places_udisks_proxy = NULL; /* API */ Eina_Bool -places_udisks_eldbus_init(void) +places_udisks1_init(void) { - printf("PLACES: udisks: init()\n"); + printf("PLACES: udisks1: init()\n"); if (!eldbus_init()) return EINA_FALSE; @@ -58,7 +58,7 @@ places_udisks_eldbus_init(void) } void -places_udisks_eldbus_shutdown(void) +places_udisks1_shutdown(void) { if (_places_udisks_proxy) eldbus_proxy_unref(_places_udisks_proxy); if (_places_dbus_conn) eldbus_connection_unref(_places_dbus_conn); diff --git a/src/backend_udisks1.h b/src/backend_udisks1.h new file mode 100644 index 0000000..bc02f15 --- /dev/null +++ b/src/backend_udisks1.h @@ -0,0 +1,8 @@ +#ifndef E_MOD_PLACES_UDISKS1_H +#define E_MOD_PLACES_UDISKS1_H + +Eina_Bool places_udisks1_init(void); +void places_udisks1_shutdown(void); + +#endif + diff --git a/src/e_mod_udisks2.c b/src/backend_udisks2.c similarity index 100% rename from src/e_mod_udisks2.c rename to src/backend_udisks2.c diff --git a/src/e_mod_udisks2.h b/src/backend_udisks2.h similarity index 74% rename from src/e_mod_udisks2.h rename to src/backend_udisks2.h index 1b05421..4371a9b 100644 --- a/src/e_mod_udisks2.h +++ b/src/backend_udisks2.h @@ -1,7 +1,7 @@ #ifndef E_MOD_PLACES_UDISKS2_H #define E_MOD_PLACES_UDISKS2_H -void places_udisks2_init(void); +Eina_Bool places_udisks2_init(void); void places_udisks2_shutdown(void); #endif diff --git a/src/e_mod_places.c b/src/e_mod_places.c index cf615b6..6ea3cd6 100644 --- a/src/e_mod_places.c +++ b/src/e_mod_places.c @@ -6,23 +6,23 @@ #ifdef PLACES_HAVE_SYSTEMD -# include "e_mod_systemd.h" +# include "backend_systemd.h" #endif #ifdef PLACES_HAVE_EEZE -# include "e_mod_eeze.h" +# include "backend_eeze.h" #endif -#ifdef PLACES_HAVE_UDISKS -# include "e_mod_udisks_eldbus.h" +#ifdef PLACES_HAVE_UDISKS1 +# include "backend_udisks1.h" #endif #ifdef PLACES_HAVE_UDISKS2 -# include "e_mod_udisks2.h" +# include "backend_udisks2.h" #endif #ifdef PLACES_HAVE_MOUNT -# include "e_mod_mount.h" +# include "backend_mount.h" #endif @@ -76,8 +76,8 @@ places_init(void) #ifdef PLACES_HAVE_EEZE places_eeze_init(); #endif -#ifdef PLACES_HAVE_UDISKS - places_udisks_eldbus_init(); +#ifdef PLACES_HAVE_UDISKS1 + places_udisks1_init(); #endif #ifdef PLACES_HAVE_UDISKS2 places_udisks2_init(); @@ -133,8 +133,8 @@ places_shutdown(void) #ifdef PLACES_HAVE_EEZE places_eeze_shutdown(); #endif -#ifdef PLACES_HAVE_UDISKS - places_udisks_eldbus_shutdown(); +#ifdef PLACES_HAVE_UDISKS1 + places_udisks1_shutdown(); #endif #ifdef PLACES_HAVE_UDISKS2 places_udisks2_shutdown(); diff --git a/src/e_mod_udisks_eldbus.h b/src/e_mod_udisks_eldbus.h deleted file mode 100644 index 5b345ce..0000000 --- a/src/e_mod_udisks_eldbus.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef E_MOD_PLACES_UDISKS_ELDBUS_H -#define E_MOD_PLACES_UDISKS_ELDBUS_H - -void places_udisks_eldbus_init(void); -void places_udisks_eldbus_shutdown(void); - -#endif - diff --git a/src/meson.build b/src/meson.build index 3d78656..359fdd3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,15 +1,14 @@ -module = shared_module( - 'module', +module = shared_module('module', 'e_mod_main.c', 'e_mod_config.c', 'e_mod_places.c', - 'e_mod_udisks2.c', - 'e_mod_udisks_eldbus.c', - 'e_mod_mount.c', - 'e_mod_eeze.c', - 'e_mod_systemd.c', + 'backend_udisks1.c', + 'backend_udisks2.c', + 'backend_mount.c', + 'backend_eeze.c', + 'backend_systemd.c', dependencies : [dep_e, dep_intl], install_dir: lib_install_dir,