mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 16:40:08 +01:00
Rework VPN connection handling for a more consistent D-Bus API. The VPNManager object has been removed, and active VPN connections are now the same as any other active connection. The Manager object's ActivateConnection and DeactivateConnection methods are used to start and stop a VPN connection, and the VPNConnection objects are subclasses of the ActiveConnection objects. When activating a VPN connection, pass the path of the active connection to which the VPN connection is tied in the 'specific_object' argument. Consequently, the libnm-glib API has been reworked to match this arrangement, with the VPNManager object removed, and the NMVPNConnection objects now being subclasses of NMActiveConnection. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3504 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
47 lines
2.2 KiB
C
47 lines
2.2 KiB
C
#ifndef NM_ACTIVE_CONNECTION_H
|
|
#define NM_ACTIVE_CONNECTION_H
|
|
|
|
#include <glib/gtypes.h>
|
|
#include <glib-object.h>
|
|
#include "nm-object.h"
|
|
#include <nm-connection.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#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))
|
|
#define NM_ACTIVE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass))
|
|
#define NM_IS_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_ACTIVE_CONNECTION))
|
|
#define NM_IS_ACTIVE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ACTIVE_CONNECTION))
|
|
#define NM_ACTIVE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass))
|
|
|
|
#define NM_ACTIVE_CONNECTION_SERVICE_NAME "service-name"
|
|
#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
|
|
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
|
|
#define NM_ACTIVE_CONNECTION_SHARED_SERVICE_NAME "shared-service-name"
|
|
#define NM_ACTIVE_CONNECTION_SHARED_CONNECTION "shared-connection"
|
|
#define NM_ACTIVE_CONNECTION_DEVICES "devices"
|
|
|
|
typedef struct {
|
|
NMObject parent;
|
|
} NMActiveConnection;
|
|
|
|
typedef struct {
|
|
NMObjectClass parent;
|
|
} NMActiveConnectionClass;
|
|
|
|
GType nm_active_connection_get_type (void);
|
|
|
|
GObject *nm_active_connection_new (DBusGConnection *connection, const char *path);
|
|
|
|
const char * nm_active_connection_get_service_name (NMActiveConnection *connection);
|
|
NMConnectionScope nm_active_connection_get_scope (NMActiveConnection *connection);
|
|
const char * nm_active_connection_get_connection (NMActiveConnection *connection);
|
|
const char * nm_active_connection_get_specific_object (NMActiveConnection *connection);
|
|
const char * nm_active_connection_get_shared_service_name (NMActiveConnection *connection);
|
|
const char * nm_active_connection_get_shared_connection (NMActiveConnection *connection);
|
|
const GPtrArray *nm_active_connection_get_devices (NMActiveConnection *connection);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* NM_ACTIVE_CONNECTION_H */
|