Testing enum and callback combination
[iot2.git] / config / iotpolicy / testclasspolicy.pol
1 public interface TestClassInterface {
2
3         public byte getByte(byte in);
4         public short getShort(short in);
5         public long getLong(long in);
6         public float getFloat(float in);
7         public double getDouble(double in);
8         public boolean getBoolean(boolean in);
9         public char getChar(char in);
10
11         public byte[] getByteArray(byte in[]);
12         public short[] getShortArray(short in[]);
13         public long[] getLongArray(long in[]);
14         public float[] getFloatArray(float in[]);
15         public double[] getDoubleArray(double in[]);
16         public boolean[] getBooleanArray(boolean in[]);
17         public char[] getCharArray(char in[]);
18
19         public List<Byte> getByteList(List<Byte> in);
20         public List<Short> getShortList(List<Short> in);
21         public List<Long> getLongList(List<Long> in);
22         public List<Float> getFloatList(List<Float> in);
23         public List<Double> getDoubleList(List<Double> in);
24         public List<Boolean> getBooleanList(List<Boolean> in);
25         public List<Character> getCharList(List<Character> in);
26
27         public Enum handleEnum(Enum en);
28         public Enum[] handleEnumArray(Enum en[]);
29         public List<Enum> handleEnumList(List<Enum> en);
30         public Enum handleEnumComplex(Enum en, int i, char c);
31
32         public Struct handleStruct(Struct str);
33         public Struct[] handleStructArray(Struct str[]);
34         public List<Struct> handleStructList(List<Struct> str);
35
36         public void registerCallback(CallBackInterface _cb);
37         public void registerCallbackArray(CallBackInterface _cb[]);
38         public void registerCallbackList(List<CallBackInterface> _cb);
39         public int callBack();
40
41         public int getA();
42         public void setA(int _int);
43         public void setB(float _float);
44         public void setC(String _string);
45         public String sumArray(String newA[]);
46         public int setAndGetA(int newA);
47         public int setACAndGetA(String newC, int newA);
48
49         capability Setters {
50                 description = "All the set methods";
51                 method = "getByte(byte in)";
52                 method = "getShort(short in)";
53                 method = "getLong(long in)";
54                 method = "getFloat(float in)";
55                 method = "getDouble(double in)";
56                 method = "getBoolean(boolean in)";
57                 method = "getChar(char in)";
58                 method = "getByteArray(byte in[])";
59                 method = "getShortArray(short in[])";
60                 method = "getLongArray(long in[])";
61                 method = "getFloatArray(float in[])";
62                 method = "getDoubleArray(double in[])";
63                 method = "getBooleanArray(boolean in[])";
64                 method = "getCharArray(char in[])";
65                 method = "getByteList(List<Byte> in)";
66                 method = "getShortList(List<Short> in)";
67                 method = "getLongList(List<Long> in)";
68                 method = "getFloatList(List<Float> in)";
69                 method = "getDoubleList(List<Double> in)";
70                 method = "getBooleanList(List<Boolean> in)";
71                 method = "getCharList(List<Character> in)";
72
73                 method = "handleEnum(Enum en)";
74                 method = "handleEnumArray(Enum en[])";
75                 method = "handleEnumList(List<Enum> en)";
76                 method = "handleEnumComplex(Enum en, int i, char c)";
77
78                 method = "handleStruct(Struct str)";
79                 method = "handleStructArray(Struct str[])";
80                 method = "handleStructList(List<Struct> str)";
81
82                 method = "registerCallback(CallBackInterface _cb)";
83                 method = "registerCallbackArray(CallBackInterface _cb[])";
84                 method = "registerCallbackList(List<CallBackInterface> _cb)";
85                 method = "callBack()";
86
87                 method = "getA()";
88                 method = "setA(int _int)";
89                 method = "setB(float _float)";
90                 method = "setC(String _string)";
91         }
92
93         capability SetAndGets {
94                 description = "All the set-and-get methods";
95                 method = "sumArray(String newA[])";
96                 method = "setAndGetA(int newA)";
97                 method = "setACAndGetA(String newC, int newA)";
98         }
99
100         enum Enum {
101
102                 APPLE,
103                 ORANGE,
104                 GRAPE
105         }
106
107         struct Struct {
108
109                 string  name;
110                 float   value;
111                 int     year;
112         }
113 }
114
115