chore: initial port
This commit is contained in:
29
tests/data/introspection.xml
Normal file
29
tests/data/introspection.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node name="/com/example/sample_object0">
|
||||
<interface name="com.example.SampleInterface0">
|
||||
<method name="Frobate">
|
||||
<arg name="foo" type="i" direction="in"/>
|
||||
<arg name="bar" type="s" direction="out"/>
|
||||
<arg name="baz" type="a{us}" direction="out"/>
|
||||
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
|
||||
</method>
|
||||
<method name="Bazify">
|
||||
<arg name="bar" type="(iiu)" direction="in"/>
|
||||
<arg name="bar" type="v" direction="out"/>
|
||||
</method>
|
||||
<method name="Mogrify">
|
||||
<arg name="bar" type="(iiav)" direction="in"/>
|
||||
</method>
|
||||
<signal name="Changed">
|
||||
<arg name="new_value" type="b"/>
|
||||
</signal>
|
||||
<signal name="ChangedMulti">
|
||||
<arg name="new_value1" type="b"/>
|
||||
<arg name="new_value2" type="y"/>
|
||||
</signal>
|
||||
<property name="Bar" type="y" access="write"/>
|
||||
</interface>
|
||||
<node name="child_of_sample_object"/>
|
||||
<node name="another_child_of_sample_object"/>
|
||||
</node>
|
||||
234
tests/data/messages.json
Normal file
234
tests/data/messages.json
Normal file
@@ -0,0 +1,234 @@
|
||||
[
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": ""
|
||||
},
|
||||
"data": "6c01000100000000010000006d00000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e4442757300000000"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "as",
|
||||
"body": [["hello", "world"]]
|
||||
},
|
||||
"data": "6c0100011a000000010000007800000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670002617300160000000500000068656c6c6f00000005000000776f726c6400"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "a(uu)",
|
||||
"body": [
|
||||
[
|
||||
[1, 1],
|
||||
[2, 2]
|
||||
]
|
||||
]
|
||||
},
|
||||
"data": "6c01000118000000010000007b00000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e444275730000000008016700056128757529000000000000100000000000000001000000010000000200000002000000"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "a{ss}",
|
||||
"body": [
|
||||
{
|
||||
"foo": "bar",
|
||||
"bat": "baz"
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": "6c01000128000000010000007b00000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670005617b73737d000000000000200000000000000003000000666f6f00030000006261720003000000626174000300000062617a00"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "a(as(uu(a{ss})))",
|
||||
"body": [
|
||||
[
|
||||
[
|
||||
["hello", "there"],
|
||||
[
|
||||
5,
|
||||
6,
|
||||
[
|
||||
{
|
||||
"five": "six",
|
||||
"seven": "eight"
|
||||
}
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
["to", "the", "world"],
|
||||
[
|
||||
7,
|
||||
8,
|
||||
[
|
||||
{
|
||||
"seven": "eight",
|
||||
"nine": "ten"
|
||||
}
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"data": "6c010001c4000000010000008600000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e444275730000000008016700106128617328757528617b73737d292929000000bc00000000000000160000000500000068656c6c6f0000000500000074686572650000000000000005000000060000002e0000000000000004000000666976650000000003000000736978000000000005000000736576656e0000000500000065696768740000001a00000002000000746f0000030000007468650005000000776f726c6400000007000000080000002c0000000000000005000000736576656e000000050000006569676874000000040000006e696e65000000000300000074656e00"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "t",
|
||||
"body": [9007199254740988]
|
||||
},
|
||||
"data": "6c01000108000000010000007700000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670001740000fcffffffffff1f00"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "x",
|
||||
"body": [-9007199254740988]
|
||||
},
|
||||
"data": "6c01000108000000010000007700000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670001780000040000000000e0ff"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "bnqiud",
|
||||
"body": [true, -200, 150, -20000, 20000, 9083492084.4444]
|
||||
},
|
||||
"data": "6c01000118000000010000007c00000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670006626e7169756400000000000100000038ff9600e0b1ffff204e0000228ea3b758eb0042"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "v",
|
||||
"body": [
|
||||
{
|
||||
"signature": "s",
|
||||
"value": "hello world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": "6c01000114000000010000007700000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670001760000017300000b00000068656c6c6f20776f726c6400"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "v",
|
||||
"body": [
|
||||
{
|
||||
"signature": "v",
|
||||
"value": {
|
||||
"signature": "s",
|
||||
"value": "hello"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": "6c01000112000000010000007700000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e4442757300000000080167000176000001760001730000000500000068656c6c6f00"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "a{sv}",
|
||||
"body": [
|
||||
{
|
||||
"variant_key_1": {
|
||||
"signature": "s",
|
||||
"value": "variant_val_1"
|
||||
},
|
||||
"variant_key_2": {
|
||||
"signature": "s",
|
||||
"value": "variant_val_2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": "6c01000162000000010000007b00000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670005617b73767d0000000000005a000000000000000d00000076617269616e745f6b65795f31000173000000000d00000076617269616e745f76616c5f31000000000000000d00000076617269616e745f6b65795f32000173000000000d00000076617269616e745f76616c5f3200"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "v",
|
||||
"body": [
|
||||
{
|
||||
"signature": "as",
|
||||
"value": ["foo", "bar"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": "6c01000118000000010000007700000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e44427573000000000801670001760000026173001000000003000000666f6f000300000062617200"
|
||||
},
|
||||
{
|
||||
"message": {
|
||||
"destination": "org.freedesktop.DBus",
|
||||
"path": "/org/freedesktop/DBus",
|
||||
"interface": "org.freedesktop.DBus",
|
||||
"member": "Hello",
|
||||
"serial": 1,
|
||||
"signature": "vas",
|
||||
"body": [
|
||||
{
|
||||
"signature": "v",
|
||||
"value": {
|
||||
"signature": "s",
|
||||
"value": "world"
|
||||
}
|
||||
},
|
||||
["bar"]
|
||||
]
|
||||
},
|
||||
"data": "6c01000120000000010000007900000001016f00150000002f6f72672f667265656465736b746f702f4442757300000002017300140000006f72672e667265656465736b746f702e4442757300000000030173000500000048656c6c6f00000006017300140000006f72672e667265656465736b746f702e444275730000000008016700037661730000000000000000017600017300000005000000776f726c64000000080000000300000062617200"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user