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 10:21:54 +13:00
|
|
|
#pragma once
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-12 09:53:18 +13:00
|
|
|
#include <gtk/gtk.h>
|
2019-09-12 12:21:10 +12:00
|
|
|
#include <NetworkManager.h>
|
|
|
|
|
2019-11-07 10:21:54 +13:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2019-12-03 09:11:45 +13:00
|
|
|
G_DECLARE_INTERFACE (EAPMethod, eap_method, EAP, METHOD, GObject)
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-07 10:21:54 +13:00
|
|
|
struct _EAPMethodInterface {
|
|
|
|
GTypeInterface g_iface;
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-07 10:21:54 +13:00
|
|
|
void (*add_to_size_group) (EAPMethod *method, GtkSizeGroup *group);
|
|
|
|
void (*fill_connection) (EAPMethod *method, NMConnection *connection, NMSettingSecretFlags flags);
|
|
|
|
void (*update_secrets) (EAPMethod *method, NMConnection *connection);
|
|
|
|
gboolean (*validate) (EAPMethod *method, GError **error);
|
|
|
|
GtkWidget* (*get_default_field) (EAPMethod *method);
|
|
|
|
const gchar* (*get_password_flags_name) (EAPMethod *method);
|
|
|
|
gboolean (*get_phase2) (EAPMethod *method);
|
2019-12-02 17:10:24 +13:00
|
|
|
const gchar* (*get_username) (EAPMethod *method);
|
|
|
|
void (*set_username) (EAPMethod *method, const gchar *username);
|
|
|
|
const gchar* (*get_password) (EAPMethod *method);
|
|
|
|
void (*set_password) (EAPMethod *method, const gchar *password);
|
|
|
|
gboolean (*get_show_password) (EAPMethod *method);
|
|
|
|
void (*set_show_password) (EAPMethod *method, gboolean show_password);
|
2019-11-07 10:21:54 +13:00
|
|
|
};
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-07 09:09:02 +13:00
|
|
|
GtkWidget *eap_method_get_default_field (EAPMethod *method);
|
|
|
|
|
2019-11-07 10:03:25 +13:00
|
|
|
const gchar *eap_method_get_password_flags_name (EAPMethod *method);
|
|
|
|
|
2019-11-07 10:20:34 +13:00
|
|
|
gboolean eap_method_get_phase2 (EAPMethod *method);
|
|
|
|
|
2019-11-11 12:00:49 +13:00
|
|
|
void eap_method_update_secrets (EAPMethod *method, NMConnection *connection);
|
|
|
|
|
2016-06-07 12:03:22 +02:00
|
|
|
gboolean eap_method_validate (EAPMethod *method, GError **error);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
|
|
|
void eap_method_add_to_size_group (EAPMethod *method, GtkSizeGroup *group);
|
|
|
|
|
2016-06-07 12:03:22 +02:00
|
|
|
void eap_method_fill_connection (EAPMethod *method,
|
|
|
|
NMConnection *connection,
|
|
|
|
NMSettingSecretFlags flags);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2019-11-12 11:20:40 +13:00
|
|
|
void eap_method_emit_changed (EAPMethod *method);
|
|
|
|
|
2019-12-02 17:10:24 +13:00
|
|
|
const gchar *eap_method_get_username (EAPMethod *method);
|
|
|
|
|
|
|
|
void eap_method_set_username (EAPMethod *method, const gchar *username);
|
|
|
|
|
|
|
|
const gchar *eap_method_get_password (EAPMethod *method);
|
|
|
|
|
|
|
|
void eap_method_set_password (EAPMethod *method, const gchar *password);
|
|
|
|
|
|
|
|
gboolean eap_method_get_show_password (EAPMethod *method);
|
|
|
|
|
|
|
|
void eap_method_set_show_password (EAPMethod *method, gboolean show_password);
|
|
|
|
|
2012-12-09 19:38:32 -05:00
|
|
|
/* Below for internal use only */
|
|
|
|
|
|
|
|
GtkFileFilter * eap_method_default_file_chooser_filter_new (gboolean privkey);
|
|
|
|
|
|
|
|
gboolean eap_method_is_encrypted_private_key (const char *path);
|
|
|
|
|
|
|
|
#define TYPE_CLIENT_CERT 0
|
|
|
|
#define TYPE_CA_CERT 1
|
|
|
|
#define TYPE_PRIVATE_KEY 2
|
|
|
|
|
2019-10-02 11:00:21 +13:00
|
|
|
gboolean eap_method_validate_filepicker (GtkFileChooser *chooser,
|
2012-12-09 19:38:32 -05:00
|
|
|
guint32 item_type,
|
|
|
|
const char *password,
|
2016-06-07 12:03:22 +02:00
|
|
|
NMSetting8021xCKFormat *out_format,
|
|
|
|
GError **error);
|
2012-12-09 19:38:32 -05:00
|
|
|
|
2021-11-29 10:37:01 -03:00
|
|
|
void eap_method_ca_cert_not_required_toggled (GtkCheckButton *id_ca_cert_is_not_required_checkbox,
|
2019-10-02 11:00:21 +13:00
|
|
|
GtkFileChooser *id_ca_cert_chooser);
|
2016-06-07 12:03:22 +02:00
|
|
|
|
|
|
|
void eap_method_ca_cert_ignore_set (EAPMethod *method,
|
|
|
|
NMConnection *connection,
|
|
|
|
const char *filename,
|
|
|
|
gboolean ca_cert_error);
|
|
|
|
gboolean eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection);
|
|
|
|
|
|
|
|
void eap_method_ca_cert_ignore_save (NMConnection *connection);
|
|
|
|
void eap_method_ca_cert_ignore_load (NMConnection *connection);
|
|
|
|
|
2019-11-07 10:21:54 +13:00
|
|
|
G_END_DECLS
|