mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 22:40:16 +01:00
core: refactor NMSettingsConnectionCallId 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.
(cherry picked from commit 616976d6a8)
This commit is contained in:
parent
06ac0b6d96
commit
2addde633c
4 changed files with 19 additions and 19 deletions
|
|
@ -96,7 +96,7 @@ struct _NMActRequestGetSecretsCallId {
|
|||
NMActRequest *self;
|
||||
NMActRequestSecretsFunc callback;
|
||||
gpointer callback_data;
|
||||
NMSettingsConnectionCallId call_id;
|
||||
NMSettingsConnectionCallId *call_id;
|
||||
bool has_ref;
|
||||
};
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ _get_secrets_call_id_free (NMActRequestGetSecretsCallId *call_id)
|
|||
|
||||
static void
|
||||
get_secrets_cb (NMSettingsConnection *connection,
|
||||
NMSettingsConnectionCallId call_id_s,
|
||||
NMSettingsConnectionCallId *call_id_s,
|
||||
const char *agent_username,
|
||||
const char *setting_name,
|
||||
GError *error,
|
||||
|
|
@ -172,7 +172,7 @@ nm_act_request_get_secrets (NMActRequest *self,
|
|||
{
|
||||
NMActRequestPrivate *priv;
|
||||
NMActRequestGetSecretsCallId *call_id;
|
||||
NMSettingsConnectionCallId call_id_s;
|
||||
NMSettingsConnectionCallId *call_id_s;
|
||||
NMSettingsConnection *settings_connection;
|
||||
NMConnection *applied_connection;
|
||||
const char *hints[2] = { hint, NULL };
|
||||
|
|
|
|||
|
|
@ -1222,7 +1222,7 @@ get_secrets_idle_cb (GetSecretsInfo *info)
|
|||
*
|
||||
* Returns: a call ID which may be used to cancel the ongoing secrets request.
|
||||
**/
|
||||
NMSettingsConnectionCallId
|
||||
NMSettingsConnectionCallId *
|
||||
nm_settings_connection_get_secrets (NMSettingsConnection *self,
|
||||
NMConnection *applied_connection,
|
||||
NMAuthSubject *subject,
|
||||
|
|
@ -1337,7 +1337,7 @@ _get_secrets_cancel (NMSettingsConnection *self,
|
|||
|
||||
void
|
||||
nm_settings_connection_cancel_secrets (NMSettingsConnection *self,
|
||||
NMSettingsConnectionCallId call_id)
|
||||
NMSettingsConnectionCallId *call_id)
|
||||
{
|
||||
_LOGD ("(%p) secrets canceled", call_id);
|
||||
|
||||
|
|
@ -1951,7 +1951,7 @@ out_err:
|
|||
|
||||
static void
|
||||
dbus_get_agent_secrets_cb (NMSettingsConnection *self,
|
||||
NMSettingsConnectionCallId call_id,
|
||||
NMSettingsConnectionCallId *call_id,
|
||||
const char *agent_username,
|
||||
const char *setting_name,
|
||||
GError *error,
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ typedef enum {
|
|||
} NMSettingsAutoconnectBlockedReason;
|
||||
|
||||
struct _NMSettingsConnectionCallId;
|
||||
typedef struct _NMSettingsConnectionCallId *NMSettingsConnectionCallId;
|
||||
typedef struct _NMSettingsConnectionCallId NMSettingsConnectionCallId;
|
||||
|
||||
typedef struct _NMSettingsConnectionClass NMSettingsConnectionClass;
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ gboolean nm_settings_connection_delete (NMSettingsConnection *self,
|
|||
GError **error);
|
||||
|
||||
typedef void (*NMSettingsConnectionSecretsFunc) (NMSettingsConnection *self,
|
||||
NMSettingsConnectionCallId call_id,
|
||||
NMSettingsConnectionCallId *call_id,
|
||||
const char *agent_username,
|
||||
const char *setting_name,
|
||||
GError *error,
|
||||
|
|
@ -162,17 +162,17 @@ gboolean nm_settings_connection_new_secrets (NMSettingsConnection *self,
|
|||
GVariant *secrets,
|
||||
GError **error);
|
||||
|
||||
NMSettingsConnectionCallId nm_settings_connection_get_secrets (NMSettingsConnection *self,
|
||||
NMConnection *applied_connection,
|
||||
NMAuthSubject *subject,
|
||||
const char *setting_name,
|
||||
NMSecretAgentGetSecretsFlags flags,
|
||||
const char *const*hints,
|
||||
NMSettingsConnectionSecretsFunc callback,
|
||||
gpointer callback_data);
|
||||
NMSettingsConnectionCallId *nm_settings_connection_get_secrets (NMSettingsConnection *self,
|
||||
NMConnection *applied_connection,
|
||||
NMAuthSubject *subject,
|
||||
const char *setting_name,
|
||||
NMSecretAgentGetSecretsFlags flags,
|
||||
const char *const*hints,
|
||||
NMSettingsConnectionSecretsFunc callback,
|
||||
gpointer callback_data);
|
||||
|
||||
void nm_settings_connection_cancel_secrets (NMSettingsConnection *self,
|
||||
NMSettingsConnectionCallId call_id);
|
||||
NMSettingsConnectionCallId *call_id);
|
||||
|
||||
gboolean nm_settings_connection_is_visible (NMSettingsConnection *self);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ typedef struct {
|
|||
gboolean service_can_persist;
|
||||
gboolean connection_can_persist;
|
||||
|
||||
NMSettingsConnectionCallId secrets_id;
|
||||
NMSettingsConnectionCallId *secrets_id;
|
||||
SecretsReq secrets_idx;
|
||||
char *username;
|
||||
|
||||
|
|
@ -2571,7 +2571,7 @@ plugin_new_secrets_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_da
|
|||
|
||||
static void
|
||||
get_secrets_cb (NMSettingsConnection *connection,
|
||||
NMSettingsConnectionCallId call_id,
|
||||
NMSettingsConnectionCallId *call_id,
|
||||
const char *agent_username,
|
||||
const char *setting_name,
|
||||
GError *error,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue