/[pdpsoft]/trunk/grid-mw-security/ees/include/library/aos.h
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/include/library/aos.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 473 - (show annotations) (download) (as text)
Wed Jun 24 14:25:36 2009 UTC (12 years, 6 months ago) by aramv
File MIME type: text/x-csrc
File size: 1662 byte(s)
Added test code for l[4~oading a PEM file into the AOS.
1 /*!
2
3 \file aos.h
4 \brief API of the AOS (Attribute Object Store)
5 \author Aram Verstegen
6
7 This header contains the declarations of the Attribute Object Store.
8 It contains the following core functions:
9 -# AOS_set(label, value, type, bytes, parent): set a value in the AOS
10 -# AOS_get_argument_by_label(label): retrieves a pointer to a value of type argument_t, containing the data and associated meta information
11
12 Additionally, it defines the following wrapper functions for these core functions:
13
14 -# AOS_set_int(label, value): a wrapper to set a value of integer type
15 -# AOS_set_string(label, value): a wrapper to set a value of string type
16 -# AOS_get_value_by_label(label): retrieve a value associated with a label
17
18 */
19 #ifndef _AOS_API_H
20 #define _AOS_API_H
21 #include "_aos.h"
22 #include "polytypes.h"
23 #include <errno.h>
24
25 typedef struct argument_s
26 {
27 void* data; /*! a pointer to store the data */
28 int needs_free; /*! a flag that determines wheter the data should be free'd */
29 const char * label; /*! a label to identify the data */
30 arg_type type; /*! a type identifier */
31 struct argument_s * parent; /*! a pointer to the 'parent' object */
32 }
33 argument_t;
34
35 typedef struct
36 {
37 size_t count;
38 argument_t *arg;
39 }
40 arguments;
41
42 int AOS_is_initialized(void);
43 extern int AOS_set(const char* label, void*, arg_type, int bytes, argument_t * );
44 extern int AOS_set_int(const char* label, int value);
45 extern int AOS_set_string(const char* label, char* value);
46 extern int AOS_set_pem(const char* label, char* value);
47 extern void* AOS_get_value_by_label(char*);
48 extern argument_t * AOS_get_argument_by_label(char*);
49
50 #endif
51

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28