Testing enum and callback combination
[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 Enum[] handleEnumStruct(Enum en[], List<Struct> str, char c);
16
17         public void registerCallback(CallBackInterface _cb);
18         public void registerCallbackArray(CallBackInterface _cb[]);
19         public void registerCallbackList(List<CallBackInterface> _cb);
20         public void registerCallbackComplex(int in, List<CallBackInterface> _cb, double db);
21         public int callBack();
22         public Enum[] handleCallbackEnum(Enum en[], char c, List<CallBackInterface> _cb);
23
24         public Enum[] handleAll(Enum en[], List<Struct> str, char c, List<CallBackInterface> _cb);
25
26         capability EnumsStructs {
27                 description = "All the set methods";
28
29                 method = "handleEnum(Enum en)";
30                 method = "handleEnumArray(Enum en[])";
31                 method = "handleEnumList(List<Enum> en)";
32                 method = "handleEnumComplex(Enum en, int i, char c)";
33                 method = "handleEnumComplex2(Enum en[], int in, char c)";
34
35                 method = "handleStruct(Struct str)";
36                 method = "handleStructArray(Struct str[])";
37                 method = "handleStructList(List<Struct> str)";
38                 method = "handleStructComplex(int in, char c, Struct str)";
39                 method = "handleStructComplex2(int in, char c, Struct str[])";
40
41                 method = "handleEnumStruct(Enum en[], List<Struct> str, char c)";
42                 method = "handleCallbackEnum(Enum en[], char c, List<CallBackInterface> _cb)";
43                 method = "handleAll(Enum en[], List<Struct> str, char c, List<CallBackInterface> _cb)";
44         }
45
46         capability Callbacks {
47                 description = "All the set-and-get methods";
48
49                 method = "registerCallback(CallBackInterface _cb)";
50                 method = "registerCallbackArray(CallBackInterface _cb[])";
51                 method = "registerCallbackList(List<CallBackInterface> _cb)";
52                 method = "registerCallbackComplex(int in, List<CallBackInterface> _cb, double db)";
53                 method = "callBack()";
54         }
55
56         enum Enum {
57
58                 APPLE,
59                 ORANGE,
60                 GRAPE
61         }
62
63         struct Struct {
64
65                 string  name;
66                 float   value;
67                 int     year;
68         }
69 }
70
71