diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
| commit | 2c032d8f1c6292c1338a615e6ec40252889ba85c (patch) | |
| tree | 1f77182220b2b0264288ba4a476ab47e5bc48716 /src/settings/nm-settings-connection.h | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'src/settings/nm-settings-connection.h')
| -rw-r--r-- | src/settings/nm-settings-connection.h | 59 |
1 files changed, 45 insertions, 14 deletions
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h index 0c2ca849..254e927b 100644 --- a/src/settings/nm-settings-connection.h +++ b/src/settings/nm-settings-connection.h @@ -19,14 +19,14 @@ * (C) Copyright 2008 - 2013 Red Hat, Inc. */ -#ifndef NM_SETTINGS_CONNECTION_H -#define NM_SETTINGS_CONNECTION_H +#ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ +#define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ -#include <nm-connection.h> -#include "nm-settings-flags.h" -#include "nm-auth-subject.h" #include <net/ethernet.h> +#include <nm-connection.h> +#include "nm-types.h" + G_BEGIN_DECLS #define NM_TYPE_SETTINGS_CONNECTION (nm_settings_connection_get_type ()) @@ -48,8 +48,35 @@ G_BEGIN_DECLS /* Properties */ #define NM_SETTINGS_CONNECTION_VISIBLE "visible" #define NM_SETTINGS_CONNECTION_UNSAVED "unsaved" +#define NM_SETTINGS_CONNECTION_FLAGS "flags" + + +/** + * NMSettingsConnectionFlags: + * @NM_SETTINGS_CONNECTION_FLAGS_NONE: no flag set + * @NM_SETTINGS_CONNECTION_FLAGS_UNSAVED: the connection is not saved to disk + * @NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED: A connection is "nm-generated" if + * it was generated by NetworkManger. If the connection gets modified or saved + * by the user, the flag gets cleared. A nm-generated is implicitly unsaved. + * @NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED_ASSUMED: A special kind of "nm-generated" + * connection that was specifically created for connection assumption. "nm-generated-assumed" + * implies "nm-generated". + * @NM_SETTINGS_CONNECTION_FLAGS_ALL: special mask, for all known flags + * + * #NMSettingsConnection flags. + **/ +typedef enum +{ + NM_SETTINGS_CONNECTION_FLAGS_NONE = 0x00, + NM_SETTINGS_CONNECTION_FLAGS_UNSAVED = 0x01, + NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED = 0x02, + NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED_ASSUMED = 0x04, + + __NM_SETTINGS_CONNECTION_FLAGS_LAST, + NM_SETTINGS_CONNECTION_FLAGS_ALL = ((__NM_SETTINGS_CONNECTION_FLAGS_LAST - 1) << 1) - 1, +} NMSettingsConnectionFlags; + -typedef struct _NMSettingsConnection NMSettingsConnection; typedef struct _NMSettingsConnectionClass NMSettingsConnectionClass; typedef void (*NMSettingsConnectionCommitFunc) (NMSettingsConnection *connection, @@ -61,11 +88,11 @@ typedef void (*NMSettingsConnectionDeleteFunc) (NMSettingsConnection *connection gpointer user_data); struct _NMSettingsConnection { - NMConnection parent; + GObject parent; }; struct _NMSettingsConnectionClass { - NMConnectionClass parent; + GObjectClass parent; /* virtual methods */ void (*commit_changes) (NMSettingsConnection *connection, @@ -110,7 +137,7 @@ typedef void (*NMSettingsConnectionSecretsFunc) (NMSettingsConnection *connectio guint32 nm_settings_connection_get_secrets (NMSettingsConnection *connection, NMAuthSubject *subject, const char *setting_name, - NMSettingsGetSecretsFlags flags, + NMSecretAgentGetSecretsFlags flags, const char **hints, NMSettingsConnectionSecretsFunc callback, gpointer callback_data, @@ -130,6 +157,10 @@ void nm_settings_connection_signal_remove (NMSettingsConnection *self); gboolean nm_settings_connection_get_unsaved (NMSettingsConnection *self); +NMSettingsConnectionFlags nm_settings_connection_get_flags (NMSettingsConnection *connection); +NMSettingsConnectionFlags nm_settings_connection_set_flags (NMSettingsConnection *connection, NMSettingsConnectionFlags flags, gboolean set); +NMSettingsConnectionFlags nm_settings_connection_set_flags_all (NMSettingsConnection *connection, NMSettingsConnectionFlags flags); + gboolean nm_settings_connection_get_timestamp (NMSettingsConnection *connection, guint64 *out_timestamp); @@ -139,13 +170,13 @@ void nm_settings_connection_update_timestamp (NMSettingsConnection *connection, void nm_settings_connection_read_and_fill_timestamp (NMSettingsConnection *connection); -GSList *nm_settings_connection_get_seen_bssids (NMSettingsConnection *connection); +char **nm_settings_connection_get_seen_bssids (NMSettingsConnection *connection); gboolean nm_settings_connection_has_seen_bssid (NMSettingsConnection *connection, - const struct ether_addr *bssid); + const char *bssid); void nm_settings_connection_add_seen_bssid (NMSettingsConnection *connection, - const struct ether_addr *seen_bssid); + const char *seen_bssid); void nm_settings_connection_read_and_fill_seen_bssids (NMSettingsConnection *connection); @@ -162,9 +193,9 @@ void nm_settings_connection_set_autoconnect_blocked_reason (NMSettingsConnection gboolean nm_settings_connection_can_autoconnect (NMSettingsConnection *connection); -void nm_settings_connection_set_nm_generated (NMSettingsConnection *connection); gboolean nm_settings_connection_get_nm_generated (NMSettingsConnection *connection); +gboolean nm_settings_connection_get_nm_generated_assumed (NMSettingsConnection *connection); G_END_DECLS -#endif /* NM_SETTINGS_CONNECTION_H */ +#endif /* __NETWORKMANAGER_SETTINGS_CONNECTION_H__ */ |