2012-12-09 19:38:32 -05:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
/* NetworkManager Applet -- allow user control over networking
|
|
|
|
*
|
|
|
|
* Dan Williams <dcbw@redhat.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2016-06-07 12:03:22 +02:00
|
|
|
* Copyright 2007 - 2014 Red Hat, Inc.
|
2012-12-09 19:38:32 -05:00
|
|
|
*/
|
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
#pragma once
|
2012-12-09 19:38:32 -05:00
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2016-06-07 12:03:22 +02:00
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
G_BEGIN_DECLS
|
2017-07-21 10:34:18 -03:00
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
G_DECLARE_DERIVABLE_TYPE (WirelessSecurity, wireless_security, WIRELESS, SECURITY, GObject)
|
2012-12-09 19:38:32 -05:00
|
|
|
|
|
|
|
typedef void (*WSChangedFunc) (WirelessSecurity *sec, gpointer user_data);
|
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
struct _WirelessSecurityClass {
|
|
|
|
GObjectClass parent_class;
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
void (*add_to_size_group) (WirelessSecurity *sec, GtkSizeGroup *group);
|
|
|
|
void (*fill_connection) (WirelessSecurity *sec, NMConnection *connection);
|
|
|
|
gboolean (*validate) (WirelessSecurity *sec, GError **error);
|
|
|
|
GtkWidget* (*get_widget) (WirelessSecurity *sec);
|
2012-12-09 19:38:32 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
GtkWidget *wireless_security_get_widget (WirelessSecurity *sec);
|
|
|
|
|
|
|
|
void wireless_security_set_changed_notify (WirelessSecurity *sec,
|
|
|
|
WSChangedFunc func,
|
|
|
|
gpointer user_data);
|
|
|
|
|
2016-06-07 12:03:22 +02:00
|
|
|
gboolean wireless_security_validate (WirelessSecurity *sec, GError **error);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
|
|
|
void wireless_security_add_to_size_group (WirelessSecurity *sec,
|
|
|
|
GtkSizeGroup *group);
|
|
|
|
|
|
|
|
void wireless_security_fill_connection (WirelessSecurity *sec,
|
|
|
|
NMConnection *connection);
|
|
|
|
|
2019-10-03 21:07:25 +13:00
|
|
|
void wireless_security_set_adhoc_compatible (WirelessSecurity *sec,
|
|
|
|
gboolean adhoc_compatible);
|
|
|
|
|
2012-12-09 19:38:32 -05:00
|
|
|
gboolean wireless_security_adhoc_compatible (WirelessSecurity *sec);
|
|
|
|
|
2019-10-03 21:07:25 +13:00
|
|
|
const gchar *wireless_security_get_username (WirelessSecurity *sec);
|
|
|
|
|
|
|
|
const gchar *wireless_security_get_password (WirelessSecurity *sec);
|
|
|
|
|
|
|
|
gboolean wireless_security_get_always_ask (WirelessSecurity *sec);
|
|
|
|
|
|
|
|
gboolean wireless_security_get_show_password (WirelessSecurity *sec);
|
|
|
|
|
2016-06-07 12:03:22 +02:00
|
|
|
void wireless_security_set_userpass (WirelessSecurity *sec,
|
|
|
|
const char *user,
|
|
|
|
const char *password,
|
|
|
|
gboolean always_ask,
|
|
|
|
gboolean show_password);
|
|
|
|
|
2012-12-09 19:38:32 -05:00
|
|
|
/* Below for internal use only */
|
|
|
|
|
2019-10-15 10:33:17 +13:00
|
|
|
void wireless_security_notify_changed (WirelessSecurity *sec);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
|
|
|
void wireless_security_clear_ciphers (NMConnection *connection);
|
|
|
|
|
|
|
|
#define AUTH_NAME_COLUMN 0
|
|
|
|
#define AUTH_METHOD_COLUMN 1
|
|
|
|
|
2019-10-02 11:00:21 +13:00
|
|
|
void ws_802_1x_auth_combo_init (WirelessSecurity *sec,
|
|
|
|
GtkComboBox *combo,
|
|
|
|
NMConnection *connection,
|
|
|
|
gboolean is_editor,
|
|
|
|
gboolean secrets_only);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-08 09:56:00 +13:00
|
|
|
void ws_802_1x_auth_combo_changed (GtkComboBox *combo,
|
2019-10-02 11:00:21 +13:00
|
|
|
GtkBox *vbox,
|
2012-12-09 19:38:32 -05:00
|
|
|
GtkSizeGroup *size_group);
|
|
|
|
|
2019-11-08 16:17:58 +13:00
|
|
|
#include "eap-method.h"
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-08 16:17:58 +13:00
|
|
|
EAPMethod *ws_802_1x_auth_combo_get_eap (GtkComboBox *combo);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-10-02 11:00:21 +13:00
|
|
|
void ws_802_1x_fill_connection (GtkComboBox *combo,
|
2012-12-09 19:38:32 -05:00
|
|
|
NMConnection *connection);
|
|
|
|
|
2019-11-07 12:37:34 +13:00
|
|
|
G_END_DECLS
|