secret-value.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_VALUE_H__
  18. #define __SECRET_VALUE_H__
  19. #include <gio/gio.h>
  20. #include "secret-types.h"
  21. G_BEGIN_DECLS
  22. typedef struct _SecretValue SecretValue;
  23. #define SECRET_TYPE_VALUE (secret_value_get_type ())
  24. GType secret_value_get_type (void) G_GNUC_CONST;
  25. SecretValue * secret_value_new (const gchar *secret,
  26. gssize length,
  27. const gchar *content_type);
  28. SecretValue * secret_value_new_full (gchar *secret,
  29. gssize length,
  30. const gchar *content_type,
  31. GDestroyNotify destroy);
  32. const gchar * secret_value_get (SecretValue *value,
  33. gsize *length);
  34. const gchar * secret_value_get_text (SecretValue *value);
  35. const gchar * secret_value_get_content_type (SecretValue *value);
  36. SecretValue * secret_value_ref (SecretValue *value);
  37. void secret_value_unref (gpointer value);
  38. G_END_DECLS
  39. #endif /* __SECRET_VALUE_H___ */