summaryrefslogtreecommitdiff
path: root/src/nm-active-connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-active-connection.h')
-rw-r--r--src/nm-active-connection.h62
1 files changed, 51 insertions, 11 deletions
diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h
index 2f17c5834..0d96c8723 100644
--- a/src/nm-active-connection.h
+++ b/src/nm-active-connection.h
@@ -24,6 +24,7 @@
#include <glib-object.h>
#include "nm-types.h"
#include "nm-connection.h"
+#include "nm-auth-subject.h"
#define NM_TYPE_ACTIVE_CONNECTION (nm_active_connection_get_type ())
#define NM_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnection))
@@ -34,23 +35,27 @@
/* D-Bus Exported Properties */
#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
+#define NM_ACTIVE_CONNECTION_ID "id"
#define NM_ACTIVE_CONNECTION_UUID "uuid"
+#define NM_ACTIVE_CONNECTION_TYPE "type"
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
#define NM_ACTIVE_CONNECTION_DEVICES "devices"
#define NM_ACTIVE_CONNECTION_STATE "state"
#define NM_ACTIVE_CONNECTION_DEFAULT "default"
+#define NM_ACTIVE_CONNECTION_IP4_CONFIG "ip4-config"
+#define NM_ACTIVE_CONNECTION_DHCP4_CONFIG "dhcp4-config"
#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6"
+#define NM_ACTIVE_CONNECTION_IP6_CONFIG "ip6-config"
+#define NM_ACTIVE_CONNECTION_DHCP6_CONFIG "dhcp6-config"
#define NM_ACTIVE_CONNECTION_VPN "vpn"
#define NM_ACTIVE_CONNECTION_MASTER "master"
-/* Internal non-exported construct-time properties */
+/* Internal non-exported properties */
#define NM_ACTIVE_CONNECTION_INT_CONNECTION "int-connection"
#define NM_ACTIVE_CONNECTION_INT_DEVICE "int-device"
-#define NM_ACTIVE_CONNECTION_INT_USER_REQUESTED "int-user-requested"
-#define NM_ACTIVE_CONNECTION_INT_USER_UID "int-user-uid"
-#define NM_ACTIVE_CONNECTION_INT_ASSUMED "int-assumed"
+#define NM_ACTIVE_CONNECTION_INT_SUBJECT "int-subject"
#define NM_ACTIVE_CONNECTION_INT_MASTER "int-master"
-
+#define NM_ACTIVE_CONNECTION_INT_MASTER_READY "int-master-ready"
typedef struct {
GObject parent;
@@ -59,16 +64,41 @@ typedef struct {
typedef struct {
GObjectClass parent;
- /* Signals */
- void (*properties_changed) (NMActiveConnection *active, GHashTable *properties);
+ /* re-emits device state changes as a convenience for subclasses for
+ * device states >= DISCONNECTED.
+ */
+ void (*device_state_changed) (NMActiveConnection *connection,
+ NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state);
+ void (*master_failed) (NMActiveConnection *connection);
} NMActiveConnectionClass;
GType nm_active_connection_get_type (void);
+typedef void (*NMActiveConnectionAuthResultFunc) (NMActiveConnection *self,
+ gboolean success,
+ const char *error_desc,
+ gpointer user_data1,
+ gpointer user_data2);
+
+void nm_active_connection_authorize (NMActiveConnection *self,
+ NMActiveConnectionAuthResultFunc result_func,
+ gpointer user_data1,
+ gpointer user_data2);
+
void nm_active_connection_export (NMActiveConnection *self);
NMConnection *nm_active_connection_get_connection (NMActiveConnection *self);
-const char * nm_active_connection_get_name (NMActiveConnection *self);
+
+void nm_active_connection_set_connection (NMActiveConnection *self,
+ NMConnection *connection);
+
+const char * nm_active_connection_get_id (NMActiveConnection *self);
+
+const char * nm_active_connection_get_uuid (NMActiveConnection *self);
+
+const char * nm_active_connection_get_connection_type (NMActiveConnection *self);
const char * nm_active_connection_get_path (NMActiveConnection *self);
@@ -94,12 +124,22 @@ void nm_active_connection_set_state (NMActiveConnection *self,
NMDevice * nm_active_connection_get_device (NMActiveConnection *self);
+gboolean nm_active_connection_set_device (NMActiveConnection *self, NMDevice *device);
+
+NMAuthSubject *nm_active_connection_get_subject (NMActiveConnection *self);
+
gboolean nm_active_connection_get_user_requested (NMActiveConnection *self);
-gulong nm_active_connection_get_user_uid (NMActiveConnection *self);
+NMActiveConnection *nm_active_connection_get_master (NMActiveConnection *self);
-gboolean nm_active_connection_get_assumed (NMActiveConnection *self);
+gboolean nm_active_connection_get_master_ready (NMActiveConnection *self);
-NMDevice * nm_active_connection_get_master (NMActiveConnection *self);
+void nm_active_connection_set_master (NMActiveConnection *self,
+ NMActiveConnection *master);
+
+void nm_active_connection_set_assumed (NMActiveConnection *self,
+ gboolean assumed);
+
+gboolean nm_active_connection_get_assumed (NMActiveConnection *self);
#endif /* NM_ACTIVE_CONNECTION_H */