2007-12-24 Dan Williams <dcbw@redhat.com>

* libnm-util/nm-setting-connection.h
	  libnm-util/nm-setting-connection.c
		- Add 'lockdown' member



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3187 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-12-24 23:45:16 +00:00
parent d25f3a266b
commit 5b83f339fe
3 changed files with 29 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2007-12-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h
libnm-util/nm-setting-connection.c
- Add 'lockdown' member
2007-12-22 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless.c

View file

@ -11,6 +11,7 @@ enum {
PROP_TYPE,
PROP_AUTOCONNECT,
PROP_TIMESTAMP,
PROP_LOCKDOWN,
LAST_PROP
};
@ -87,6 +88,9 @@ set_property (GObject *object, guint prop_id,
case PROP_TIMESTAMP:
setting->timestamp = g_value_get_uint64 (value);
break;
case PROP_LOCKDOWN:
setting->lockdown = g_value_dup_string (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -112,6 +116,9 @@ get_property (GObject *object, guint prop_id,
case PROP_TIMESTAMP:
g_value_set_uint64 (value, setting->timestamp);
break;
case PROP_LOCKDOWN:
g_value_set_string (value, setting->lockdown);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -162,4 +169,12 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
"Connection timestamp",
0, G_MAXUINT64, 0,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_LOCKDOWN,
g_param_spec_string (NM_SETTING_CONNECTION_LOCKDOWN,
"Lockdown",
"Connection lockdown policy",
NULL,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}

View file

@ -20,6 +20,7 @@ G_BEGIN_DECLS
#define NM_SETTING_CONNECTION_TYPE "type"
#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
#define NM_SETTING_CONNECTION_LOCKDOWN "lockdown"
typedef struct {
NMSetting parent;
@ -28,6 +29,13 @@ typedef struct {
char *type;
gboolean autoconnect;
guint64 timestamp;
/* One of:
* device - specified device may only use this connection
* connection - only this connection may be used to connect to compatible
* networks (matched on SSID, Bluetooth address, etc)
*/
char *lockdown;
} NMSettingConnection;
typedef struct {