blob: af4dd1befeabd5a384ceec01d8dde4b185cbeb5c [file] [log] [blame]
Patrick Williams696fa722016-10-09 15:25:22 -05001description: >
Gunnar Millsa4b4a0b2018-04-08 14:30:38 -05002 An example interface originally described as part of the announcement
Patrick Williams696fa722016-10-09 15:25:22 -05003 of new sd-bus interfaces at:
4 http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
5methods:
6 - name: Multiply
7 description: >
8 Multiplies two integers 'x' and 'y' and returns the result.
9 parameters:
10 - name: x
Patrick Williamsd0cd9662016-11-14 21:55:07 -060011 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050012 description: >
13 The first integer to multiply.
14 - name: y
Patrick Williamsd0cd9662016-11-14 21:55:07 -060015 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050016 description: >
17 The second integer to multiply.
18 default: 1
19 returns:
20 - name: z
Patrick Williamsd0cd9662016-11-14 21:55:07 -060021 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050022 description: >
23 The result of (x*y).
24 - name: Divide
25 description: >
26 Divides two integers 'x' and 'y' and returns the result.
27 parameters:
28 - name: x
Patrick Williamsd0cd9662016-11-14 21:55:07 -060029 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050030 description: >
31 The first integer to divide.
32 - name: y
Patrick Williamsd0cd9662016-11-14 21:55:07 -060033 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050034 description: >
35 The second integer to divide.
36 default: 1
37 returns:
38 - name: z
Patrick Williamsd0cd9662016-11-14 21:55:07 -060039 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050040 description: >
41 The result of (x/y).
42 errors:
Patrick Williams4a5c3b32016-11-15 14:26:25 -060043 - self.Error.DivisionByZero
Patrick Williams696fa722016-10-09 15:25:22 -050044 - name: Clear
45 description: >
46 Reset the LastResult property to zero.
47properties:
48 - name: LastResult
Patrick Williamsd0cd9662016-11-14 21:55:07 -060049 type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050050 default: 0
51 description: >
52 The result of the most recent calculation.
Patrick Williams8c00fed2016-11-15 11:07:39 -060053 - name: Status
54 type: enum[self.State]
55 default: Success
56 description: >
57 The current state of the Calculator.
Adriana Kobylak75a2e252018-06-06 10:49:24 -050058 - name: Owner
59 type: string
60 description: >
61 The name of the owner of the Calculator.
62 errors:
63 - self.Error.PermissionDenied
Patrick Williams696fa722016-10-09 15:25:22 -050064signals:
65 - name: Cleared
66 description: >
67 Signal indicating the LastReset property has been set to zero by the
68 'Clear' method.
69 properties:
Patrick Williamsd0cd9662016-11-14 21:55:07 -060070 - type: int64
Patrick Williams696fa722016-10-09 15:25:22 -050071 description: >
72 Value of LastReset prior to Clear.
Patrick Williams8c00fed2016-11-15 11:07:39 -060073enumerations:
74 - name: State
75 description: >
76 Identifies if the service has encountered an error or not.
77 values:
78 - name: Success
79 description: >
80 No error has been encountered.
81 - name: Error
82 description: >
83 The service has encountered an error.