Fixing a bug in C++ socket server-client: message length was represented just in...
[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         public Enum[] handleEnumTwo(Enum en1[], Enum en2[]);
9
10         public Struct handleStruct(Struct str);
11         public Struct[] handleStructArray(Struct str[]);
12         public List<Struct> handleStructList(List<Struct> str);
13         public Struct handleStructComplex(int in, char c, Struct str);
14         public List<Struct> handleStructTwo(List<Struct> str1, List<Struct> str2);
15         public List<Struct> handleStructThree(List<Struct> str1, List<Struct> str2, List<Struct> str3);
16         public List<Struct> handleStructComplex2(int in, char c, Struct str[]);
17
18         public Enum[] handleEnumStruct(Enum en[], List<Struct> str, char c);
19
20         public void registerCallback(CallBackInterface _cb);
21         public void registerCallbackArray(CallBackInterface _cb[]);
22         public void registerCallbackList(List<CallBackInterface> _cb);
23         public void registerCallbackComplex(int in, List<CallBackInterface> _cb, double db);
24         public int callBack();
25         public Enum[] handleCallbackEnum(Enum en[], char c, List<CallBackInterface> _cb);
26
27
28         public Enum[] handleAll(Enum en[], List<Struct> str, char c, List<CallBackInterface> _cb);
29         public Enum[] handleAllTwo(Enum en1[], Enum en2[], List<Struct> str1, List<Struct> str2, char c, List<CallBackInterface> _cb1, List<CallBackInterface> _cb2);
30         public Enum[] handleEnumThree(Enum en1[], Enum en2[], List<Struct> str1, List<Struct> str2);
31
32         capability EnumsStructs {
33                 description = "All the set methods";
34
35                 method = "handleEnum(Enum en)";
36                 method = "handleEnumArray(Enum en[])";
37                 method = "handleEnumList(List<Enum> en)";
38                 method = "handleEnumComplex(Enum en, int i, char c)";
39                 method = "handleEnumComplex2(Enum en[], int in, char c)";
40                 method = "handleEnumTwo(Enum en1[], Enum en2[])";
41                 method = "handleEnumThree(Enum en1[], Enum en2[], List<Struct> str1, List<Struct> str2)";
42
43                 method = "handleStruct(Struct str)";
44                 method = "handleStructArray(Struct str[])";
45                 method = "handleStructList(List<Struct> str)";
46                 method = "handleStructComplex(int in, char c, Struct str)";
47                 method = "handleStructComplex2(int in, char c, Struct str[])";
48                 method = "handleStructTwo(List<Struct> str1, List<Struct> str2)";
49                 method = "handleStructThree(List<Struct> str1, List<Struct> str2, List<Struct> str3)";
50
51                 method = "handleEnumStruct(Enum en[], List<Struct> str, char c)";
52                 method = "handleCallbackEnum(Enum en[], char c, List<CallBackInterface> _cb)";
53                 method = "handleAll(Enum en[], List<Struct> str, char c, List<CallBackInterface> _cb)";
54                 method = "handleAllTwo(Enum en1[], Enum en2[], List<Struct> str1, List<Struct> str2, char c, List<CallBackInterface> _cb1, List<CallBackInterface> _cb2)";
55         }
56
57         capability Callbacks {
58                 description = "All the set-and-get methods";
59
60                 method = "registerCallback(CallBackInterface _cb)";
61                 method = "registerCallbackArray(CallBackInterface _cb[])";
62                 method = "registerCallbackList(List<CallBackInterface> _cb)";
63                 method = "registerCallbackComplex(int in, List<CallBackInterface> _cb, double db)";
64                 method = "callBack()";
65         }
66
67         enum Enum {
68
69                 APPLE,
70                 ORANGE,
71                 GRAPE
72         }
73
74         struct Struct {
75
76                 string  name;
77                 float   value;
78                 int     year;
79         }
80 }
81
82