From 3887a0ca6459d048a184c0e060625dc6a640c782 Mon Sep 17 00:00:00 2001 From: englebass Date: Wed, 5 Nov 2008 20:32:18 +0000 Subject: [PATCH] connection_active -> active_connection git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@37499 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/nm/E_Nm.h | 12 ++++---- src/lib/nm/Makefile.am | 2 +- ...onnection_active.c => e_nm_active_connection.c} | 32 +++++++++++----------- src/lib/nm/e_nm_private.h | 8 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) rename src/lib/nm/{e_nm_connection_active.c => e_nm_active_connection.c} (83%) diff --git a/src/lib/nm/E_Nm.h b/src/lib/nm/E_Nm.h index 0750b85..b683704 100644 --- a/src/lib/nm/E_Nm.h +++ b/src/lib/nm/E_Nm.h @@ -237,8 +237,8 @@ typedef struct E_NMS E_NMS; typedef struct E_NMS_Connection E_NMS_Connection; /* No properties */ -typedef struct E_NM_Connection_Active E_NM_Connection_Active; -struct E_NM_Connection_Active +typedef struct E_NM_Active_Connection E_NM_Active_Connection; +struct E_NM_Active_Connection { char *service_name; char *connection; /* object_path */ @@ -333,11 +333,11 @@ extern "C" { /* TODO: e_nms_connection_callback_removed_set */ /* TODO: org.freedesktop.NetworkManager.Connection.Active api */ - EAPI int e_nm_connection_active_get(E_NM *nm, const char *conn, int (*cb_func)(void *data, E_NM_Connection_Active *conn), void *data); - EAPI void e_nm_connection_active_free(E_NM_Connection_Active *conn); - EAPI void e_nm_connection_active_dump(E_NM_Connection_Active *conn); + EAPI int e_nm_active_connection_get(E_NM *nm, const char *conn, int (*cb_func)(void *data, E_NM_Active_Connection *conn), void *data); + EAPI void e_nm_active_connection_free(E_NM_Active_Connection *conn); + EAPI void e_nm_active_connection_dump(E_NM_Active_Connection *conn); - EAPI void e_nm_connection_active_callback_properties_changed_set(E_NM_Connection_Active *conn, int (*cb_func)(E_NM_Connection_Active *conn)); + EAPI void e_nm_active_connection_callback_properties_changed_set(E_NM_Active_Connection *conn, int (*cb_func)(E_NM_Active_Connection *conn)); /* TODO: org.freedesktop.NetworkManager.VPN.Connection api */ /* TODO: org.freedesktop.NetworkManager.VPN.Plugin api */ diff --git a/src/lib/nm/Makefile.am b/src/lib/nm/Makefile.am index 7131bda..b0030fb 100644 --- a/src/lib/nm/Makefile.am +++ b/src/lib/nm/Makefile.am @@ -18,7 +18,7 @@ e_nm_device.c \ e_nm_ip4_config.c \ e_nms.c \ e_nms_connection.c \ -e_nm_connection_active.c \ +e_nm_active_connection.c \ e_nm_util.c diff --git a/src/lib/nm/e_nm_connection_active.c b/src/lib/nm/e_nm_active_connection.c similarity index 83% rename from src/lib/nm/e_nm_connection_active.c rename to src/lib/nm/e_nm_active_connection.c index 5afa1b8..3467547 100644 --- a/src/lib/nm/e_nm_connection_active.c +++ b/src/lib/nm/e_nm_active_connection.c @@ -3,42 +3,42 @@ #include -static Property connection_active_properties[] = { - { .name = "ServiceName", .sig = "s", .offset = offsetof(E_NM_Connection_Active, service_name) }, - { .name = "Connection", .sig = "o", .offset = offsetof(E_NM_Connection_Active, connection) }, - { .name = "SpecificObject", .sig = "o", .offset = offsetof(E_NM_Connection_Active, specific_object) }, - { .name = "Devices", .sig = "ao", .offset = offsetof(E_NM_Connection_Active, devices) }, - { .name = "State", .sig = "u", .offset = offsetof(E_NM_Connection_Active, state) }, - { .name = "Default", .sig = "b", .offset = offsetof(E_NM_Connection_Active, def) }, +static Property active_connection_properties[] = { + { .name = "ServiceName", .sig = "s", .offset = offsetof(E_NM_Active_Connection, service_name) }, + { .name = "Connection", .sig = "o", .offset = offsetof(E_NM_Active_Connection, connection) }, + { .name = "SpecificObject", .sig = "o", .offset = offsetof(E_NM_Active_Connection, specific_object) }, + { .name = "Devices", .sig = "ao", .offset = offsetof(E_NM_Active_Connection, devices) }, + { .name = "State", .sig = "u", .offset = offsetof(E_NM_Active_Connection, state) }, + { .name = "Default", .sig = "b", .offset = offsetof(E_NM_Active_Connection, def) }, { .name = NULL } }; EAPI int -e_nm_connection_active_get(E_NM *nm, const char *connection, - int (*cb_func)(void *data, E_NM_Connection_Active *conn), +e_nm_active_connection_get(E_NM *nm, const char *connection, + int (*cb_func)(void *data, E_NM_Active_Connection *conn), void *data) { E_NM_Internal *nmi; - E_NM_Connection_Active_Internal *conn; + E_NM_Active_Connection_Internal *conn; Property_Data *d; nmi = (E_NM_Internal *)nm; - conn = calloc(1, sizeof(E_NM_Connection_Active_Internal)); + conn = calloc(1, sizeof(E_NM_Active_Connection_Internal)); conn->nmi = nmi; d = calloc(1, sizeof(Property_Data)); d->nmi = nmi; d->cb_func = OBJECT_CB(cb_func); d->data = data; d->reply = conn; - d->property = connection_active_properties; + d->property = active_connection_properties; d->object = strdup(connection); - return e_nm_connection_active_properties_get(nmi->conn, d->object, d->property->name, property, d) ? 1 : 0; + return e_nm_active_connection_properties_get(nmi->conn, d->object, d->property->name, property, d) ? 1 : 0; } EAPI void -e_nm_connection_active_free(E_NM_Connection_Active *conn) +e_nm_active_connection_free(E_NM_Active_Connection *conn) { if (!conn) return; #if 0 @@ -70,10 +70,10 @@ e_nm_connection_active_free(E_NM_Connection_Active *conn) } EAPI void -e_nm_connection_active_dump(E_NM_Connection_Active *conn) +e_nm_active_connection_dump(E_NM_Active_Connection *conn) { if (!conn) return; - printf("E_NM_Connection_Active:\n"); + printf("E_NM_Active_Connection:\n"); #if 0 printf("udi : %s\n", dev->udi); printf("interface : %s\n", dev->interface); diff --git a/src/lib/nm/e_nm_private.h b/src/lib/nm/e_nm_private.h index 6a8e79c..b4cf1da 100644 --- a/src/lib/nm/e_nm_private.h +++ b/src/lib/nm/e_nm_private.h @@ -23,7 +23,7 @@ #define e_nm_access_point_properties_get(con, dev, prop, cb, data) e_dbus_properties_get(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_ACCESSPOINT, prop, (E_DBus_Method_Return_Cb) cb, data) #define e_nm_device_properties_get(con, dev, prop, cb, data) e_dbus_properties_get(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_DEVICE, prop, (E_DBus_Method_Return_Cb) cb, data) #define e_nm_ip4_config_properties_get(con, dev, prop, cb, data) e_dbus_properties_get(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_IP4CONFIG, prop, (E_DBus_Method_Return_Cb) cb, data) -#define e_nm_connection_active_properties_get(con, dev, prop, cb, data) e_dbus_properties_get(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_CONNECTION_ACTIVE, prop, (E_DBus_Method_Return_Cb) cb, data) +#define e_nm_active_connection_properties_get(con, dev, prop, cb, data) e_dbus_properties_get(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_CONNECTION_ACTIVE, prop, (E_DBus_Method_Return_Cb) cb, data) #define e_nm_signal_handler_add(con, sig, cb, data) e_dbus_signal_handler_add(con, _E_NM_SERVICE, E_NM_PATH, _E_NM_INTERFACE, sig, cb, data) #define e_nm_access_point_signal_handler_add(con, dev, sig, cb, data) e_dbus_signal_handler_add(con, _E_NM_SERVICE, dev, _E_NM_INTERFACE_ACCESSPOINT, sig, cb, data) @@ -106,10 +106,10 @@ struct E_NMS_Connection_Internal void *data; }; -typedef struct E_NM_Connection_Active_Internal E_NM_Connection_Active_Internal; -struct E_NM_Connection_Active_Internal +typedef struct E_NM_Active_Connection_Internal E_NM_Active_Connection_Internal; +struct E_NM_Active_Connection_Internal { - E_NM_Connection_Active conn; + E_NM_Active_Connection conn; E_NM_Internal *nmi; }; -- 2.7.4