Separating policy file into main policy and generated interfaces; fixing lexer, parse...
[iot2.git] / config / iotpolicy / policy.pol
index 7bcefcdf5ef32fb5d95b274a962f7d90960c2532..3048c1ee845ed3cf9d3b11e9ea9f5129beae3527 100644 (file)
@@ -1,30 +1,32 @@
 public interface Camera {
-    public void MethodA(int A, int B);
-    public int MethodB(int C, string D);
-    public string MethodC(string E, int F);
-    public float MethodD(int G, float H);
-    public boolean MethodE(Camera I, boolean J);
-       public void MethodF();
-}
 
-capability Camera.ImageCapture {
-       description = "The quick brown fox jumps over the smart dog";
-       description = "Another description";
-       method = MethodA;
-       method = MethodB;
-}
+    public void MethodA(int A, Speaker B);
+    public void MethodA(int A, Speaker B, int AB);
+    public int MethodB(int C, String D);
+    public String MethodC(String E, Map<int> F);
+    public float MethodD(Set<String> G, float H);
+    public boolean MethodE(String I, boolean J);
+       public void MethodF(LightBulb K);
 
-capability Camera.VideoRecording {
-       description = "The quick brown fox jumps over the cool dog";
-       method = MethodC;
-       method = MethodD;
-}
+       capability ImageCapture {
+               description = "The quick brown fox jumps over the smart dog";
+               description = "Another description";
+               method = "MethodA(int A, Speaker B)";
+               method = "MethodB(int C, String D)";
+               method = "MethodC(String E, Map<int> F)";
+       }
+
+       capability VideoRecording {
+               description = "The quick brown fox jumps over the cool dog";
+               method = "MethodA(int A, Speaker B)";
+               method = "MethodA(int A, Speaker B, int AB)";
+               method = "MethodD(Set<String> G, float H)";
+       }
 
-capability Camera.BackupData {
-       description = "The quick brown fox jumps over the clever dog";
-       method = MethodE;
+       capability BackupData {
+               description = "The quick brown fox jumps over the clever dog";
+               method = "MethodE(String I, boolean J)";
+       }
 }
 
-requires Camera with VideoRecording, ImageCapture as interface CameraWithCaptureAndData;
 
-requires Camera with ImageCapture, VideoRecording as interface CameraWithCaptureAndRecording;