Add initial python bindings to the library
[deb_shairplay.git] / src / test / test.py
CommitLineData
8be1424a
JVH
1import time
2from struct import *
3from Shairplay import *
4
5hwaddr = pack('BBBBBB', 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB)
6
7shairplay = LoadShairplay(".")
8
9raop = RaopService(shairplay, RaopCallbacks())
10port = raop.start(5000, hwaddr)
11
12dnssd = DnssdService(shairplay)
13dnssd.register_raop("RAOP test", port)
14
15time.sleep(50)
16
17dnssd.unregister_raop()
18raop.stop()
19del raop
20