https://github.com/shadowblip/godot-dbus
DBus bindings for Godot 4.x
https://github.com/shadowblip/godot-dbus
Last synced: 9 months ago
JSON representation
DBus bindings for Godot 4.x
- Host: GitHub
- URL: https://github.com/shadowblip/godot-dbus
- Owner: ShadowBlip
- License: gpl-3.0
- Created: 2023-06-26T00:36:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T03:35:17.000Z (almost 2 years ago)
- Last Synced: 2025-04-19T05:52:53.358Z (about 1 year ago)
- Language: C++
- Size: 71.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot DBus
Godot DBus is a native GDExtension for Godot 4.x that allows you to interact
with DBus.
## Requirements
### Build Requirements
The following are required to build Open Gamepad UI:
- Godot 4.x
- GCC 7+ or Clang 6+.
- Python 3.5+.
- SCons 3.0+ build system
- pkg-config (used to detect the dependencies below).
- X11, Xcursor, Xinerama, Xi and XRandR development libraries.
- MesaGL development libraries.
- ALSA development libraries.
- PulseAudio development libraries.
- make (optional)
- unzip (optional)
- wget (optional)
If you are using ArchLinux, you can run the following:
```bash
pacman -S --needed scons pkgconf gcc libxcursor libxinerama libxi libxrandr mesa glu libglvnd alsa-lib pulseaudio make unzip wget git
```
## Building
You can build the project using the following:
```bash
make build
```
## Usage
Copy the `addons` folder after you have built the project into your Godot
project directory.
## Exploring DBus
Reference: https://ukbaz.github.io/howto/python_gio_1.html
### List objects from a service
```
$ busctl tree org.bluez
└─/org
└─/org/bluez
└─/org/bluez/hci0
```
### Find methods/properties
```
$ busctl introspect org.bluez /org/bluez/hci0
NAME TYPE SIGNATURE RESULT/VALUE >
org.bluez.Adapter1 interface - - >
.GetDiscoveryFilters method - as >
NAME TYPE SIGNATURE RESULT/VALUE >
org.bluez.Adapter1 interface - - >
.GetDiscoveryFilters method - as >
.RemoveDevice method o - >
.SetDiscoveryFilter method a{sv} - >
.StartDiscovery method - - >
.StopDiscovery method - - >
.Address property s "11:11:11:11:1C:11" >
.AddressType property s "public" >
.Alias property s "bravo" >
.Class
```
### Get a property
```
$ busctl get-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Address
s "11:11:11:11:1C:11"
```
### Call a method
```
busctl call org.bluez /org/bluez/hci0 org.bluez.Adapter1 StartDiscovery
```