nm-connection-editor.h 2.24 KB
Newer Older
Rodrigo Moya's avatar
Rodrigo Moya committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
/* NetworkManager Connection editor -- Connection editor for NetworkManager
 *
 * Rodrigo Moya <rodrigo@gnome-db.org>
 *
 * 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.
 *
16 17 18
 * 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.
Rodrigo Moya's avatar
Rodrigo Moya committed
19 20 21 22 23 24 25 26 27
 *
 * (C) Copyright 2004-2005 Red Hat, Inc.
 */

#ifndef NM_CONNECTION_EDITOR_H
#define NM_CONNECTION_EDITOR_H

#include <glib-object.h>
#include <glade/glade-xml.h>
28
#include <gtk/gtkspinbutton.h>
29
#include <nm-settings.h>
Rodrigo Moya's avatar
Rodrigo Moya committed
30 31 32 33 34 35 36 37 38 39

#define NM_TYPE_CONNECTION_EDITOR    (nm_connection_editor_get_type ())
#define NM_IS_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_EDITOR))
#define NM_CONNECTION_EDITOR(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_EDITOR, NMConnectionEditor))

typedef struct {
	GObject parent;

	/* private data */
	NMConnection *connection;
40

41
	GSList *pages;
42
	GladeXML *xml;
43 44
	GtkWidget *dialog;
	GtkWidget *ok_button;
Rodrigo Moya's avatar
Rodrigo Moya committed
45 46 47 48
} NMConnectionEditor;

typedef struct {
	GObjectClass parent_class;
49 50 51

	/* Signals */
	void (*done)  (NMConnectionEditor *editor, gint result);
Rodrigo Moya's avatar
Rodrigo Moya committed
52 53 54
} NMConnectionEditorClass;

GType               nm_connection_editor_get_type (void);
55
NMConnectionEditor *nm_connection_editor_new (NMConnection *connection);
Rodrigo Moya's avatar
Rodrigo Moya committed
56

57 58
void                nm_connection_editor_present (NMConnectionEditor *editor);
void                nm_connection_editor_run (NMConnectionEditor *editor);
59
NMConnection *nm_connection_editor_get_connection (NMConnectionEditor *editor);
Rodrigo Moya's avatar
Rodrigo Moya committed
60

61 62 63 64
gint ce_spin_output_with_default (GtkSpinButton *spin, gpointer user_data);

int ce_get_property_default (NMSetting *setting, const char *property_name);

Rodrigo Moya's avatar
Rodrigo Moya committed
65
#endif