summaryrefslogtreecommitdiffstats
path: root/example/net
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2017-07-03 11:06:12 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-07-03 11:06:12 -0500
commit8eb1b85a1ee411a5743cfaae64000a968895d098 (patch)
treea46675faee86de1b1fa6112ec784a88d0d0068b6 /example/net
parent82f083d525fbf5c30ad647c52fd334a8fa529a52 (diff)
downloadsdbusplus-8eb1b85a1ee411a5743cfaae64000a968895d098.tar.gz
sdbusplus-8eb1b85a1ee411a5743cfaae64000a968895d098.zip
example: move schema to top-level dir
Change-Id: Icb6a6ca266181e9b401eec64dbbada8b7e334229 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'example/net')
-rw-r--r--example/net/poettering/Calculator.errors.yaml3
-rw-r--r--example/net/poettering/Calculator.interface.yaml77
2 files changed, 80 insertions, 0 deletions
diff --git a/example/net/poettering/Calculator.errors.yaml b/example/net/poettering/Calculator.errors.yaml
new file mode 100644
index 0000000..730e2a3
--- /dev/null
+++ b/example/net/poettering/Calculator.errors.yaml
@@ -0,0 +1,3 @@
+- name: DivisionByZero
+ description: >
+ An attempt to divide by zero was attempted.
diff --git a/example/net/poettering/Calculator.interface.yaml b/example/net/poettering/Calculator.interface.yaml
new file mode 100644
index 0000000..7932aed
--- /dev/null
+++ b/example/net/poettering/Calculator.interface.yaml
@@ -0,0 +1,77 @@
+description: >
+ An example interface originally described as part of the announcment
+ of new sd-bus interfaces at:
+ http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
+methods:
+ - name: Multiply
+ description: >
+ Multiplies two integers 'x' and 'y' and returns the result.
+ parameters:
+ - name: x
+ type: int64
+ description: >
+ The first integer to multiply.
+ - name: y
+ type: int64
+ description: >
+ The second integer to multiply.
+ default: 1
+ returns:
+ - name: z
+ type: int64
+ description: >
+ The result of (x*y).
+ - name: Divide
+ description: >
+ Divides two integers 'x' and 'y' and returns the result.
+ parameters:
+ - name: x
+ type: int64
+ description: >
+ The first integer to divide.
+ - name: y
+ type: int64
+ description: >
+ The second integer to divide.
+ default: 1
+ returns:
+ - name: z
+ type: int64
+ description: >
+ The result of (x/y).
+ errors:
+ - self.Error.DivisionByZero
+ - name: Clear
+ description: >
+ Reset the LastResult property to zero.
+properties:
+ - name: LastResult
+ type: int64
+ default: 0
+ description: >
+ The result of the most recent calculation.
+ - name: Status
+ type: enum[self.State]
+ default: Success
+ description: >
+ The current state of the Calculator.
+signals:
+ - name: Cleared
+ description: >
+ Signal indicating the LastReset property has been set to zero by the
+ 'Clear' method.
+ properties:
+ - type: int64
+ description: >
+ Value of LastReset prior to Clear.
+enumerations:
+ - name: State
+ description: >
+ Identifies if the service has encountered an error or not.
+ values:
+ - name: Success
+ description: >
+ No error has been encountered.
+ - name: Error
+ description: >
+ The service has encountered an error.
OpenPOWER on IntegriCloud