/[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 1353 - (show annotations) (download) (as text)
Sat Jan 9 00:19:12 2010 UTC (12 years, 7 months ago) by aramv
File MIME type: text/x-csrc
File size: 3295 byte(s)
Cleaned up a bit and tossed out all the dead code
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 aos_argument_t, containing the data and associated meta information
11 -# AOS_delete_argument_by_label(label): deletes the value identified by label from the list
12
13 Additionally, it defines the following wrapper functions for these core functions:
14
15 -# AOS_set_int(label, value): a wrapper to set a value of integer type
16 -# AOS_set_string(label, value): a wrapper to set a value of string type
17 -# AOS_set_pem(label, value): a wrapper to set a value of PEM string type
18 -# AOS_get_value_by_label(label): retrieve a value associated with a label
19
20 -# setAssertion(label, value): a wrapper to set an assertion into the AOS
21 -# getAssertion(label): a wrapper to get an assertion from the AOS
22 -# setObligation(label, value): a wrapper to set an obligation into the AOS
23 -# getObligation(label): a wrapper to get an obligation from the AOS
24 -# destroyObligation(label): a wrapper to delete an obligation from the AOS
25
26 */
27
28 #ifndef AOS_API_H
29 #define AOS_API_H
30 #if HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33 #if HAVE_ERRNO_H
34 #include <errno.h>
35 #endif
36 #include <sys/syscall.h>
37 #include <sys/types.h>
38 #include "eef.h"
39
40
41
42 /* NEW AOS API */
43
44 aos_context_t * createContext(aos_context_class_t);
45 EES_RC addContext(aos_context_t*);
46 aos_context_t * getNextContext(aos_context_class_t, aos_storage_t*);
47 void setContextObligation(aos_context_t*, char*);
48
49 aos_attribute_t* createAttribute(void);
50 EES_RC addAttribute(aos_context_t*, aos_attribute_t*);
51 aos_attribute_t* getNextAttribute(aos_context_t*);
52 EES_RC destroyAttribute(aos_context_t*, aos_attribute_t*);
53
54 EES_RC setAttributeId(aos_attribute_t*, char* id);
55 EES_RC setAttributeIssuer(aos_attribute_t*, char* issuer);
56 EES_RC setAttributeValue(aos_attribute_t*, void* value, size_t size);
57 EES_RC setAttributeType(aos_attribute_t*, char* type);
58
59 char* getAttributeId(aos_attribute_t*);
60 char* getAttributeIssuer(aos_attribute_t*);
61 char* getAttributeValueAsString(aos_attribute_t*);
62 int getAttributeValueAsInt(aos_attribute_t*);
63
64
65 /* AOS wrapper functions */
66
67 /*EES_RC setAssertion(const char* label, char* value);*/
68 /*char* getAssertion(const char* label);*/
69 /*EES_RC setObligation(const char* label, char* value);*/
70 /*char* getObligation(const char* label);*/
71 /*EES_RC destroyObligation(const char* label);*/
72
73 extern EES_RC aos_delete_attribute_by_label(const char* label);
74 extern void* aos_get_value_by_label(const char* label);
75 extern aos_attribute_t * aos_get_attribute_by_label(const char *label);
76
77 #endif
78

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