e562cfa6bebb5da25715d0fa25e4d9bcb3f17bd1
[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
31         public Struct handleStruct(Struct str);
32         public Struct[] handleStructArray(Struct str[]);
33         public List<Struct> handleStructList(List<Struct> str);
34
35         public void registerCallback(CallBackInterface _cb);
36         public void registerCallbackArray(CallBackInterface _cb[]);
37         public void registerCallbackList(List<CallBackInterface> _cb);
38         public int callBack();
39
40         public int getA();
41         public void setA(int _int);
42         public void setB(float _float);
43         public void setC(String _string);
44         public String sumArray(String newA[]);
45         public int setAndGetA(int newA);
46         public int setACAndGetA(String newC, int newA);
47
48         capability Setters {
49                 description = "All the set methods";
50                 method = "getByte(byte in)";
51                 method = "getShort(short in)";
52                 method = "getLong(long in)";
53                 method = "getFloat(float in)";
54                 method = "getDouble(double in)";
55                 method = "getBoolean(boolean in)";
56                 method = "getChar(char in)";
57                 method = "getByteArray(byte in[])";
58                 method = "getShortArray(short in[])";
59                 method = "getLongArray(long in[])";
60                 method = "getFloatArray(float in[])";
61                 method = "getDoubleArray(double in[])";
62                 method = "getBooleanArray(boolean in[])";
63                 method = "getCharArray(char in[])";
64                 method = "getByteList(List<Byte> in)";
65                 method = "getShortList(List<Short> in)";
66                 method = "getLongList(List<Long> in)";
67                 method = "getFloatList(List<Float> in)";
68                 method = "getDoubleList(List<Double> in)";
69                 method = "getBooleanList(List<Boolean> in)";
70                 method = "getCharList(List<Character> in)";
71
72                 method = "handleEnum(Enum en)";
73                 method = "handleEnumArray(Enum en[])";
74                 method = "handleEnumList(List<Enum> en)";
75
76                 method = "handleStruct(Struct str)";
77                 method = "handleStructArray(Struct str[])";
78                 method = "handleStructList(List<Struct> str)";
79
80                 method = "registerCallback(CallBackInterface _cb)";
81                 method = "registerCallbackArray(CallBackInterface _cb[])";
82                 method = "registerCallbackList(List<CallBackInterface> _cb)";
83                 method = "callBack()";
84
85                 method = "getA()";
86                 method = "setA(int _int)";
87                 method = "setB(float _float)";
88                 method = "setC(String _string)";
89         }
90
91         capability SetAndGets {
92                 description = "All the set-and-get methods";
93                 method = "sumArray(String newA[])";
94                 method = "setAndGetA(int newA)";
95                 method = "setACAndGetA(String newC, int newA)";
96         }
97
98         enum Enum {
99
100                 APPLE,
101                 ORANGE,
102                 GRAPE
103         }
104
105         struct Struct {
106
107                 string  name;
108                 float   value;
109                 int     year;
110         }
111 }
112
113