]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/dd.h
First checking of Dynamic Datastore
[netatalk.git] / etc / afpd / dd.h
1 /*
2   Copyright (c) 2012 Frank Lahm <franklahm@gmail.com>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 */
14
15 #ifdef HAVE_CONFIG_H
16 #include "config.h"
17 #endif /* HAVE_CONFIG_H */
18
19 /* dynamic datastore element types */
20 typedef enum {
21     DDT_INT64,
22     DDT_BOOL,
23     DDT_DATE,
24     DDT_UUID,
25     DDT_FLOAT,
26     DDT_STRING,
27     DDT_UTF16_STRING,
28     DDT_ARRAY,
29     DDT_DICTIONARY
30 } dde_type_e;
31
32 /* one dynamic datastore element */
33 typedef struct {
34     dde_type_e dde_type;    /* type */
35     void       *dde_val;    /* void pointer to value */
36 } dde_t;
37
38 /* dynamic datastore */
39 typedef struct {
40     int   dd_count;         /* number of elements */
41     dde_t **dd_elem;        /* talloc'ed array of elements */
42 } dd_t;