Rename the library subdirectory to libsecret
[platform/upstream/libsecret.git] / libsecret / secret-prompt.h
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> or <libsecret/secret-unstable.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
26 G_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
35 typedef struct _SecretPromptClass   SecretPromptClass;
36 typedef struct _SecretPromptPrivate SecretPromptPrivate;
37
38 struct _SecretPrompt {
39         GDBusProxy parent_instance;
40
41         /*< private >*/
42         SecretPromptPrivate *pv;
43 };
44
45 struct _SecretPromptClass {
46         GDBusProxyClass parent_class;
47
48         /*< private >*/
49         gpointer padding[8];
50 };
51
52 GType               secret_prompt_get_type                  (void) G_GNUC_CONST;
53
54 GVariant *          secret_prompt_run                       (SecretPrompt *self,
55                                                              gulong window_id,
56                                                              GCancellable *cancellable,
57                                                              const GVariantType *return_type,
58                                                              GError **error);
59
60 GVariant *          secret_prompt_perform_sync              (SecretPrompt *self,
61                                                              gulong window_id,
62                                                              GCancellable *cancellable,
63                                                              const GVariantType *return_type,
64                                                              GError **error);
65
66 void                secret_prompt_perform                   (SecretPrompt *self,
67                                                              gulong window_id,
68                                                              GCancellable *cancellable,
69                                                              GAsyncReadyCallback callback,
70                                                              gpointer user_data);
71
72 GVariant *          secret_prompt_perform_finish            (SecretPrompt *self,
73                                                              GAsyncResult *result,
74                                                              const GVariantType *return_type,
75                                                              GError **error);
76
77 G_END_DECLS
78
79 #endif /* __SECRET_PROMPT_H___ */