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:
@@ -170,7 +170,7 @@ struct _NMAgentManagerCallId {
|
|||||||
|
|
||||||
/* Current agent being asked for secrets */
|
/* Current agent being asked for secrets */
|
||||||
NMSecretAgent *current;
|
NMSecretAgent *current;
|
||||||
NMSecretAgentCallId current_call_id;
|
NMSecretAgentCallId *current_call_id;
|
||||||
|
|
||||||
/* Stores the sorted list of NMSecretAgents which will be asked for secrets */
|
/* Stores the sorted list of NMSecretAgents which will be asked for secrets */
|
||||||
GSList *pending;
|
GSList *pending;
|
||||||
@@ -832,7 +832,7 @@ out:
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_con_get_request_done (NMSecretAgent *agent,
|
_con_get_request_done (NMSecretAgent *agent,
|
||||||
NMSecretAgentCallId call_id,
|
NMSecretAgentCallId *call_id,
|
||||||
GVariant *secrets,
|
GVariant *secrets,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@@ -1276,7 +1276,7 @@ nm_agent_manager_cancel_secrets (NMAgentManager *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_con_save_request_done (NMSecretAgent *agent,
|
_con_save_request_done (NMSecretAgent *agent,
|
||||||
NMSecretAgentCallId call_id,
|
NMSecretAgentCallId *call_id,
|
||||||
GVariant *secrets,
|
GVariant *secrets,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@@ -1362,7 +1362,7 @@ nm_agent_manager_save_secrets (NMAgentManager *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_con_del_request_done (NMSecretAgent *agent,
|
_con_del_request_done (NMSecretAgent *agent,
|
||||||
NMSecretAgentCallId call_id,
|
NMSecretAgentCallId *call_id,
|
||||||
GVariant *secrets,
|
GVariant *secrets,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
@@ -352,7 +352,7 @@ get_callback (GObject *proxy,
|
|||||||
request_free (r);
|
request_free (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
NMSecretAgentCallId
|
NMSecretAgentCallId *
|
||||||
nm_secret_agent_get_secrets (NMSecretAgent *self,
|
nm_secret_agent_get_secrets (NMSecretAgent *self,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
@@ -474,7 +474,7 @@ do_cancel_secrets (NMSecretAgent *self, Request *r, gboolean disposing)
|
|||||||
* callback before nm_secret_agent_cancel_secrets() returns.
|
* callback before nm_secret_agent_cancel_secrets() returns.
|
||||||
*/
|
*/
|
||||||
void
|
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;
|
Request *r = call_id;
|
||||||
|
|
||||||
@@ -511,7 +511,7 @@ agent_save_cb (GObject *proxy,
|
|||||||
request_free (r);
|
request_free (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
NMSecretAgentCallId
|
NMSecretAgentCallId *
|
||||||
nm_secret_agent_save_secrets (NMSecretAgent *self,
|
nm_secret_agent_save_secrets (NMSecretAgent *self,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
@@ -563,7 +563,7 @@ agent_delete_cb (GObject *proxy,
|
|||||||
request_free (r);
|
request_free (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
NMSecretAgentCallId
|
NMSecretAgentCallId *
|
||||||
nm_secret_agent_delete_secrets (NMSecretAgent *self,
|
nm_secret_agent_delete_secrets (NMSecretAgent *self,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
@@ -33,8 +33,7 @@
|
|||||||
#define NM_SECRET_AGENT_DISCONNECTED "disconnected"
|
#define NM_SECRET_AGENT_DISCONNECTED "disconnected"
|
||||||
|
|
||||||
typedef struct _NMSecretAgentClass NMSecretAgentClass;
|
typedef struct _NMSecretAgentClass NMSecretAgentClass;
|
||||||
|
typedef struct _NMSecretAgentCallId NMSecretAgentCallId;
|
||||||
typedef struct _NMSecretAgentCallId *NMSecretAgentCallId;
|
|
||||||
|
|
||||||
GType nm_secret_agent_get_type (void);
|
GType nm_secret_agent_get_type (void);
|
||||||
|
|
||||||
@@ -67,12 +66,12 @@ gboolean nm_secret_agent_has_permission (NMSecretAgent *agent,
|
|||||||
const char *permission);
|
const char *permission);
|
||||||
|
|
||||||
typedef void (*NMSecretAgentCallback) (NMSecretAgent *agent,
|
typedef void (*NMSecretAgentCallback) (NMSecretAgent *agent,
|
||||||
NMSecretAgentCallId call_id,
|
NMSecretAgentCallId *call_id,
|
||||||
GVariant *new_secrets, /* NULL for save & delete */
|
GVariant *new_secrets, /* NULL for save & delete */
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
NMSecretAgentCallId nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
NMSecretAgentCallId *nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *setting_name,
|
const char *setting_name,
|
||||||
@@ -82,18 +81,18 @@ NMSecretAgentCallId nm_secret_agent_get_secrets (NMSecretAgent *agent,
|
|||||||
gpointer callback_data);
|
gpointer callback_data);
|
||||||
|
|
||||||
void nm_secret_agent_cancel_secrets (NMSecretAgent *agent,
|
void nm_secret_agent_cancel_secrets (NMSecretAgent *agent,
|
||||||
NMSecretAgentCallId call_id);
|
NMSecretAgentCallId *call_id);
|
||||||
|
|
||||||
NMSecretAgentCallId nm_secret_agent_save_secrets (NMSecretAgent *agent,
|
NMSecretAgentCallId *nm_secret_agent_save_secrets (NMSecretAgent *agent,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
NMSecretAgentCallback callback,
|
NMSecretAgentCallback callback,
|
||||||
gpointer callback_data);
|
gpointer callback_data);
|
||||||
|
|
||||||
NMSecretAgentCallId nm_secret_agent_delete_secrets (NMSecretAgent *agent,
|
NMSecretAgentCallId *nm_secret_agent_delete_secrets (NMSecretAgent *agent,
|
||||||
const char *path,
|
const char *path,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
NMSecretAgentCallback callback,
|
NMSecretAgentCallback callback,
|
||||||
gpointer callback_data);
|
gpointer callback_data);
|
||||||
|
|
||||||
#endif /* __NETWORKMANAGER_SECRET_AGENT_H__ */
|
#endif /* __NETWORKMANAGER_SECRET_AGENT_H__ */
|
||||||
|
Reference in New Issue
Block a user