~khurshid-alam/unity-control-center/use-usd-schemas

« back to all changes in this revision

Viewing changes to panels/network/connection-editor/net-connection-editor.h

  • Committer: Sebastien Bacher
  • Author(s): Khurshid Alam
  • Date: 2019-05-17 07:34:33 UTC
  • mfrom: (12920.1.1 unity-control-center)
  • Revision ID: seb128@ubuntu.com-20190517073433-ch2kybdhhzpkmvq4
Network: Port to libnm 1.2 (lp: #1744619)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
2
 *
 
3
 * Copyright (C) 2012 Red Hat, Inc.
 
4
 *
 
5
 * Licensed under the GNU General Public License Version 2
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
20
 */
 
21
 
 
22
#ifndef __NET_CONNECTION_EDITOR_H
 
23
#define __NET_CONNECTION_EDITOR_H
 
24
 
 
25
#include <glib-object.h>
 
26
 
 
27
#include <gtk/gtk.h>
 
28
#include <NetworkManager.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
#define NET_TYPE_CONNECTION_EDITOR         (net_connection_editor_get_type ())
 
33
#define NET_CONNECTION_EDITOR(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditor))
 
34
#define NET_CONNECTION_EDITOR_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditorClass))
 
35
#define NET_IS_CONNECTION_EDITOR(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_CONNECTION_EDITOR))
 
36
#define NET_IS_CONNECTION_EDITOR_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_CONNECTION_EDITOR))
 
37
#define NET_CONNECTION_EDITOR_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditorClass))
 
38
 
 
39
typedef struct _NetConnectionEditor          NetConnectionEditor;
 
40
typedef struct _NetConnectionEditorClass     NetConnectionEditorClass;
 
41
 
 
42
struct _NetConnectionEditor
 
43
{
 
44
         GObject parent;
 
45
 
 
46
        GtkWidget        *parent_window;
 
47
        NMClient         *client;
 
48
        NMDevice         *device;
 
49
 
 
50
        NMConnection     *connection;
 
51
        NMConnection     *orig_connection;
 
52
        gboolean          is_new_connection;
 
53
        gboolean          is_changed;
 
54
        NMAccessPoint    *ap;
 
55
 
 
56
        GtkBuilder       *builder;
 
57
        GtkWidget        *window;
 
58
 
 
59
        GSList *initializing_pages;
 
60
        GSList *pages;
 
61
 
 
62
        guint                    permission_id;
 
63
        NMClientPermissionResult can_modify;
 
64
 
 
65
        gboolean          title_set;
 
66
        gboolean          show_when_initialized;
 
67
};
 
68
 
 
69
struct _NetConnectionEditorClass
 
70
{
 
71
        GObjectClass parent_class;
 
72
 
 
73
        void (*done) (NetConnectionEditor *details, gboolean success);
 
74
};
 
75
 
 
76
GType                net_connection_editor_get_type (void);
 
77
NetConnectionEditor *net_connection_editor_new      (GtkWindow        *parent_window,
 
78
                                                     NMConnection     *connection,
 
79
                                                     NMDevice         *device,
 
80
                                                     NMAccessPoint    *ap,
 
81
                                                     NMClient         *client);
 
82
void                 net_connection_editor_set_title (NetConnectionEditor  *editor,
 
83
                                                      const gchar          *title);
 
84
void                 net_connection_editor_run      (NetConnectionEditor   *editor);
 
85
void                 net_connection_editor_present  (NetConnectionEditor   *editor);
 
86
void                 net_connection_editor_forget   (NetConnectionEditor   *editor);
 
87
void                 net_connection_editor_reset    (NetConnectionEditor   *editor);
 
88
 
 
89
G_END_DECLS
 
90
 
 
91
#endif /* __NET_CONNECTION_EDITOR_H */
 
92