Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / libsecret / secret-prompt.h
blob983c741d523e664a9340c1e5179a29eb9e85e9d3
1 /* libsecret - GLib wrapper for Secret Service
3 * Copyright 2011 Collabora Ltd.
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.
10 * See the included COPYING file for more information.
12 * Author: Stef Walter <stefw@gnome.org>
15 #if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
16 #error "Only <libsecret/secret.h> can be included directly."
17 #endif
19 #ifndef __SECRET_PROMPT_H__
20 #define __SECRET_PROMPT_H__
22 #include <gio/gio.h>
24 #include "secret-types.h"
26 G_BEGIN_DECLS
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))
35 typedef struct _SecretPrompt SecretPrompt;
36 typedef struct _SecretPromptClass SecretPromptClass;
37 typedef struct _SecretPromptPrivate SecretPromptPrivate;
39 struct _SecretPrompt {
40 GDBusProxy parent_instance;
42 /*< private >*/
43 SecretPromptPrivate *pv;
46 struct _SecretPromptClass {
47 GDBusProxyClass parent_class;
49 /*< private >*/
50 gpointer padding[8];
53 GType secret_prompt_get_type (void) G_GNUC_CONST;
55 GVariant * secret_prompt_run (SecretPrompt *self,
56 const gchar *window_id,
57 GCancellable *cancellable,
58 const GVariantType *return_type,
59 GError **error);
61 GVariant * secret_prompt_perform_sync (SecretPrompt *self,
62 const gchar *window_id,
63 GCancellable *cancellable,
64 const GVariantType *return_type,
65 GError **error);
67 void 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);
74 GVariant * secret_prompt_perform_finish (SecretPrompt *self,
75 GAsyncResult *result,
76 GError **error);
78 G_END_DECLS
80 #endif /* __SECRET_PROMPT_H___ */