[Telemetry] Switch to use from telemetry.third_party.mock
[chromium-blink-merge.git] / third_party / libsecret / secret-value.h
blobbaaff34c0837b1a911e11c23f842d91c0082a273
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_VALUE_H__
20 #define __SECRET_VALUE_H__
22 #include <gio/gio.h>
24 #include "secret-types.h"
26 G_BEGIN_DECLS
28 typedef struct _SecretValue SecretValue;
30 #define SECRET_TYPE_VALUE (secret_value_get_type ())
32 GType secret_value_get_type (void) G_GNUC_CONST;
34 SecretValue * secret_value_new (const gchar *secret,
35 gssize length,
36 const gchar *content_type);
38 SecretValue * secret_value_new_full (gchar *secret,
39 gssize length,
40 const gchar *content_type,
41 GDestroyNotify destroy);
43 const gchar * secret_value_get (SecretValue *value,
44 gsize *length);
46 const gchar * secret_value_get_text (SecretValue *value);
48 const gchar * secret_value_get_content_type (SecretValue *value);
50 SecretValue * secret_value_ref (SecretValue *value);
52 void secret_value_unref (gpointer value);
54 G_END_DECLS
56 #endif /* __SECRET_VALUE_H___ */