Skip to content

Commit

Permalink
chore(docs): add xml spec and docs for dbus target device
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Feb 24, 2024
1 parent 8b5c562 commit 3b49e8a
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ docs: ## Generate markdown docs for DBus interfaces
sed -i 's/DBus Interface API/Source HIDRaw DBus Interface API/g' ./docs/source_hidraw_device.md
xsltproc --novalid -o docs/keyboard.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Keyboard
sed -i 's/DBus Interface API/Keyboard DBus Interface API/g' ./docs/keyboard.md
xsltproc --novalid -o docs/target_dbus_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml
sed -i 's/DBus Interface API/Target DBus Device Interface API/g' ./docs/target_dbus_device.md

# Refer to .releaserc.yaml for release configuration
.PHONY: sem-release
Expand Down
55 changes: 55 additions & 0 deletions bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Input.DBusDevice">
<!--
Emitted when an input event occurs
-->
<signal name="InputEvent">
<arg name="event" type="s"/>
<arg name="value" type="d"/>
</signal>
<!--
Name of the DBus device
-->
<property name="Name" type="s" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
</node>

97 changes: 97 additions & 0 deletions docs/target_dbus_device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Target DBus Device Interface API

## org.freedesktop.DBus.Peer

### Methods

#### Ping

#### GetMachineId

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| \*\*\*\* | *out* | *s* | |

### Signals

## org.freedesktop.DBus.Introspectable

### Methods

#### Introspect

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| \*\*\*\* | *out* | *s* | |

### Signals

## org.shadowblip.Input.DBusDevice

### Properties

| Name | Access | Type | Description |
| --- | :---: | :---: | --- |
| **Name** | *read* | *s* | |

### Methods

### Signals

#### InputEvent

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **event** | \*\* | *s* | |
| **value** | \*\* | *d* | |

## org.freedesktop.DBus.Properties

### Methods

#### Get

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| \*\*\*\* | *out* | *v* | |

#### Set

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| **value** | *in* | *v* | |

#### GetAll

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| \*\*\*\* | *out* | *a{sv}* | |

### Signals

#### PropertiesChanged

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | \*\* | *s* | |
| **changed_properties** | \*\* | *a{sv}* | |
| **invalidated_properties** | \*\* | *as* | |

0 comments on commit 3b49e8a

Please sign in to comment.