1 |
#include <stdio.h> |
2 |
#include "eef_plugin.h" |
3 |
|
4 |
EES_PL_RC plugin_initialize(int argc, char* argv[]){ |
5 |
EEF_log(LOG_DEBUG, "Initializing plugin ees_dummy_good!\n"); |
6 |
return EES_PL_SUCCESS; |
7 |
} |
8 |
|
9 |
EES_PL_RC plugin_run() |
10 |
{ |
11 |
int i = 9000; |
12 |
aos_context_t *_context = NULL; |
13 |
aos_attribute_t *_tmp_attr = NULL; |
14 |
while(i){ |
15 |
if((_context = createContext(OBLIGATION)) != NULL) { |
16 |
setContextObligationId(_context, "my_obligation"); |
17 |
if((_tmp_attr = createAttribute())) { |
18 |
setAttributeId( _tmp_attr, "attrib_id"); |
19 |
setAttributeValue(_tmp_attr, "attrib_value", strlen("attrib_value")+1); |
20 |
} |
21 |
addAttribute(_context, _tmp_attr); |
22 |
addContext(_context); |
23 |
|
24 |
EEF_log(LOG_DEBUG, "Adding dummy obligation and attribute\n"); |
25 |
} |
26 |
i--; |
27 |
} |
28 |
|
29 |
return EES_PL_SUCCESS; |
30 |
} |
31 |
|
32 |
EES_PL_RC plugin_terminate(){ |
33 |
return EES_PL_SUCCESS; |
34 |
} |