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 */
/* 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 */
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
#include <string.h>
-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
}
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);
#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)
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;
};