secret-prompt.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
  15. #error "Only <libsecret/secret.h> can be included directly."
  16. #endif
  17. #ifndef __SECRET_PROMPT_H__
  18. #define __SECRET_PROMPT_H__
  19. #include <gio/gio.h>
  20. #include "secret-types.h"
  21. G_BEGIN_DECLS
  22. #define SECRET_TYPE_PROMPT (secret_prompt_get_type ())
  23. #define SECRET_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_PROMPT, SecretPrompt))
  24. #define SECRET_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_PROMPT, SecretPromptClass))
  25. #define SECRET_IS_PROMPT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECRET_TYPE_PROMPT))
  26. #define SECRET_IS_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_PROMPT))
  27. #define SECRET_PROMPT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_PROMPT, SecretPromptClass))
  28. typedef struct _SecretPrompt SecretPrompt;
  29. typedef struct _SecretPromptClass SecretPromptClass;
  30. typedef struct _SecretPromptPrivate SecretPromptPrivate;
  31. struct _SecretPrompt {
  32. GDBusProxy parent_instance;
  33. /*< private >*/
  34. SecretPromptPrivate *pv;
  35. };
  36. struct _SecretPromptClass {
  37. GDBusProxyClass parent_class;
  38. /*< private >*/
  39. gpointer padding[8];
  40. };
  41. GType secret_prompt_get_type (void) G_GNUC_CONST;
  42. GVariant * secret_prompt_run (SecretPrompt *self,
  43. const gchar *window_id,
  44. GCancellable *cancellable,
  45. const GVariantType *return_type,
  46. GError **error);
  47. GVariant * secret_prompt_perform_sync (SecretPrompt *self,
  48. const gchar *window_id,
  49. GCancellable *cancellable,
  50. const GVariantType *return_type,
  51. GError **error);
  52. void secret_prompt_perform (SecretPrompt *self,
  53. const gchar *window_id,
  54. const GVariantType *return_type,
  55. GCancellable *cancellable,
  56. GAsyncReadyCallback callback,
  57. gpointer user_data);
  58. GVariant * secret_prompt_perform_finish (SecretPrompt *self,
  59. GAsyncResult *result,
  60. GError **error);
  61. G_END_DECLS
  62. #endif /* __SECRET_PROMPT_H___ */