mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 08:20:08 +01:00
core: refactor NMSecretAgentCallId 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:
parent
26e7abc65e
commit
6cb40da2f0
3 changed files with 22 additions and 23 deletions
|
|
@ -170,7 +170,7 @@ struct _NMAgentManagerCallId {
|
|||
|
||||
/* Current agent being asked for secrets */
|
||||
NMSecretAgent *current;
|
||||
NMSecretAgentCallId current_call_id;
|
||||
NMSecretAgentCallId *current_call_id;
|
||||
|
||||
/* Stores the sorted list of NMSecretAgents which will be asked for secrets */
|
||||
GSList *pending;
|
||||
|
|
@ -832,7 +832,7 @@ out:
|
|||
|
||||
static void
|
||||
_con_get_request_done (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId call_id,
|
||||
NMSecretAgentCallId *call_id,
|
||||
GVariant *secrets,
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
|
|
@ -1276,7 +1276,7 @@ nm_agent_manager_cancel_secrets (NMAgentManager *self,
|
|||
|
||||
static void
|
||||
_con_save_request_done (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId call_id,
|
||||
NMSecretAgentCallId *call_id,
|
||||
GVariant *secrets,
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
|
|
@ -1362,7 +1362,7 @@ nm_agent_manager_save_secrets (NMAgentManager *self,
|
|||
|
||||
static void
|
||||
_con_del_request_done (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId call_id,
|
||||
NMSecretAgentCallId *call_id,
|
||||
GVariant *secrets,
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ get_callback (GObject *proxy,
|
|||
request_free (r);
|
||||
}
|
||||
|
||||
NMSecretAgentCallId
|
||||
NMSecretAgentCallId *
|
||||
nm_secret_agent_get_secrets (NMSecretAgent *self,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
|
|
@ -474,7 +474,7 @@ do_cancel_secrets (NMSecretAgent *self, Request *r, gboolean disposing)
|
|||
* callback before nm_secret_agent_cancel_secrets() returns.
|
||||
*/
|
||||
void
|
||||
nm_secret_agent_cancel_secrets (NMSecretAgent *self, NMSecretAgentCallId call_id)
|
||||
nm_secret_agent_cancel_secrets (NMSecretAgent *self, NMSecretAgentCallId *call_id)
|
||||
{
|
||||
Request *r = call_id;
|
||||
|
||||
|
|
@ -511,7 +511,7 @@ agent_save_cb (GObject *proxy,
|
|||
request_free (r);
|
||||
}
|
||||
|
||||
NMSecretAgentCallId
|
||||
NMSecretAgentCallId *
|
||||
nm_secret_agent_save_secrets (NMSecretAgent *self,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
|
|
@ -563,7 +563,7 @@ agent_delete_cb (GObject *proxy,
|
|||
request_free (r);
|
||||
}
|
||||
|
||||
NMSecretAgentCallId
|
||||
NMSecretAgentCallId *
|
||||
nm_secret_agent_delete_secrets (NMSecretAgent *self,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@
|
|||
#define NM_SECRET_AGENT_DISCONNECTED "disconnected"
|
||||
|
||||
typedef struct _NMSecretAgentClass NMSecretAgentClass;
|
||||
|
||||
typedef struct _NMSecretAgentCallId *NMSecretAgentCallId;
|
||||
typedef struct _NMSecretAgentCallId NMSecretAgentCallId;
|
||||
|
||||
GType nm_secret_agent_get_type (void);
|
||||
|
||||
|
|
@ -67,12 +66,12 @@ gboolean nm_secret_agent_has_permission (NMSecretAgent *agent,
|
|||
const char *permission);
|
||||
|
||||
typedef void (*NMSecretAgentCallback) (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId call_id,
|
||||
NMSecretAgentCallId *call_id,
|
||||
GVariant *new_secrets, /* NULL for save & delete */
|
||||
GError *error,
|
||||
gpointer user_data);
|
||||
|
||||
NMSecretAgentCallId nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId *nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
const char *setting_name,
|
||||
|
|
@ -82,18 +81,18 @@ NMSecretAgentCallId nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
|||
gpointer callback_data);
|
||||
|
||||
void nm_secret_agent_cancel_secrets (NMSecretAgent *agent,
|
||||
NMSecretAgentCallId call_id);
|
||||
NMSecretAgentCallId *call_id);
|
||||
|
||||
NMSecretAgentCallId nm_secret_agent_save_secrets (NMSecretAgent *agent,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
NMSecretAgentCallback callback,
|
||||
gpointer callback_data);
|
||||
NMSecretAgentCallId *nm_secret_agent_save_secrets (NMSecretAgent *agent,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
NMSecretAgentCallback callback,
|
||||
gpointer callback_data);
|
||||
|
||||
NMSecretAgentCallId nm_secret_agent_delete_secrets (NMSecretAgent *agent,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
NMSecretAgentCallback callback,
|
||||
gpointer callback_data);
|
||||
NMSecretAgentCallId *nm_secret_agent_delete_secrets (NMSecretAgent *agent,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
NMSecretAgentCallback callback,
|
||||
gpointer callback_data);
|
||||
|
||||
#endif /* __NETWORKMANAGER_SECRET_AGENT_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue