2007-11-07 16:06:43 +00:00
|
|
|
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
|
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
#ifndef NM_CONNECTION_H
|
|
|
|
|
#define NM_CONNECTION_H
|
|
|
|
|
|
|
|
|
|
#include <glib.h>
|
2007-09-03 01:12:23 +00:00
|
|
|
#include <glib-object.h>
|
2007-11-07 16:06:43 +00:00
|
|
|
#include <nm-setting.h>
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-08-09 09:19:57 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2007-09-03 01:12:23 +00:00
|
|
|
#define NM_TYPE_CONNECTION (nm_connection_get_type ())
|
|
|
|
|
#define NM_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION, NMConnection))
|
|
|
|
|
#define NM_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONNECTION, NMConnectionClass))
|
|
|
|
|
#define NM_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION))
|
|
|
|
|
#define NM_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTION))
|
|
|
|
|
#define NM_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTION, NMConnectionClass))
|
|
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
typedef struct {
|
2007-09-03 01:12:23 +00:00
|
|
|
GObject parent;
|
2007-05-07 14:39:20 +00:00
|
|
|
} NMConnection;
|
|
|
|
|
|
2007-09-03 01:12:23 +00:00
|
|
|
typedef struct {
|
|
|
|
|
GObjectClass parent;
|
2007-09-11 18:02:27 +00:00
|
|
|
|
|
|
|
|
/* Signals */
|
|
|
|
|
void (*secrets_updated) (NMConnection *connection, const char * setting);
|
2007-09-03 01:12:23 +00:00
|
|
|
} NMConnectionClass;
|
|
|
|
|
|
|
|
|
|
GType nm_connection_get_type (void);
|
|
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
NMConnection *nm_connection_new (void);
|
|
|
|
|
NMConnection *nm_connection_new_from_hash (GHashTable *hash);
|
|
|
|
|
void nm_connection_add_setting (NMConnection *connection,
|
2007-11-07 16:06:43 +00:00
|
|
|
NMSetting *setting);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
|
|
|
|
NMSetting *nm_connection_get_setting (NMConnection *connection,
|
2007-11-07 16:06:43 +00:00
|
|
|
GType setting_type);
|
|
|
|
|
|
|
|
|
|
NMSetting *nm_connection_get_setting_by_name (NMConnection *connection,
|
|
|
|
|
const char *name);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-10-06 04:25:48 +00:00
|
|
|
gboolean nm_connection_replace_settings (NMConnection *connection,
|
2007-11-07 16:06:43 +00:00
|
|
|
GHashTable *new_settings);
|
2007-10-06 04:25:48 +00:00
|
|
|
|
2007-06-22 15:09:02 +00:00
|
|
|
gboolean nm_connection_compare (NMConnection *connection,
|
2007-11-07 16:06:43 +00:00
|
|
|
NMConnection *other);
|
2007-06-22 15:09:02 +00:00
|
|
|
|
2007-10-04 14:11:33 +00:00
|
|
|
gboolean nm_connection_verify (NMConnection *connection);
|
|
|
|
|
|
2007-11-08 19:25:00 +00:00
|
|
|
const char * nm_connection_need_secrets (NMConnection *connection,
|
|
|
|
|
GPtrArray **hints);
|
2007-08-28 14:47:31 +00:00
|
|
|
|
2007-09-25 06:11:44 +00:00
|
|
|
void nm_connection_clear_secrets (NMConnection *connection);
|
|
|
|
|
|
2007-09-11 18:02:27 +00:00
|
|
|
void nm_connection_update_secrets (NMConnection *connection,
|
|
|
|
|
const char *setting_name,
|
|
|
|
|
GHashTable *secrets);
|
|
|
|
|
|
2007-09-16 12:47:14 +00:00
|
|
|
void nm_connection_for_each_setting_value (NMConnection *connection,
|
2007-11-07 16:06:43 +00:00
|
|
|
NMSettingValueIterFn func,
|
|
|
|
|
gpointer user_data);
|
2007-09-16 12:47:14 +00:00
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
GHashTable *nm_connection_to_hash (NMConnection *connection);
|
2007-06-06 13:33:51 +00:00
|
|
|
void nm_connection_dump (NMConnection *connection);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-10-16 15:18:01 +00:00
|
|
|
NMSetting *nm_connection_create_setting (const char *name);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-11-07 16:06:43 +00:00
|
|
|
void nm_setting_register (const char *name,
|
|
|
|
|
GType type);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-11-07 16:06:43 +00:00
|
|
|
void nm_setting_unregister (const char *name);
|
2007-05-07 14:39:20 +00:00
|
|
|
|
2007-08-09 09:19:57 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
#endif /* NM_CONNECTION_H */
|