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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1745 - (show annotations) (download) (as text)
Wed Jun 9 10:09:23 2010 UTC (11 years, 7 months ago) by aramv
File MIME type: text/x-csrc
File size: 3516 byte(s)
Fixed seemingly working AOS
1 /*!
2
3 \file eef_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 #include <errno.h>
31 #include <sys/syscall.h>
32 #include <sys/types.h>
33 #include "eef_polytypes.h"
34 #include "eef_return_codes.h"
35
36 EES_RC /*@alt void@*/ AOS_Init (void);
37 EES_RC /*@alt void@*/ AOS_Term (void);
38 EES_RC /*@alt void@*/ AOS_Clean(void);
39
40 typedef struct aos_context_s aos_context_t;
41 typedef struct aos_attribute_s aos_attribute_t;
42 typedef struct aos_storage_s aos_storage_t;
43 typedef struct aos_state_s aos_state_t;
44
45
46 /* NEW AOS API */
47
48 aos_context_t* Context(aos_context_class_t context_class);
49
50 aos_context_t * createContext(aos_context_class_t);
51 EES_RC addContext(aos_context_t*);
52 EES_RC rewindContexts(aos_storage_t* storage);
53 aos_context_t * getNextContext(aos_context_class_t, aos_storage_t*);
54 void setContextObligationId(aos_context_t*, char*);
55 char* getContextObligationId(aos_context_t*);
56
57 aos_attribute_t* createAttribute(void);
58 EES_RC addAttribute(aos_context_t*, aos_attribute_t*);
59 EES_RC rewindAttributes(aos_context_t* context);
60 aos_attribute_t* getNextAttribute(aos_context_t*);
61 EES_RC destroyAttribute(aos_context_t*, aos_attribute_t*);
62
63 EES_RC setAttributeId(aos_attribute_t*, char* id);
64 EES_RC setAttributeIssuer(aos_attribute_t*, char* issuer);
65 EES_RC setAttributeValue(aos_attribute_t*, const void* value, size_t size);
66 EES_RC setAttributeType(aos_attribute_t*, char* type);
67
68 char* getAttributeId(aos_attribute_t*);
69 char* getAttributeIssuer(aos_attribute_t*);
70 char* getAttributeValueAsString(aos_attribute_t*);
71 int getAttributeValueAsInt(aos_attribute_t*);
72
73 void aos_start_threading(void);
74 EES_RC aos_dump_argslist (void);
75
76 #endif
77

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