/[pdpsoft]/trunk/grid-mw-security/ees/include/private/_aos.h
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/include/private/_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: 4057 byte(s)
Fixed seemingly working AOS
1 /*!
2
3 \file _aos.h
4 \brief Private library functions of the AOS (Attribute Object Store)
5 \author Aram Verstegen
6
7 This header contains some private functions of the Attribute Object Store.
8 It contains the following functions:
9 -# AOS_buffer_size(arg_type): returns size of buffer needed to store an argument of arg_type;
10 -# AOS_free_argslist(void): Free's linkedlist nodes that have malloc-ed buffers.
11 -# AOS_get_last_node(void): Returns last node in the linkedlist.
12 -# AOS_is_initialized(void): Returns 1 if the AOS list is initialized, 0 if it isn't. This might be deprecated now that the AOS uses a linked list rather than an array.
13 */
14
15 #ifndef _AOS_H
16 #define _AOS_H
17 #if HAVE_STRING_H
18 #include <string.h>
19 #endif
20 #if HAVE_STDIO_H
21 #include <stdio.h>
22 #endif
23 #if HAVE_STDLIB_H
24 #include <stdlib.h>
25 #endif
26 #if HAVE_ERRNO_H
27 #include <errno.h>
28 #endif
29 #if HAVE_PTHREAD_H
30 #include <pthread.h>
31 #endif
32 #if HAVE_UNISTD_H
33 #include <unistd.h>
34 #endif
35 #include "eef_log.h"
36 #include "eef_return_codes.h"
37 #include "eef_plugindl_s.h"
38 #include "eef_polytypes.h"
39
40 /**
41 * \struct aos_attribute_s
42 * A struct representing an attribute containing arbitrary data.
43 */
44 struct aos_attribute_s {
45 char * id; /*! a label to identify the data */
46 char * issuer; /*! a string to identify the issuer */
47 char * type; /*! a type identifier */
48 int needs_free; /*! a flag that determines wheter the data should be free'd */
49 void* data; /*! a pointer to store the data */
50 struct aos_attribute_s * parent; /*! a pointer to the 'parent' object */
51 struct aos_attribute_s * child; /*! a pointer to the 'child' object */
52 struct aos_attribute_s * next; /*! a pointer to the next node */
53 eef_plugindl_t * setting_plugin; /*! a pointer to the plugin that initialized this data */
54 };
55
56 /**
57 * \struct aos_context_s
58 * A container for attributes of a specific class.
59 */
60 struct aos_context_s {
61 struct aos_attribute_s* list_attributes; /** a list of attributes */
62 struct aos_attribute_s* last_attribute; /** the last attribute in the list */
63 enum aos_context_class_e context_class; /** an aos_context_class_e denoting the type of attributes contained here */
64 char* obligation_name; /** used to store the name of an obligation if this context is of the class OBLIGATION */
65 struct aos_context_s * next; /** pointer to the next context in the list */
66 };
67
68 /**
69 * \struct aos_storage_s
70 * A container for a list of contexts.
71 */
72 struct aos_storage_s {
73 struct aos_context_s* list_contexts; /** a list of contexts */
74 };
75
76 struct aos_state_s {
77 struct aos_storage_s* current_storage;
78 struct aos_storage_s* saved_storage;
79 struct aos_context_s* last_context; /** the last context in the list */
80 };
81
82 static int _is_initialized;
83 static int _is_threading;
84
85 EES_RC aos_free_storage(struct aos_storage_s*);
86 int aos_is_initialized(void);
87 struct aos_storage_s * aos_get_storage(void);
88 void aos_make_key(void);
89 void aos_clean_key(void *v);
90 void aos_free_key(void* storage);
91
92 EES_RC aos_set_iterator(struct aos_context_s* context);
93 struct aos_context_s* aos_get_iterator(void);
94 struct aos_state_s* aos_get_state(void);
95 /*struct aos_storage_s* localize_storage(struct aos_storage_s* storage);*/
96
97 #endif
98

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