service_resolver_64: Correctly check all the bytes of the service code.
[chromium-blink-merge.git] / third_party / libsecret / secret-schema.h
blob4039bd344c82943605e81cf5512e5e0464e14226
1 /* libsecret - GLib wrapper for Secret Service
3 * Copyright 2011 Red Hat Inc.
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_SCHEMA_H__
20 #define __SECRET_SCHEMA_H__
22 #include <glib.h>
23 #include <glib-object.h>
25 G_BEGIN_DECLS
27 typedef enum {
28 SECRET_SCHEMA_ATTRIBUTE_STRING = 0,
29 SECRET_SCHEMA_ATTRIBUTE_INTEGER = 1,
30 SECRET_SCHEMA_ATTRIBUTE_BOOLEAN = 2,
31 } SecretSchemaAttributeType;
33 typedef struct {
34 const gchar* name;
35 SecretSchemaAttributeType type;
36 } SecretSchemaAttribute;
38 typedef enum {
39 SECRET_SCHEMA_NONE = 0,
40 SECRET_SCHEMA_DONT_MATCH_NAME = 1 << 1
41 } SecretSchemaFlags;
43 typedef struct {
44 const gchar *name;
45 SecretSchemaFlags flags;
46 SecretSchemaAttribute attributes[32];
48 /* <private> */
49 gint reserved;
50 gpointer reserved1;
51 gpointer reserved2;
52 gpointer reserved3;
53 gpointer reserved4;
54 gpointer reserved5;
55 gpointer reserved6;
56 gpointer reserved7;
57 } SecretSchema;
59 GType secret_schema_get_type (void) G_GNUC_CONST;
61 SecretSchema * secret_schema_new (const gchar *name,
62 SecretSchemaFlags flags,
63 ...) G_GNUC_NULL_TERMINATED;
65 SecretSchema * secret_schema_newv (const gchar *name,
66 SecretSchemaFlags flags,
67 GHashTable *attribute_names_and_types);
69 SecretSchema * secret_schema_ref (SecretSchema *schema);
71 void secret_schema_unref (SecretSchema *schema);
73 GType secret_schema_attribute_get_type (void) G_GNUC_CONST;
75 G_END_DECLS
77 #endif /* __SECRET_SCHEMA_H___ */