summaryrefslogtreecommitdiffstats
path: root/conf/unit/generate-unit-conf/provided-api.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-08-02 18:48:57 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-08-16 13:49:16 +0000
commit6caade489f8bd15dccdde6c69452d920ead2201e (patch)
treefd04aca394c42225aa235a6453c560f2eb6761a6 /conf/unit/generate-unit-conf/provided-api.inc
parent8c7132a146aa744f167ea2fc45dcd8d53018ecc0 (diff)
Add the external binding featureflounder_5.99.3flounder/5.99.35.99.3
This commit introduce two new features: <urn:AGL:widget:provided-binding> <param "name"="public-name" "value"="relative-path-to-the-binding"/> <urn:AGL:widget:required-binding> <param "name"="public-name" "value"="extern"> <param "name"="relative-path-to-the-binding" "value"="local"> TODO: manage security by setting correct Smack label to the exported files Bugs-AGL: SPEC-1439 Bugs-AGL: SPEC-1663 Change-Id: I70aad7d523ece7a2ae0058b79708a02ef81144e2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/unit/generate-unit-conf/provided-api.inc')
-rw-r--r--conf/unit/generate-unit-conf/provided-api.inc72
1 files changed, 72 insertions, 0 deletions
diff --git a/conf/unit/generate-unit-conf/provided-api.inc b/conf/unit/generate-unit-conf/provided-api.inc
new file mode 100644
index 0000000..8a667a9
--- /dev/null
+++ b/conf/unit/generate-unit-conf/provided-api.inc
@@ -0,0 +1,72 @@
+dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
+;-------------------------------------------------------------------------------
+;---- P R O V I D E D A P I S ----
+;-------------------------------------------------------------------------------
+
+{{#provided-api}}
+
+;-------------------------------------------------------------------------------
+;---- T H E S E R V I C E O F T H E A P I ----
+;-------------------------------------------------------------------------------
+%begin systemd-unit
+
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+
+%systemd-unit system
+%systemd-unit service UNIT_NAME_API_BASE({{name}})@
+
+[Unit]
+Description=Provides api {{name}} for user %i
+X-AFM-API-TYPE={{value}}
+
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+
+{{#value=ws|auto}}
+Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
+After=UNIT_NAME_API_BASE({{name}})@%i.socket
+{{/value=ws|auto}}
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+{{#value=ws|auto}}
+ExecStart=/bin/true
+{{/value=ws|auto}}
+
+%end systemd-unit
+
+
+;-------------------------------------------------------------------------------
+;---- T H E S O C K E T O F T H E A P I ----
+;-------------------------------------------------------------------------------
+{{#value=ws|auto}}
+
+%begin systemd-unit
+
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+
+%systemd-unit system
+%systemd-unit socket UNIT_NAME_API_BASE({{name}})@
+[Unit]
+Description=Provides websocket api {{name}} for user %i
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+DefaultDependencies=no
+
+[Socket]
+SmackLabel=*
+SmackLabelIPIn=System
+SmackLabelIPOut=System
+ListenStream=USER_RUN_DIR/apis/ws/{{name}}
+FileDescriptorName={{name}}
+Service=UNIT_NAME_SERVICE
+
+%end systemd-unit
+
+
+{{/value=ws|auto}}
+
+{{/provided-api}}
+
+