summary refs log tree commit diff
path: root/src/settings/nm-secret-agent.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-01-20 16:26:51 +0100
committerMichael Biebl <biebl@debian.org>2016-01-20 16:26:51 +0100
commit494f296a3baab08522617b24b1f126d8f9a17502 (patch)
treec8ef32fb0dd1c4ff35a0b38e787abb58692de0cd /src/settings/nm-secret-agent.h
parent54f6333410ffd570e62717d9e77c5c987175e397 (diff)
Imported Upstream version 1.1.90 upstream/1.1.90
Diffstat (limited to 'src/settings/nm-secret-agent.h')
-rw-r--r--src/settings/nm-secret-agent.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/src/settings/nm-secret-agent.h b/src/settings/nm-secret-agent.h
index f3f4ff89..333aa461 100644
--- a/src/settings/nm-secret-agent.h
+++ b/src/settings/nm-secret-agent.h
@@ -21,11 +21,8 @@
 #ifndef __NETWORKMANAGER_SECRET_AGENT_H__
 #define __NETWORKMANAGER_SECRET_AGENT_H__
 
-#include <glib.h>
-#include <glib-object.h>
-
 #include <nm-connection.h>
-#include "nm-types.h"
+#include "nm-default.h"
 
 #define NM_TYPE_SECRET_AGENT            (nm_secret_agent_get_type ())
 #define NM_SECRET_AGENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SECRET_AGENT, NMSecretAgent))
@@ -34,17 +31,23 @@
 #define NM_IS_SECRET_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SECRET_AGENT))
 #define NM_SECRET_AGENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SECRET_AGENT, NMSecretAgentClass))
 
+#define NM_SECRET_AGENT_DISCONNECTED "disconnected"
+
 struct _NMSecretAgent {
 	GObject parent;
 };
 
 typedef struct {
 	GObjectClass parent;
+
+	void (*disconnected) (NMSecretAgent *self);
 } NMSecretAgentClass;
 
+typedef struct _NMSecretAgentCallId *NMSecretAgentCallId;
+
 GType nm_secret_agent_get_type (void);
 
-NMSecretAgent *nm_secret_agent_new (DBusGMethodInvocation *context,
+NMSecretAgent *nm_secret_agent_new (GDBusMethodInvocation *context,
                                     NMAuthSubject *subject,
                                     const char *identifier,
                                     NMSecretAgentCapabilities capabilities);
@@ -63,8 +66,6 @@ gulong      nm_secret_agent_get_pid        (NMSecretAgent *agent);
 
 NMSecretAgentCapabilities nm_secret_agent_get_capabilities (NMSecretAgent *agent);
 
-guint32     nm_secret_agent_get_hash       (NMSecretAgent *agent);
-
 NMAuthSubject *nm_secret_agent_get_subject (NMSecretAgent *agent);
 
 void        nm_secret_agent_add_permission (NMSecretAgent *agent,
@@ -75,30 +76,33 @@ gboolean    nm_secret_agent_has_permission (NMSecretAgent *agent,
                                             const char *permission);
 
 typedef void (*NMSecretAgentCallback) (NMSecretAgent *agent,
-                                       gconstpointer call,
-                                       GHashTable *new_secrets, /* NULL for save & delete */
+                                       NMSecretAgentCallId call_id,
+                                       GVariant *new_secrets, /* NULL for save & delete */
                                        GError *error,
                                        gpointer user_data);
 
-gconstpointer nm_secret_agent_get_secrets  (NMSecretAgent *agent,
-                                            NMConnection *connection,
-                                            const char *setting_name,
-                                            const char **hints,
-                                            NMSecretAgentGetSecretsFlags flags,
-                                            NMSecretAgentCallback callback,
-                                            gpointer callback_data);
+NMSecretAgentCallId nm_secret_agent_get_secrets  (NMSecretAgent *agent,
+                                                  const char *path,
+                                                  NMConnection *connection,
+                                                  const char *setting_name,
+                                                  const char **hints,
+                                                  NMSecretAgentGetSecretsFlags flags,
+                                                  NMSecretAgentCallback callback,
+                                                  gpointer callback_data);
 
 void        nm_secret_agent_cancel_secrets (NMSecretAgent *agent,
-                                            gconstpointer call_id);
-
-gconstpointer nm_secret_agent_save_secrets (NMSecretAgent *agent,
-                                            NMConnection *connection,
-                                            NMSecretAgentCallback callback,
-                                            gpointer callback_data);
-
-gconstpointer nm_secret_agent_delete_secrets (NMSecretAgent *agent,
-                                              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__ */