1/* libsecret - GLib wrapper for Secret Service
2 *
3 * Copyright 2011 Collabora Ltd.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; either version 2.1 of the licence or (at
8 * your option) any later version.
9 *
10 * See the included COPYING file for more information.
11 *
12 * Author: Stef Walter <stefw@gnome.org>
13 */
14
15#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
16#error "Only <libsecret/secret.h> can be included directly."
17#endif
18
19#ifndef __SECRET_PROMPT_H__
20#define __SECRET_PROMPT_H__
21
22#include <gio/gio.h>
23
24#include "secret-types.h"
25
26G_BEGIN_DECLS
27
28#define SECRET_TYPE_PROMPT (secret_prompt_get_type ())
29#define SECRET_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_PROMPT, SecretPrompt))
30#define SECRET_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_PROMPT, SecretPromptClass))
31#define SECRET_IS_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECRET_TYPE_PROMPT))
32#define SECRET_IS_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_PROMPT))
33#define SECRET_PROMPT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_PROMPT, SecretPromptClass))
34
35typedef struct _SecretPrompt SecretPrompt;
36typedef struct _SecretPromptClass SecretPromptClass;
37typedef struct _SecretPromptPrivate SecretPromptPrivate;
38
39struct _SecretPrompt {
40 GDBusProxy parent_instance;
41
42 /*< private >*/
43 SecretPromptPrivate *pv;
44};
45
46struct _SecretPromptClass {
47 GDBusProxyClass parent_class;
48
49 /*< private >*/
50 gpointer padding[8];
51};
52
53GType secret_prompt_get_type (void) G_GNUC_CONST;
54
55GVariant * secret_prompt_run (SecretPrompt *self,
56 const gchar *window_id,
57 GCancellable *cancellable,
58 const GVariantType *return_type,
59 GError **error);
60
61GVariant * secret_prompt_perform_sync (SecretPrompt *self,
62 const gchar *window_id,
63 GCancellable *cancellable,
64 const GVariantType *return_type,
65 GError **error);
66
67void secret_prompt_perform (SecretPrompt *self,
68 const gchar *window_id,
69 const GVariantType *return_type,
70 GCancellable *cancellable,
71 GAsyncReadyCallback callback,
72 gpointer user_data);
73
74GVariant * secret_prompt_perform_finish (SecretPrompt *self,
75 GAsyncResult *result,
76 GError **error);
77
78G_END_DECLS
79
80#endif /* __SECRET_PROMPT_H___ */
81