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