summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-04-06 09:25:05 +0200
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-04-06 09:25:05 +0200
commit10df6730e14353adc59e79726f615f83053f9ab0 (patch)
tree31f2cebdf4f70af0520c356df6958a895ac5d23c
parent1496c73920d2749b191fcd9eb79a1de11364c1d2 (diff)
downloadqtivi-qface-10df6730e14353adc59e79726f615f83053f9ab0.tar.gz
initial idea of a profile. Next would be to twek the listener
-rw-r--r--qface/idl/profile.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/qface/idl/profile.py b/qface/idl/profile.py
new file mode 100644
index 0000000..4b376c9
--- /dev/null
+++ b/qface/idl/profile.py
@@ -0,0 +1,36 @@
+# Copyright (c) Pelagicore AB 2016
+
+from enum import Enum
+
+
+class EFeature(Enum):
+ CONST_PROPERTY = 'const_property'
+ EXTEND_INTERFACE = 'extend_interface'
+
+
+class EProfile(Enum):
+ BASIC = 'basic'
+ ADVANCED = 'advanced'
+ ALL = 'advanced'
+
+
+class Profile:
+ def __init__(self, features=set()):
+ self.features = features
+
+ @staticmethod
+ def get_profile(cls, name):
+ if name is EProfile.BASIC:
+ return Profile(features=[
+ ])
+ if name is EProfile.ADVANCED:
+ return Profile(features=[
+ EFeature.CONST_PROPERTY,
+ EFeature.EXTEND_INTERFACE
+ ])
+ if name is EProfile.ALL:
+ return Profile(features=[
+ ])
+ return []
+
+