core: refactor NMActRequestGetSecretsCallId typedef not to be a pointer to struct
Typedefs to structs are fine, but a typedef for a pointer seems confusing to me. Let's avoid it.
This commit is contained in:
@@ -104,7 +104,7 @@ typedef struct _NMDeviceEthernetPrivate {
|
|||||||
char * s390_nettype;
|
char * s390_nettype;
|
||||||
GHashTable * s390_options;
|
GHashTable * s390_options;
|
||||||
|
|
||||||
NMActRequestGetSecretsCallId wired_secrets_id;
|
NMActRequestGetSecretsCallId *wired_secrets_id;
|
||||||
|
|
||||||
/* PPPoE */
|
/* PPPoE */
|
||||||
NMPPPManager *ppp_manager;
|
NMPPPManager *ppp_manager;
|
||||||
@@ -416,7 +416,7 @@ supplicant_interface_release (NMDeviceEthernet *self)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
wired_secrets_cb (NMActRequest *req,
|
wired_secrets_cb (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *connection,
|
NMSettingsConnection *connection,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@@ -71,7 +71,7 @@ typedef struct {
|
|||||||
gulong parent_state_id;
|
gulong parent_state_id;
|
||||||
Supplicant supplicant;
|
Supplicant supplicant;
|
||||||
guint supplicant_timeout_id;
|
guint supplicant_timeout_id;
|
||||||
NMActRequestGetSecretsCallId macsec_secrets_id;
|
NMActRequestGetSecretsCallId *macsec_secrets_id;
|
||||||
} NMDeviceMacsecPrivate;
|
} NMDeviceMacsecPrivate;
|
||||||
|
|
||||||
struct _NMDeviceMacsec {
|
struct _NMDeviceMacsec {
|
||||||
@@ -276,7 +276,7 @@ supplicant_iface_assoc_cb (NMSupplicantInterface *iface,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
macsec_secrets_cb (NMActRequest *req,
|
macsec_secrets_cb (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *connection,
|
NMSettingsConnection *connection,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@@ -107,7 +107,7 @@ typedef struct {
|
|||||||
|
|
||||||
NM80211Mode mode;
|
NM80211Mode mode;
|
||||||
|
|
||||||
NMActRequestGetSecretsCallId wifi_secrets_id;
|
NMActRequestGetSecretsCallId *wifi_secrets_id;
|
||||||
|
|
||||||
guint periodic_source_id;
|
guint periodic_source_id;
|
||||||
guint link_timeout_id;
|
guint link_timeout_id;
|
||||||
@@ -1786,7 +1786,7 @@ cleanup_supplicant_failures (NMDeviceWifi *self)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
wifi_secrets_cb (NMActRequest *req,
|
wifi_secrets_cb (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *connection,
|
NMSettingsConnection *connection,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@@ -94,7 +94,7 @@ typedef struct _NMModemPrivate {
|
|||||||
|
|
||||||
NMActRequest *act_request;
|
NMActRequest *act_request;
|
||||||
guint32 secrets_tries;
|
guint32 secrets_tries;
|
||||||
NMActRequestGetSecretsCallId secrets_id;
|
NMActRequestGetSecretsCallId *secrets_id;
|
||||||
|
|
||||||
guint32 mm_ip_timeout;
|
guint32 mm_ip_timeout;
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ cancel_get_secrets (NMModem *self)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
modem_secrets_cb (NMActRequest *req,
|
modem_secrets_cb (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *connection,
|
NMSettingsConnection *connection,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@@ -171,7 +171,7 @@ get_secrets_cb (NMSettingsConnection *connection,
|
|||||||
*
|
*
|
||||||
* Returns: a call-id.
|
* Returns: a call-id.
|
||||||
*/
|
*/
|
||||||
NMActRequestGetSecretsCallId
|
NMActRequestGetSecretsCallId *
|
||||||
nm_act_request_get_secrets (NMActRequest *self,
|
nm_act_request_get_secrets (NMActRequest *self,
|
||||||
gboolean ref_self,
|
gboolean ref_self,
|
||||||
const char *setting_name,
|
const char *setting_name,
|
||||||
@@ -247,7 +247,7 @@ _do_cancel_secrets (NMActRequest *self, GetSecretsInfo *info, gboolean is_dispos
|
|||||||
* synchronously.
|
* synchronously.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
nm_act_request_cancel_secrets (NMActRequest *self, NMActRequestGetSecretsCallId call_id)
|
nm_act_request_cancel_secrets (NMActRequest *self, NMActRequestGetSecretsCallId *call_id)
|
||||||
{
|
{
|
||||||
NMActRequestPrivate *priv;
|
NMActRequestPrivate *priv;
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#define NM_ACT_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACT_REQUEST, NMActRequestClass))
|
#define NM_ACT_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACT_REQUEST, NMActRequestClass))
|
||||||
|
|
||||||
struct _NMActRequestGetSecretsCallId;
|
struct _NMActRequestGetSecretsCallId;
|
||||||
typedef struct _NMActRequestGetSecretsCallId *NMActRequestGetSecretsCallId;
|
typedef struct _NMActRequestGetSecretsCallId NMActRequestGetSecretsCallId;
|
||||||
|
|
||||||
GType nm_act_request_get_type (void);
|
GType nm_act_request_get_type (void);
|
||||||
|
|
||||||
@@ -58,20 +58,20 @@ void nm_act_request_add_share_rule (NMActRequest *req,
|
|||||||
/* Secrets handling */
|
/* Secrets handling */
|
||||||
|
|
||||||
typedef void (*NMActRequestSecretsFunc) (NMActRequest *req,
|
typedef void (*NMActRequestSecretsFunc) (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *connection,
|
NMSettingsConnection *connection,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
NMActRequestGetSecretsCallId nm_act_request_get_secrets (NMActRequest *req,
|
NMActRequestGetSecretsCallId *nm_act_request_get_secrets (NMActRequest *req,
|
||||||
gboolean take_ref,
|
gboolean take_ref,
|
||||||
const char *setting_name,
|
const char *setting_name,
|
||||||
NMSecretAgentGetSecretsFlags flags,
|
NMSecretAgentGetSecretsFlags flags,
|
||||||
const char *hint,
|
const char *hint,
|
||||||
NMActRequestSecretsFunc callback,
|
NMActRequestSecretsFunc callback,
|
||||||
gpointer callback_data);
|
gpointer callback_data);
|
||||||
|
|
||||||
void nm_act_request_cancel_secrets (NMActRequest *req, NMActRequestGetSecretsCallId call_id);
|
void nm_act_request_cancel_secrets (NMActRequest *req, NMActRequestGetSecretsCallId *call_id);
|
||||||
void nm_act_request_clear_secrets (NMActRequest *self);
|
void nm_act_request_clear_secrets (NMActRequest *self);
|
||||||
|
|
||||||
#endif /* __NM_ACT_REQUEST_H__ */
|
#endif /* __NM_ACT_REQUEST_H__ */
|
||||||
|
@@ -96,7 +96,7 @@ typedef struct {
|
|||||||
|
|
||||||
NMActRequest *act_req;
|
NMActRequest *act_req;
|
||||||
GDBusMethodInvocation *pending_secrets_context;
|
GDBusMethodInvocation *pending_secrets_context;
|
||||||
NMActRequestGetSecretsCallId secrets_id;
|
NMActRequestGetSecretsCallId *secrets_id;
|
||||||
const char *secrets_setting_name;
|
const char *secrets_setting_name;
|
||||||
|
|
||||||
guint ppp_watch_id;
|
guint ppp_watch_id;
|
||||||
@@ -287,7 +287,7 @@ extract_details_from_connection (NMConnection *connection,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
ppp_secrets_cb (NMActRequest *req,
|
ppp_secrets_cb (NMActRequest *req,
|
||||||
NMActRequestGetSecretsCallId call_id,
|
NMActRequestGetSecretsCallId *call_id,
|
||||||
NMSettingsConnection *settings_connection, /* unused (we pass NULL here) */
|
NMSettingsConnection *settings_connection, /* unused (we pass NULL here) */
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
Reference in New Issue
Block a user