4 * Copyright (C) 2011 Stefan Walter
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * Author: Stef Walter <stef@thewalter.net>
24 #if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
25 #error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
28 #ifndef __GCR_SYSTEM_PROMPT_H__
29 #define __GCR_SYSTEM_PROMPT_H__
31 #include "gcr-types.h"
32 #include "gcr-secret-exchange.h"
34 #include <glib-object.h>
39 GCR_SYSTEM_PROMPT_IN_PROGRESS = 1,
40 } GcrSystemPromptError;
42 #define GCR_SYSTEM_PROMPT_ERROR (gcr_system_prompt_error_get_domain ())
44 GQuark gcr_system_prompt_error_get_domain (void) G_GNUC_CONST;
46 #define GCR_TYPE_SYSTEM_PROMPT (gcr_system_prompt_get_type ())
47 #define GCR_SYSTEM_PROMPT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCR_TYPE_SYSTEM_PROMPT, GcrSystemPrompt))
48 #define GCR_SYSTEM_PROMPT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCR_TYPE_SYSTEM_PROMPT, GcrSystemPromptClass))
49 #define GCR_IS_SYSTEM_PROMPT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCR_TYPE_SYSTEM_PROMPT))
50 #define GCR_IS_SYSTEM_PROMPT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCR_TYPE_SYSTEM_PROMPT))
51 #define GCR_SYSTEM_PROMPT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCR_TYPE_SYSTEM_PROMPT, GcrSystemPromptClass))
53 typedef struct _GcrSystemPrompt GcrSystemPrompt;
54 typedef struct _GcrSystemPromptClass GcrSystemPromptClass;
55 typedef struct _GcrSystemPromptPrivate GcrSystemPromptPrivate;
57 struct _GcrSystemPrompt {
61 GcrSystemPromptPrivate *pv;
64 struct _GcrSystemPromptClass {
65 GObjectClass parent_class;
68 GType gcr_system_prompt_get_type (void);
70 GcrSecretExchange * gcr_system_prompt_get_secret_exchange (GcrSystemPrompt *self);
72 void gcr_system_prompt_open_async (gint timeout_seconds,
73 GCancellable *cancellable,
74 GAsyncReadyCallback callback,
77 void gcr_system_prompt_open_for_prompter_async (const gchar *prompter_name,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
84 GcrSystemPrompt * gcr_system_prompt_open_finish (GAsyncResult *result,
87 GcrSystemPrompt * gcr_system_prompt_open_for_prompter (const gchar *prompter_name,
89 GCancellable *cancellable,
92 GcrSystemPrompt * gcr_system_prompt_open (gint timeout_seconds,
93 GCancellable *cancellable,
96 gboolean gcr_system_prompt_close (GcrSystemPrompt *self,
97 GCancellable *cancellable,
100 void gcr_system_prompt_close_async (GcrSystemPrompt *self,
101 GCancellable *cancellable,
102 GAsyncReadyCallback callback,
105 gboolean gcr_system_prompt_close_finish (GcrSystemPrompt *self,
106 GAsyncResult *result,
111 #endif /* __GCR_SYSTEM_PROMPT_H__ */