[libnma] libnma: add typedefs for Class structs to public headers
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnma] libnma: add typedefs for Class structs to public headers
- Date: Sun, 16 Feb 2020 12:55:04 +0000 (UTC)
commit 7f5f87992f0834dfda62e53174d601d954ef49be
Author: Thomas Haller <thaller redhat com>
Date: Sun Feb 16 13:51:31 2020 +0100
libnma: add typedefs for Class structs to public headers
The public headers have macros like NMA_WS_WPA_PSK_GET_CLASS(). These macros
use the corresponding Class typedefs. They must also be part of public API.
src/nma-ws/nma-ws-802-1x.h | 2 +-
src/nma-ws/nma-ws-dynamic-wep.c | 8 ++++----
src/nma-ws/nma-ws-dynamic-wep.h | 1 +
src/nma-ws/nma-ws-leap.c | 8 ++++----
src/nma-ws/nma-ws-leap.h | 1 +
src/nma-ws/nma-ws-private.h | 4 ++--
src/nma-ws/nma-ws-sae.c | 8 ++++----
src/nma-ws/nma-ws-sae.h | 1 +
src/nma-ws/nma-ws-wep-key.c | 8 ++++----
src/nma-ws/nma-ws-wep-key.h | 1 +
src/nma-ws/nma-ws-wpa-eap.c | 8 ++++----
src/nma-ws/nma-ws-wpa-eap.h | 1 +
src/nma-ws/nma-ws-wpa-psk.c | 8 ++++----
src/nma-ws/nma-ws-wpa-psk.h | 1 +
src/nma-ws/nma-ws.h | 1 +
15 files changed, 34 insertions(+), 27 deletions(-)
---
diff --git a/src/nma-ws/nma-ws-802-1x.h b/src/nma-ws/nma-ws-802-1x.h
index c12c61f0..f296d325 100644
--- a/src/nma-ws/nma-ws-802-1x.h
+++ b/src/nma-ws/nma-ws-802-1x.h
@@ -10,8 +10,8 @@
G_BEGIN_DECLS
-typedef struct _NMAWs8021xClass NMAWs8021xClass;
typedef struct _NMAWs8021x NMAWs8021x;
+typedef struct _NMAWs8021xClass NMAWs8021xClass;
#define NMA_TYPE_WS_802_1X (nma_ws_802_1x_get_type ())
#define NMA_WS_802_1X(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_802_1X, NMAWs8021x))
diff --git a/src/nma-ws/nma-ws-dynamic-wep.c b/src/nma-ws/nma-ws-dynamic-wep.c
index 911d7db6..fefdd7d5 100644
--- a/src/nma-ws/nma-ws-dynamic-wep.c
+++ b/src/nma-ws/nma-ws-dynamic-wep.c
@@ -13,14 +13,14 @@
#include "nma-ws-802-1x-private.h"
#include "nma-ws-dynamic-wep.h"
-typedef struct {
- NMAWs8021xClass parent;
-} NMAWsDynamicWepClass;
-
struct _NMAWsDynamicWep {
NMAWs8021x parent;
};
+struct _NMAWsDynamicWepClass {
+ NMAWs8021xClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsDynamicWep, nma_ws_dynamic_wep, NMA_TYPE_WS_802_1X,
diff --git a/src/nma-ws/nma-ws-dynamic-wep.h b/src/nma-ws/nma-ws-dynamic-wep.h
index 9057c52c..2fd93398 100644
--- a/src/nma-ws/nma-ws-dynamic-wep.h
+++ b/src/nma-ws/nma-ws-dynamic-wep.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsDynamicWep NMAWsDynamicWep;
+typedef struct _NMAWsDynamicWepClass NMAWsDynamicWepClass;
#define NMA_TYPE_WS_DYNAMIC_WEP (nma_ws_dynamic_wep_get_type ())
#define NMA_WS_DYNAMIC_WEP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_SAE,
NMAWsDynamicWep))
diff --git a/src/nma-ws/nma-ws-leap.c b/src/nma-ws/nma-ws-leap.c
index ef2cf8bf..f90d43aa 100644
--- a/src/nma-ws/nma-ws-leap.c
+++ b/src/nma-ws/nma-ws-leap.c
@@ -18,10 +18,6 @@
#include "nma-ui-utils.h"
#include "utils.h"
-typedef struct {
- GtkGridClass parent;
-} NMAWsLeapClass;
-
struct _NMAWsLeap {
GtkGrid parent;
@@ -35,6 +31,10 @@ struct _NMAWsLeap {
gboolean secrets_only;
};
+struct _NMAWsLeapClass {
+ GtkGridClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsLeap, nma_ws_leap, GTK_TYPE_GRID,
diff --git a/src/nma-ws/nma-ws-leap.h b/src/nma-ws/nma-ws-leap.h
index 0f99bc12..7e8b6a1e 100644
--- a/src/nma-ws/nma-ws-leap.h
+++ b/src/nma-ws/nma-ws-leap.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsLeap NMAWsLeap;
+typedef struct _NMAWsLeapClass NMAWsLeapClass;
#define NMA_TYPE_WS_LEAP (nma_ws_leap_get_type ())
#define NMA_WS_LEAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_LEAP, NMAWsLeap))
diff --git a/src/nma-ws/nma-ws-private.h b/src/nma-ws/nma-ws-private.h
index 63bb97f2..a3a34d78 100644
--- a/src/nma-ws/nma-ws-private.h
+++ b/src/nma-ws/nma-ws-private.h
@@ -8,7 +8,7 @@
#ifndef NMA_WS_PRIVATE_H
#define NMA_WS_PRIVATE_H
-typedef struct {
+struct _NMAWsInterface {
GTypeInterface parent;
void (*add_to_size_group) (NMAWs *self, GtkSizeGroup *group);
@@ -18,7 +18,7 @@ typedef struct {
gboolean adhoc_compatible;
gboolean hotspot_compatible;
-} NMAWsInterface;
+};
void nma_ws_changed_cb (GtkWidget *entry, gpointer user_data);
diff --git a/src/nma-ws/nma-ws-sae.c b/src/nma-ws/nma-ws-sae.c
index a697b7c0..e3454bbd 100644
--- a/src/nma-ws/nma-ws-sae.c
+++ b/src/nma-ws/nma-ws-sae.c
@@ -16,10 +16,6 @@
#include "nma-ui-utils.h"
#include "utils.h"
-typedef struct {
- GtkGridClass parent;
-} NMAWsSaeClass;
-
struct _NMAWsSae {
GtkGrid parent;
@@ -33,6 +29,10 @@ struct _NMAWsSae {
gboolean secrets_only;
};
+struct _NMAWsSaeClass {
+ GtkGridClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsSae, nma_ws_sae, GTK_TYPE_GRID,
diff --git a/src/nma-ws/nma-ws-sae.h b/src/nma-ws/nma-ws-sae.h
index 14baad4b..166bcb12 100644
--- a/src/nma-ws/nma-ws-sae.h
+++ b/src/nma-ws/nma-ws-sae.h
@@ -11,6 +11,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsSae NMAWsSae;
+typedef struct _NMAWsSaeClass NMAWsSaeClass;
#define NMA_TYPE_WS_SAE (nma_ws_sae_get_type ())
#define NMA_WS_SAE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_SAE, NMAWsSae))
diff --git a/src/nma-ws/nma-ws-wep-key.c b/src/nma-ws/nma-ws-wep-key.c
index 6150d282..cae8c272 100644
--- a/src/nma-ws/nma-ws-wep-key.c
+++ b/src/nma-ws/nma-ws-wep-key.c
@@ -16,10 +16,6 @@
#include "nma-ui-utils.h"
#include "utils.h"
-typedef struct {
- GtkGridClass parent;
-} NMAWsWepKeyClass;
-
struct _NMAWsWepKey {
GtkGrid parent;
@@ -40,6 +36,10 @@ struct _NMAWsWepKey {
guint8 cur_index;
};
+struct _NMAWsWepKeyClass {
+ GtkGridClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsWepKey, nma_ws_wep_key, GTK_TYPE_GRID,
diff --git a/src/nma-ws/nma-ws-wep-key.h b/src/nma-ws/nma-ws-wep-key.h
index 308f975c..17e9ef5a 100644
--- a/src/nma-ws/nma-ws-wep-key.h
+++ b/src/nma-ws/nma-ws-wep-key.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsWepKey NMAWsWepKey;
+typedef struct _NMAWsWepKeyClass NMAWsWepKeyClass;
#define NMA_TYPE_WS_WEP_KEY (nma_ws_wep_key_get_type ())
#define NMA_WS_WEP_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_WEP_KEY, NMAWsWepKey))
diff --git a/src/nma-ws/nma-ws-wpa-eap.c b/src/nma-ws/nma-ws-wpa-eap.c
index f8c8daf0..aa2e38b3 100644
--- a/src/nma-ws/nma-ws-wpa-eap.c
+++ b/src/nma-ws/nma-ws-wpa-eap.c
@@ -13,14 +13,14 @@
#include "nma-ws-802-1x-private.h"
#include "nma-ws-wpa-eap.h"
-typedef struct {
- NMAWs8021xClass parent;
-} NMAWsWpaEapClass;
-
struct _NMAWsWpaEap {
NMAWs8021x parent;
};
+struct _NMAWsWpaEapClass {
+ NMAWs8021xClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsWpaEap, nma_ws_wpa_eap, NMA_TYPE_WS_802_1X,
diff --git a/src/nma-ws/nma-ws-wpa-eap.h b/src/nma-ws/nma-ws-wpa-eap.h
index e53df74b..38a03d24 100644
--- a/src/nma-ws/nma-ws-wpa-eap.h
+++ b/src/nma-ws/nma-ws-wpa-eap.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsWpaEap NMAWsWpaEap;
+typedef struct _NMAWsWpaEapClass NMAWsWpaEapClass;
#define NMA_TYPE_WS_WPA_EAP (nma_ws_wpa_eap_get_type ())
#define NMA_WS_WPA_EAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_SAE, NMAWsWpaEap))
diff --git a/src/nma-ws/nma-ws-wpa-psk.c b/src/nma-ws/nma-ws-wpa-psk.c
index a161243f..1c73922a 100644
--- a/src/nma-ws/nma-ws-wpa-psk.c
+++ b/src/nma-ws/nma-ws-wpa-psk.c
@@ -20,10 +20,6 @@
#define WPA_PMK_LEN 32
-typedef struct {
- GtkGridClass parent;
-} NMAWsWpaPskClass;
-
struct _NMAWsWpaPsk {
GtkGrid parent;
@@ -37,6 +33,10 @@ struct _NMAWsWpaPsk {
gboolean secrets_only;
};
+struct _NMAWsWpaPskClass {
+ GtkGridClass parent;
+};
+
static void nma_ws_interface_init (NMAWsInterface *iface);
G_DEFINE_TYPE_WITH_CODE (NMAWsWpaPsk, nma_ws_wpa_psk, GTK_TYPE_GRID,
diff --git a/src/nma-ws/nma-ws-wpa-psk.h b/src/nma-ws/nma-ws-wpa-psk.h
index 93e0b1ac..acdd94f5 100644
--- a/src/nma-ws/nma-ws-wpa-psk.h
+++ b/src/nma-ws/nma-ws-wpa-psk.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWsWpaPsk NMAWsWpaPsk;
+typedef struct _NMAWsWpaPskClass NMAWsWpaPskClass;
#define NMA_TYPE_WS_WPA_PSK (nma_ws_wpa_psk_get_type ())
#define NMA_WS_WPA_PSK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS_WPA_PSK, NMAWsWpaPsk))
diff --git a/src/nma-ws/nma-ws.h b/src/nma-ws/nma-ws.h
index bbea4ded..e046cc11 100644
--- a/src/nma-ws/nma-ws.h
+++ b/src/nma-ws/nma-ws.h
@@ -13,6 +13,7 @@
G_BEGIN_DECLS
typedef struct _NMAWs NMAWs;
+typedef struct _NMAWsInterface NMAWsInterface;
#define NMA_TYPE_WS (nma_ws_get_type ())
#define NMA_WS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WS, NMAWs))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]