summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2021-04-23 09:11:24 +0200
committerDave Andreoli <dave@gurumeditation.it>2021-04-23 09:11:24 +0200
commit33bf589e68df36cc73d3d0c2a0e72ad5b5a35780 (patch)
tree98b273dce56821eb2e567c32425c110714bcba20
parent182b9bbd82ed09441c1bdf7dc7b815cec3055c1c (diff)
cleanup files structure and backend names
-rw-r--r--meson.build2
-rw-r--r--src/backend_eeze.c (renamed from src/e_mod_eeze.c)0
-rw-r--r--src/backend_eeze.h (renamed from src/e_mod_eeze.h)0
-rw-r--r--src/backend_mount.c (renamed from src/e_mod_mount.c)0
-rw-r--r--src/backend_mount.h (renamed from src/e_mod_mount.h)2
-rw-r--r--src/backend_systemd.c (renamed from src/e_mod_systemd.c)5
-rw-r--r--src/backend_systemd.h (renamed from src/e_mod_systemd.h)2
-rw-r--r--src/backend_udisks1.c (renamed from src/e_mod_udisks_eldbus.c)8
-rw-r--r--src/backend_udisks1.h8
-rw-r--r--src/backend_udisks2.c (renamed from src/e_mod_udisks2.c)0
-rw-r--r--src/backend_udisks2.h (renamed from src/e_mod_udisks2.h)2
-rw-r--r--src/e_mod_places.c20
-rw-r--r--src/e_mod_udisks_eldbus.h8
-rw-r--r--src/meson.build13
14 files changed, 34 insertions, 36 deletions
diff --git a/meson.build b/meson.build
index 300ec9b..d1f3a65 100644
--- a/meson.build
+++ b/meson.build
@@ -38,7 +38,7 @@ endif
38#### Udisks1 support #### 38#### Udisks1 support ####
39if get_option('udisks') == true 39if get_option('udisks') == true
40 dependency('udisks', required: true) 40 dependency('udisks', required: true)
41 config_h.set('PLACES_HAVE_UDISKS', 1) 41 config_h.set('PLACES_HAVE_UDISKS1', 1)
42endif 42endif
43 43
44 44
diff --git a/src/e_mod_eeze.c b/src/backend_eeze.c
index f48c967..f48c967 100644
--- a/src/e_mod_eeze.c
+++ b/src/backend_eeze.c
diff --git a/src/e_mod_eeze.h b/src/backend_eeze.h
index 03bd067..03bd067 100644
--- a/src/e_mod_eeze.h
+++ b/src/backend_eeze.h
diff --git a/src/e_mod_mount.c b/src/backend_mount.c
index e6a0ebf..e6a0ebf 100644
--- a/src/e_mod_mount.c
+++ b/src/backend_mount.c
diff --git a/src/e_mod_mount.h b/src/backend_mount.h
index d1a1712..49b37c7 100644
--- a/src/e_mod_mount.h
+++ b/src/backend_mount.h
@@ -1,7 +1,7 @@
1#ifndef E_MOD_PLACES_MOUNT_H 1#ifndef E_MOD_PLACES_MOUNT_H
2#define E_MOD_PLACES_MOUNT_H 2#define E_MOD_PLACES_MOUNT_H
3 3
4void places_mount_init(void); 4Eina_Bool places_mount_init(void);
5void places_mount_shutdown(void); 5void places_mount_shutdown(void);
6 6
7#endif 7#endif
diff --git a/src/e_mod_systemd.c b/src/backend_systemd.c
index cc3784d..9d54354 100644
--- a/src/e_mod_systemd.c
+++ b/src/backend_systemd.c
@@ -11,9 +11,9 @@
11 11
12/* 12/*
13 13
14NOTE 14NOTES
15 15
16- I remoti li vede solo con opzione "auto" in fstab !!!! 16- mounts in fstab seems to need the "auto" option to be seen over dbus :/
17 17
18*/ 18*/
19 19
@@ -25,7 +25,6 @@ NOTE
25#define SYSTEMD_MOUNT_IFACE "org.freedesktop.systemd1.Mount" 25#define SYSTEMD_MOUNT_IFACE "org.freedesktop.systemd1.Mount"
26 26
27 27
28
29/* Local backend data */ 28/* Local backend data */
30typedef struct Places_Systemd_Backend_Data 29typedef struct Places_Systemd_Backend_Data
31{ 30{
diff --git a/src/e_mod_systemd.h b/src/backend_systemd.h
index b5e527e..82f6ea5 100644
--- a/src/e_mod_systemd.h
+++ b/src/backend_systemd.h
@@ -1,7 +1,7 @@
1#ifndef E_MOD_PLACES_SYSTEMD_H 1#ifndef E_MOD_PLACES_SYSTEMD_H
2#define E_MOD_PLACES_SYSTEMD_H 2#define E_MOD_PLACES_SYSTEMD_H
3 3
4void places_systemd_init(void); 4Eina_Bool places_systemd_init(void);
5void places_systemd_shutdown(void); 5void places_systemd_shutdown(void);
6 6
7#endif 7#endif
diff --git a/src/e_mod_udisks_eldbus.c b/src/backend_udisks1.c
index f7b4fa8..efea547 100644
--- a/src/e_mod_udisks_eldbus.c
+++ b/src/backend_udisks1.c
@@ -2,7 +2,7 @@
2#include "places_config.h" 2#include "places_config.h"
3 3
4 4
5#ifdef PLACES_HAVE_UDISKS 5#ifdef PLACES_HAVE_UDISKS1
6 6
7#include <e.h> 7#include <e.h>
8#include <Eldbus.h> 8#include <Eldbus.h>
@@ -37,9 +37,9 @@ static Eldbus_Proxy *_places_udisks_proxy = NULL;
37 37
38/* API */ 38/* API */
39Eina_Bool 39Eina_Bool
40places_udisks_eldbus_init(void) 40places_udisks1_init(void)
41{ 41{
42 printf("PLACES: udisks: init()\n"); 42 printf("PLACES: udisks1: init()\n");
43 43
44 if (!eldbus_init()) 44 if (!eldbus_init())
45 return EINA_FALSE; 45 return EINA_FALSE;
@@ -58,7 +58,7 @@ places_udisks_eldbus_init(void)
58} 58}
59 59
60void 60void
61places_udisks_eldbus_shutdown(void) 61places_udisks1_shutdown(void)
62{ 62{
63 if (_places_udisks_proxy) eldbus_proxy_unref(_places_udisks_proxy); 63 if (_places_udisks_proxy) eldbus_proxy_unref(_places_udisks_proxy);
64 if (_places_dbus_conn) eldbus_connection_unref(_places_dbus_conn); 64 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 @@
1#ifndef E_MOD_PLACES_UDISKS1_H
2#define E_MOD_PLACES_UDISKS1_H
3
4Eina_Bool places_udisks1_init(void);
5void places_udisks1_shutdown(void);
6
7#endif
8
diff --git a/src/e_mod_udisks2.c b/src/backend_udisks2.c
index 603049f..603049f 100644
--- a/src/e_mod_udisks2.c
+++ b/src/backend_udisks2.c
diff --git a/src/e_mod_udisks2.h b/src/backend_udisks2.h
index 1b05421..4371a9b 100644
--- a/src/e_mod_udisks2.h
+++ b/src/backend_udisks2.h
@@ -1,7 +1,7 @@
1#ifndef E_MOD_PLACES_UDISKS2_H 1#ifndef E_MOD_PLACES_UDISKS2_H
2#define E_MOD_PLACES_UDISKS2_H 2#define E_MOD_PLACES_UDISKS2_H
3 3
4void places_udisks2_init(void); 4Eina_Bool places_udisks2_init(void);
5void places_udisks2_shutdown(void); 5void places_udisks2_shutdown(void);
6 6
7#endif 7#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 @@
6 6
7 7
8#ifdef PLACES_HAVE_SYSTEMD 8#ifdef PLACES_HAVE_SYSTEMD
9# include "e_mod_systemd.h" 9# include "backend_systemd.h"
10#endif 10#endif
11 11
12#ifdef PLACES_HAVE_EEZE 12#ifdef PLACES_HAVE_EEZE
13# include "e_mod_eeze.h" 13# include "backend_eeze.h"
14#endif 14#endif
15 15
16#ifdef PLACES_HAVE_UDISKS 16#ifdef PLACES_HAVE_UDISKS1
17# include "e_mod_udisks_eldbus.h" 17# include "backend_udisks1.h"
18#endif 18#endif
19 19
20#ifdef PLACES_HAVE_UDISKS2 20#ifdef PLACES_HAVE_UDISKS2
21# include "e_mod_udisks2.h" 21# include "backend_udisks2.h"
22#endif 22#endif
23 23
24#ifdef PLACES_HAVE_MOUNT 24#ifdef PLACES_HAVE_MOUNT
25# include "e_mod_mount.h" 25# include "backend_mount.h"
26#endif 26#endif
27 27
28 28
@@ -76,8 +76,8 @@ places_init(void)
76#ifdef PLACES_HAVE_EEZE 76#ifdef PLACES_HAVE_EEZE
77 places_eeze_init(); 77 places_eeze_init();
78#endif 78#endif
79#ifdef PLACES_HAVE_UDISKS 79#ifdef PLACES_HAVE_UDISKS1
80 places_udisks_eldbus_init(); 80 places_udisks1_init();
81#endif 81#endif
82#ifdef PLACES_HAVE_UDISKS2 82#ifdef PLACES_HAVE_UDISKS2
83 places_udisks2_init(); 83 places_udisks2_init();
@@ -133,8 +133,8 @@ places_shutdown(void)
133#ifdef PLACES_HAVE_EEZE 133#ifdef PLACES_HAVE_EEZE
134 places_eeze_shutdown(); 134 places_eeze_shutdown();
135#endif 135#endif
136#ifdef PLACES_HAVE_UDISKS 136#ifdef PLACES_HAVE_UDISKS1
137 places_udisks_eldbus_shutdown(); 137 places_udisks1_shutdown();
138#endif 138#endif
139#ifdef PLACES_HAVE_UDISKS2 139#ifdef PLACES_HAVE_UDISKS2
140 places_udisks2_shutdown(); 140 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 @@
1#ifndef E_MOD_PLACES_UDISKS_ELDBUS_H
2#define E_MOD_PLACES_UDISKS_ELDBUS_H
3
4void places_udisks_eldbus_init(void);
5void places_udisks_eldbus_shutdown(void);
6
7#endif
8
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 @@
1 1
2module = shared_module( 2module = shared_module('module',
3 'module',
4 'e_mod_main.c', 3 'e_mod_main.c',
5 'e_mod_config.c', 4 'e_mod_config.c',
6 'e_mod_places.c', 5 'e_mod_places.c',
7 6
8 'e_mod_udisks2.c', 7 'backend_udisks1.c',
9 'e_mod_udisks_eldbus.c', 8 'backend_udisks2.c',
10 'e_mod_mount.c', 9 'backend_mount.c',
11 'e_mod_eeze.c', 10 'backend_eeze.c',
12 'e_mod_systemd.c', 11 'backend_systemd.c',
13 12
14 dependencies : [dep_e, dep_intl], 13 dependencies : [dep_e, dep_intl],
15 install_dir: lib_install_dir, 14 install_dir: lib_install_dir,