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-05-07 14:39:20 +00:00
|
|
|
#include "nm-setting.h"
|
|
|
|
|
|
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,
|
|
|
|
|
NMSetting *setting);
|
|
|
|
|
|
|
|
|
|
NMSetting *nm_connection_get_setting (NMConnection *connection,
|
|
|
|
|
const char *setting_name);
|
|
|
|
|
|
2007-06-22 15:09:02 +00:00
|
|
|
gboolean nm_connection_compare (NMConnection *connection,
|
|
|
|
|
NMConnection *other);
|
|
|
|
|
|
2007-09-10 19:11:40 +00:00
|
|
|
const char * nm_connection_need_secrets (NMConnection *connection);
|
2007-08-28 14:47:31 +00:00
|
|
|
|
2007-09-11 18:02:27 +00:00
|
|
|
void nm_connection_update_secrets (NMConnection *connection,
|
|
|
|
|
const char *setting_name,
|
|
|
|
|
GHashTable *secrets);
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
void nm_setting_parser_register (const char *name,
|
|
|
|
|
NMSettingCreateFn creator);
|
|
|
|
|
|
|
|
|
|
void nm_setting_parser_unregister (const char *name);
|
|
|
|
|
|
2007-08-09 09:19:57 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
2007-05-07 14:39:20 +00:00
|
|
|
#endif /* NM_CONNECTION_H */
|