2012-02-01 12:34:08 +00:00
|
|
|
/* libsecret - GLib wrapper for Secret Service
|
2011-09-25 06:22:36 +00:00
|
|
|
*
|
|
|
|
* Copyright 2011 Collabora Ltd.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License as published
|
2012-03-31 13:32:43 +00:00
|
|
|
* by the Free Software Foundation; either version 2.1 of the licence or (at
|
2011-09-25 06:22:36 +00:00
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* See the included COPYING file for more information.
|
2012-03-31 13:32:43 +00:00
|
|
|
*
|
|
|
|
* Author: Stef Walter <stefw@gnome.org>
|
2011-09-25 06:22:36 +00:00
|
|
|
*/
|
|
|
|
|
2012-02-02 12:40:47 +00:00
|
|
|
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
|
2012-07-13 09:11:58 +00:00
|
|
|
#error "Only <libsecret/secret.h> can be included directly."
|
2012-02-02 12:40:47 +00:00
|
|
|
#endif
|
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
#ifndef __SECRET_PROMPT_H__
|
|
|
|
#define __SECRET_PROMPT_H__
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
#include "secret-types.h"
|
2012-01-11 06:44:32 +00:00
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
#define SECRET_TYPE_PROMPT (secret_prompt_get_type ())
|
|
|
|
#define SECRET_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_PROMPT, SecretPrompt))
|
|
|
|
#define SECRET_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_PROMPT, SecretPromptClass))
|
|
|
|
#define SECRET_IS_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECRET_TYPE_PROMPT))
|
|
|
|
#define SECRET_IS_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_PROMPT))
|
|
|
|
#define SECRET_PROMPT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_PROMPT, SecretPromptClass))
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-07-13 09:11:58 +00:00
|
|
|
typedef struct _SecretPrompt SecretPrompt;
|
2012-02-01 12:34:08 +00:00
|
|
|
typedef struct _SecretPromptClass SecretPromptClass;
|
|
|
|
typedef struct _SecretPromptPrivate SecretPromptPrivate;
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
struct _SecretPrompt {
|
2011-09-25 06:22:36 +00:00
|
|
|
GDBusProxy parent_instance;
|
2012-02-02 13:59:59 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
2012-02-01 12:34:08 +00:00
|
|
|
SecretPromptPrivate *pv;
|
2011-09-25 06:22:36 +00:00
|
|
|
};
|
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
struct _SecretPromptClass {
|
2012-01-20 14:10:35 +00:00
|
|
|
GDBusProxyClass parent_class;
|
2012-02-02 13:59:59 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
2012-01-20 14:10:35 +00:00
|
|
|
gpointer padding[8];
|
|
|
|
};
|
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
GType secret_prompt_get_type (void) G_GNUC_CONST;
|
2012-01-11 06:44:32 +00:00
|
|
|
|
2012-04-29 19:34:40 +00:00
|
|
|
GVariant * secret_prompt_run (SecretPrompt *self,
|
2013-12-11 09:54:40 +00:00
|
|
|
const gchar *window_id,
|
2012-02-02 12:40:47 +00:00
|
|
|
GCancellable *cancellable,
|
2012-04-29 19:34:40 +00:00
|
|
|
const GVariantType *return_type,
|
2012-02-02 12:40:47 +00:00
|
|
|
GError **error);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-04-29 19:34:40 +00:00
|
|
|
GVariant * secret_prompt_perform_sync (SecretPrompt *self,
|
2013-12-11 09:54:40 +00:00
|
|
|
const gchar *window_id,
|
2012-02-02 12:40:47 +00:00
|
|
|
GCancellable *cancellable,
|
2012-04-29 19:34:40 +00:00
|
|
|
const GVariantType *return_type,
|
2012-02-02 12:40:47 +00:00
|
|
|
GError **error);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-02-01 12:34:08 +00:00
|
|
|
void secret_prompt_perform (SecretPrompt *self,
|
2013-12-11 09:54:40 +00:00
|
|
|
const gchar *window_id,
|
2013-06-21 10:40:40 +00:00
|
|
|
const GVariantType *return_type,
|
2012-02-02 12:40:47 +00:00
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
2012-01-11 06:44:32 +00:00
|
|
|
|
2012-04-29 19:34:40 +00:00
|
|
|
GVariant * secret_prompt_perform_finish (SecretPrompt *self,
|
2012-02-02 12:40:47 +00:00
|
|
|
GAsyncResult *result,
|
|
|
|
GError **error);
|
2011-09-25 06:22:36 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2012-02-02 12:40:47 +00:00
|
|
|
#endif /* __SECRET_PROMPT_H___ */
|