Testing complex callbacks invocation; fixing subtle bugs
[iot2.git] / config / iotpolicy / testclasspolicy_advanced.pol
1 public interface TestClassInterface {
2
3         public Enum handleEnum(Enum en);
4         public Enum[] handleEnumArray(Enum en[]);
5         public List<Enum> handleEnumList(List<Enum> en);
6         public Enum handleEnumComplex(Enum en, int i, char c);
7         public Enum[] handleEnumComplex2(Enum en[], int in, char c);
8
9         public Struct handleStruct(Struct str);
10         public Struct[] handleStructArray(Struct str[]);
11         public List<Struct> handleStructList(List<Struct> str);
12         public Struct handleStructComplex(int in, char c, Struct str);
13         public List<Struct> handleStructComplex2(int in, char c, Struct str[]);
14
15         public void registerCallback(CallBackInterface _cb);
16         public void registerCallbackArray(CallBackInterface _cb[]);
17         public void registerCallbackList(List<CallBackInterface> _cb);
18         public void registerCallbackComplex(int in, List<CallBackInterface> _cb, double db);
19         public int callBack();
20
21         capability EnumsStructs {
22                 description = "All the set methods";
23
24                 method = "handleEnum(Enum en)";
25                 method = "handleEnumArray(Enum en[])";
26                 method = "handleEnumList(List<Enum> en)";
27                 method = "handleEnumComplex(Enum en, int i, char c)";
28                 method = "handleEnumComplex2(Enum en[], int in, char c)";
29
30                 method = "handleStruct(Struct str)";
31                 method = "handleStructArray(Struct str[])";
32                 method = "handleStructList(List<Struct> str)";
33                 method = "handleStructComplex(int in, char c, Struct str)";
34                 method = "handleStructComplex2(int in, char c, Struct str[])";
35         }
36
37         capability Callbacks {
38                 description = "All the set-and-get methods";
39
40                 method = "registerCallback(CallBackInterface _cb)";
41                 method = "registerCallbackArray(CallBackInterface _cb[])";
42                 method = "registerCallbackList(List<CallBackInterface> _cb)";
43                 method = "registerCallbackComplex(int in, List<CallBackInterface> _cb, double db)";
44                 method = "callBack()";
45         }
46
47         enum Enum {
48
49                 APPLE,
50                 ORANGE,
51                 GRAPE
52         }
53
54         struct Struct {
55
56                 string  name;
57                 float   value;
58                 int     year;
59         }
60 }
61
62