summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-24 16:24:40 +0100
committerThomas Haller <thaller@redhat.com>2017-11-24 16:24:40 +0100
commit6cb40da2f02f8ae5789f061fa2cea1bb0b6472cf (patch)
treef4fd4a76bbb783b3467f32e75f5088f39d169053
parent26e7abc65e5e4a8739265308e2cc02409ac0f1af (diff)
downloadNetworkManager-6cb40da2f02f8ae5789f061fa2cea1bb0b6472cf.tar.gz
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.
-rw-r--r--src/settings/nm-agent-manager.c8
-rw-r--r--src/settings/nm-secret-agent.c8
-rw-r--r--src/settings/nm-secret-agent.h33
3 files changed, 24 insertions, 25 deletions
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index 29abd71bd5..42df9a62a7 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -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)
diff --git a/src/settings/nm-secret-agent.c b/src/settings/nm-secret-agent.c
index 593216a9f1..fbff1ee272 100644
--- a/src/settings/nm-secret-agent.c
+++ b/src/settings/nm-secret-agent.c
@@ -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,
diff --git a/src/settings/nm-secret-agent.h b/src/settings/nm-secret-agent.h
index 54c5b39827..64b103aa78 100644
--- a/src/settings/nm-secret-agent.h
+++ b/src/settings/nm-secret-agent.h
@@ -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 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 *call_id);
+
+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);
#endif /* __NETWORKMANAGER_SECRET_AGENT_H__ */