2008-11-03 04:13:42 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
2008-03-26 13:43:01 +00:00
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2008-06-26 18:31:52 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-03-26 13:43:01 +00:00
|
|
|
*
|
2012-02-03 14:53:09 -06:00
|
|
|
* Copyright (C) 2008 - 2012 Red Hat, Inc.
|
2008-03-26 13:43:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef NM_ACTIVE_CONNECTION_H
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_H
|
|
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2012-08-22 09:38:01 -05:00
|
|
|
#include "nm-types.h"
|
2008-03-26 13:43:01 +00:00
|
|
|
#include "nm-connection.h"
|
2013-07-29 13:11:47 -05:00
|
|
|
#include "nm-auth-subject.h"
|
2008-03-26 13:43:01 +00:00
|
|
|
|
2012-02-03 14:53:09 -06:00
|
|
|
#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))
|
2012-07-27 13:15:54 +02:00
|
|
|
#define NM_IS_ACTIVE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_ACTIVE_CONNECTION))
|
2012-02-03 14:53:09 -06:00
|
|
|
#define NM_ACTIVE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass))
|
|
|
|
|
|
2012-08-22 09:38:01 -05:00
|
|
|
/* D-Bus Exported Properties */
|
2012-02-03 14:53:09 -06:00
|
|
|
#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_UUID "uuid"
|
2008-03-26 13:43:01 +00:00
|
|
|
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
|
2012-02-03 14:53:09 -06:00
|
|
|
#define NM_ACTIVE_CONNECTION_DEVICES "devices"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_STATE "state"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_DEFAULT "default"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_VPN "vpn"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_MASTER "master"
|
|
|
|
|
|
2012-08-22 09:38:01 -05:00
|
|
|
/* Internal non-exported construct-time properties */
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_INT_CONNECTION "int-connection"
|
|
|
|
|
#define NM_ACTIVE_CONNECTION_INT_DEVICE "int-device"
|
2013-07-29 13:11:47 -05:00
|
|
|
#define NM_ACTIVE_CONNECTION_INT_SUBJECT "int-subject"
|
2012-08-22 09:38:01 -05:00
|
|
|
#define NM_ACTIVE_CONNECTION_INT_MASTER "int-master"
|
|
|
|
|
|
2012-02-03 14:53:09 -06:00
|
|
|
typedef struct {
|
|
|
|
|
GObject parent;
|
|
|
|
|
} NMActiveConnection;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
GObjectClass parent;
|
|
|
|
|
} NMActiveConnectionClass;
|
|
|
|
|
|
|
|
|
|
GType nm_active_connection_get_type (void);
|
|
|
|
|
|
2012-09-17 10:53:41 -05:00
|
|
|
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);
|
|
|
|
|
|
2012-08-22 09:38:01 -05:00
|
|
|
void nm_active_connection_export (NMActiveConnection *self);
|
2012-02-03 14:53:09 -06:00
|
|
|
|
|
|
|
|
NMConnection *nm_active_connection_get_connection (NMActiveConnection *self);
|
2012-09-17 10:53:41 -05:00
|
|
|
|
2012-09-21 12:33:13 +02:00
|
|
|
const char * nm_active_connection_get_name (NMActiveConnection *self);
|
2012-02-03 14:53:09 -06:00
|
|
|
|
|
|
|
|
const char * nm_active_connection_get_path (NMActiveConnection *self);
|
|
|
|
|
|
|
|
|
|
const char * nm_active_connection_get_specific_object (NMActiveConnection *self);
|
|
|
|
|
|
|
|
|
|
void nm_active_connection_set_specific_object (NMActiveConnection *self,
|
|
|
|
|
const char *specific_object);
|
|
|
|
|
|
|
|
|
|
void nm_active_connection_set_default (NMActiveConnection *self,
|
|
|
|
|
gboolean is_default);
|
|
|
|
|
|
|
|
|
|
gboolean nm_active_connection_get_default (NMActiveConnection *self);
|
|
|
|
|
|
|
|
|
|
void nm_active_connection_set_default6 (NMActiveConnection *self,
|
|
|
|
|
gboolean is_default6);
|
|
|
|
|
|
|
|
|
|
gboolean nm_active_connection_get_default6 (NMActiveConnection *self);
|
|
|
|
|
|
2012-02-26 17:38:41 -06:00
|
|
|
NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *self);
|
|
|
|
|
|
2012-02-03 14:53:09 -06:00
|
|
|
void nm_active_connection_set_state (NMActiveConnection *self,
|
|
|
|
|
NMActiveConnectionState state);
|
2008-03-26 13:43:01 +00:00
|
|
|
|
2012-08-22 09:38:01 -05:00
|
|
|
NMDevice * nm_active_connection_get_device (NMActiveConnection *self);
|
|
|
|
|
|
2013-07-29 13:11:47 -05:00
|
|
|
NMAuthSubject *nm_active_connection_get_subject (NMActiveConnection *self);
|
|
|
|
|
|
2012-08-22 09:38:01 -05:00
|
|
|
gboolean nm_active_connection_get_user_requested (NMActiveConnection *self);
|
|
|
|
|
|
|
|
|
|
gulong nm_active_connection_get_user_uid (NMActiveConnection *self);
|
|
|
|
|
|
2013-08-27 12:16:57 -05:00
|
|
|
NMActiveConnection *nm_active_connection_get_master (NMActiveConnection *self);
|
2012-08-22 09:38:01 -05:00
|
|
|
|
2013-08-27 12:16:57 -05:00
|
|
|
void nm_active_connection_set_master (NMActiveConnection *self,
|
|
|
|
|
NMActiveConnection *master);
|
2013-07-29 16:26:09 -05:00
|
|
|
|
2008-03-26 13:43:01 +00:00
|
|
|
#endif /* NM_ACTIVE_CONNECTION_H */
|