{"id":22197147,"url":"https://github.com/gcarreno/fpdbus-tools","last_synced_at":"2026-01-05T08:05:38.231Z","repository":{"id":87559268,"uuid":"64909095","full_name":"gcarreno/fpdbus-tools","owner":"gcarreno","description":"Free Pascal DBus Wrapper and Code Generation Tools","archived":false,"fork":false,"pushed_at":"2025-01-25T05:29:15.000Z","size":121,"stargazers_count":10,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T06:20:19.657Z","etag":null,"topics":["cli","dbus","free-pascal","gui","lazarus","lazarus-ide","object-pascal","objectpascal"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gcarreno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-04T06:37:51.000Z","updated_at":"2025-01-25T05:29:20.000Z","dependencies_parsed_at":"2023-03-13T18:44:03.856Z","dependency_job_id":null,"html_url":"https://github.com/gcarreno/fpdbus-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcarreno%2Ffpdbus-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcarreno%2Ffpdbus-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcarreno%2Ffpdbus-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcarreno%2Ffpdbus-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcarreno","download_url":"https://codeload.github.com/gcarreno/fpdbus-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366195,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dbus","free-pascal","gui","lazarus","lazarus-ide","object-pascal","objectpascal"],"created_at":"2024-12-02T14:18:34.700Z","updated_at":"2026-01-05T08:05:38.225Z","avatar_url":"https://github.com/gcarreno.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fpdbus-tools\n\n## Free Pascal DBus Wrapper and Code Generation Tools\n\nThe author of this code is [Michaël Van Canneyt](mailto:michael@freepascal.org).\n\nYou can find the code and the article he wrote about it [here](https://www.freepascal.org/~michael/articles/#dbus2).\n\nThat page contains a real treasure trove of information and source code.\n\nI'm just re-arranging the code and adding some niceaties.\n\n## What does it contain?\n\nThe code is comprised of a set of pascal units that implement a Component wrapper around [DBus](https://dbus.freedesktop.org/):\n\n- `src/dbuscomp.pp` DBUS component layer on top of the DBUS library.\n- `src/dbusintf.pp` DBUS standard interfaces: Introspectable, DBUS daemon and Properties.\n- `src/dbusintro.pp` DBUS Introspection and code generation components.\n- `src/dbusproxy.pp` DBUS proxy component.\n\nThe code also includes a set of code generation tools, both in GUI and CLI format:\n\n- `gui/fpdbusview` GUI tool for exploring and exporting code for both System and Session services.\n- `cli/dbus2pas` CLI tools for exporting code for both System and Session services.\n\n## fpdbusview\n\nThis gui tool depends on:\n- LCL\n- SynEdit (For the preview of the generated code)\n\n(needs explanation of what is, what it does and how it does it)\n\n## dbus2pas\n\nThis cli util has no dependencies in terms of packages.\n\nThis is a command line utility that you can use in scripting.\nIt does not have the visual aid to browse your exposed DBus services.\nYou will have done so with a DBus debug tool like the above mentioned `fpdbusview` or [D-Feet](https://wiki.gnome.org/Apps/DFeet).\nOnce you have the necessary information, you can use `dbus2pas` to generate ObjectPascal code to wrap around the service and ease it's use via a more OOP way.\n\nHere are the options to use dbus2pas.\n\n```man\nUsage: dbus2pas options\n\n    -h | --help                 print this help message\n    -s | --system               connect to system bus\n    -p | --objectpath=O         object to introspect in service (default is /)\n    -o | --output=N             filename to write to (defaults to unitname)\n    -d | --destination=D        destination service to connect to\n    -f | --file=N               file to read XML from\n    -u | --unitname=N           unitname (equals output if not set)\n    -c | --codeoptions=N        Set code generation options. Comma-separated list of:\n        GenerateInterface       Generate interface declaration\n        GenerateProxy           Generate proxy declaration\n        ProxyHasInterface       Proxy implements interface\n        ProxyUsesProtected      Proxy methods are protected\n        UseFunction             Use functions for methods with OUT parameter\n        IncludeSystemInterfaces Include system interfaces\n        LastPartInterfaceName   InterfaceName is constructed from last part of DBUS name if none specified\n    -k | --keywordprefix=p      Prefix for pascal identifier names\n    -x | --xmlfile=N            Write introspection XML to file (only with -d)\n```\n\n### Examples\n\n```shell\ndbus2pas -p /org/freedesktop/Notifications \\\n    -o org_freedesktop_Notifications.pas \\\n    -d org.freedesktop.Notifications \\\n    -u org_freedesktop_Notifications \\\n    -c GenerateInterface,GenerateProxy,UseFunction,LastPartInterfaceName\n```\nThis will create a file called `org_freedesktop_Notifications.pas` containing code with an Interface and a Proxy to the org.freedesktop.Notifications service.\n\nYou will need to include `org_freedesktop_Notifications.pas` and `dbusproxy.pp` in your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcarreno%2Ffpdbus-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcarreno%2Ffpdbus-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcarreno%2Ffpdbus-tools/lists"}