Commit graph

131 commits

Author SHA1 Message Date
Chris Josten d8ed32ec0f Initial packaging commit 2021-03-02 17:00:34 +01:00
Chris Josten a1f3a16af3 Add libdbus as dependency of the library
Not adding this causes linker errors
2021-03-02 01:19:00 +01:00
Chris Josten e4ff08ba9d Move dependency declaration to top-level meson file
Otherwise meson won't detect it.
2021-03-01 15:40:04 +01:00
Chris Josten d4906288ce Change includedir to ddbus
It seems very likely that the current include directory was named apk-polkit by
mistake
2021-03-01 15:33:13 +01:00
Chris Josten e70d535168 Declare ddbus Meson dependency
* Declare ddbus_dep, so it can be used as a Meson subproject
2021-03-01 15:27:39 +01:00
Chris Josten 168bc0eb81 DBus variant File descriptor storage more explicit
Also added constants for the stdin, stdout, stderr filenos
2021-01-22 01:27:40 +01:00
Chris Josten 95a29d0578 Merge branch 'master' of https://github.com/trishume/ddbus 2021-01-22 00:30:12 +01:00
Chris Josten 3b1cc9b453 Added FileDescriptor support
Some DBus methods return file descriptors, such as
"org.freedesktop.login1.Manager.Inhibit". This commit adds support for
these.

I followed the same enum type defining pattern I've seen in the code,
such as with InterfaceNames and BusNames, to prevent integers and
fileDescriptors implicitly casting to each other.

Note that it is kinda hard to test with reading and writing
fileDescriptors, as DBus will duplicate the file descriptor
when reading, leading to relatively unpredicatable behaviour.

I also must admit I focussed most of my attention to reading file
descriptors and less to writing file descriptors, as I don't know a good
way to test those.
2021-01-22 00:20:43 +01:00
Jan Jurzitza d33e9db8f9
Merge pull request #52 from quickfur/ubyte
Update Readme.md to use `ubyte` instead of `byte`.
2021-01-12 20:36:55 +01:00
H. S. Teoh 4881f33bc2 Update Readme.md to use ubyte instead of byte.
Follow-up fix to PR#50.
2021-01-12 08:48:51 -08:00
Jan Jurzitza bf74a29878
Merge pull request #43 from WebFreak001/fix-immutable
fix immutable/const types & add type convenience
2021-01-12 11:13:42 +01:00
WebFreak001 2fde2e12af fix immutable/const types & add type convenience
Before it was not properly possible to use
static immutable name = interfaceName(...)
in a message, which is now fixed
2021-01-12 11:04:34 +01:00
Jan Jurzitza f988709b7a
Merge pull request #50 from quickfur/issue49
Replace 'byte' with 'ubyte', aligns with DBus spec
2021-01-12 10:53:18 +01:00
H. S. Teoh 50a517f4fb Replace 'byte' with 'ubyte'.
Because 'y' is unsigned in the DBus spec.
2021-01-12 01:40:07 -08:00
Jan Jurzitza ab994acdb3
Merge pull request #45 from Cogitri/meson
Add support for building with meson
2020-03-25 12:19:47 +01:00
Rasmus Thomsen 0fd4db1067 Add support for building with meson
fixes #44
2020-03-20 14:59:09 +01:00
thaven b43c2d6a8e
Merge pull request #41 from WebFreak001/fix-import-deprecation
Fix deprecation warning of std.digest
2019-03-31 14:46:18 +02:00
WebFreak001 4997fb4ad3 Fix deprecation warning of std.digest
std.digest.digest got renamed in 2.076.0
https://dlang.org/changelog/2.076.0.html#std-digest-package
2019-03-30 17:58:36 +01:00
Jan Jurzitza 32861ae74d
Merge pull request #40 from WebFreak001/fix-message-ctor
safer API with ObjectPath, InterfaceName, BusName
2019-03-30 17:35:43 +01:00
WebFreak001 db86451c7f safer API with ObjectPath, InterfaceName, BusName
the busName and interfacePath types transparently cast down to a string,
(but not the other way around) so they are a perfect upgrade to
 type-safety. The only downside to them is that templates can often get
them wrong. std.conv.to will return with a cast(T) prefix, which could
slightly break existing code.

I think the type-safety advantages are outweighing this corner case
though. The current API has been fully upgraded and examples still run
and work.
2019-03-17 10:33:55 +01:00
Jan Jurzitza c4de569809
Merge pull request #39 from WebFreak001/fix-ctors
Fix destructors on uninitialized structs
2018-08-18 20:56:07 +02:00
WebFreak001 958939ace1 Fix destructors on uninitialized structs 2018-08-18 20:55:42 +02:00
Jan Jurzitza 8c7aeeb7d6
Merge pull request #38 from WebFreak001/fix-37
Fix introspection crash when binding on `/`
2018-03-25 11:52:14 +02:00
WebFreak001 1769c2e0d6 Fix introspection crash when binding on / 2018-03-25 11:26:23 +02:00
Jan Jurzitza 83d35c8990
Merge pull request #32 from kubo39/replace-body-with-do
Replace body with do.
2018-03-19 09:05:12 +01:00
Jan Jurzitza 100ce3e60d
Merge branch 'master' into replace-body-with-do 2018-03-19 09:04:33 +01:00
thaven 6b1c162c89
Update readme (#36)
* Minor text improvements

* Mention struct support and update example

* Add overview of supported types

* Clarify mapping of types

* Explain customization of struct marshaling

* Update version number in dub.json example
2018-01-05 11:22:00 +01:00
thaven 10c931cc44
Merge pull request #35 from thaven/refactor/dbusany-conv
DBusAny: Reimplementation of to!T() and struct support
2017-12-21 06:08:38 +01:00
Harry T. Vennik 9c34742d96 Fix bug in get for arrays
Fixes #34
2017-12-20 06:24:32 +01:00
Harry T. Vennik 0841ac69de Also use get in array conversion 2017-12-20 06:24:32 +01:00
Harry T. Vennik 238db94916 Update unittest 2017-12-20 06:24:32 +01:00
Harry T. Vennik 9b408732ec Added struct support to DBusAny 2017-12-20 06:24:32 +01:00
Harry T. Vennik c015f0ce15 Improved documentation comments
- Reformat
- Added warning against usage of direct DBusAny constructor in user code
2017-12-20 06:24:32 +01:00
Harry T. Vennik 0570898602 Refactor DBusAny.to!T() 2017-12-20 06:24:32 +01:00
Harry Vennik 137b3c36b7 Improved code formatting (#33)
- Used dfmt (otbs style)
- Added some empty lines and braces on all block statements
- Add .editorconfig

Closes #29
2017-12-18 19:19:27 +01:00
Harry T. Vennik c42eb823a2 Ignore coverage analysis output files 2017-12-16 10:52:43 +01:00
Jan Jurzitza 1a5df56a42
Merge pull request #31 from kubo39/exampledir
Create example directory and separate client/server.
2017-12-07 19:45:49 +01:00
Hiroki Noda 42a5ae0d3c Use core.time.Duration. 2017-12-07 09:31:44 +09:00
Hiroki Noda a3dcda5741 Replace body with do. 2017-12-05 22:14:08 +09:00
Jan Jurzitza 10b8a22b95
Merge pull request #30 from kubo39/duration
Add sendWithReplyBlocking overload taking a Duration.
2017-12-03 22:07:23 +01:00
Hiroki Noda a74a347645 Simplify dub.json to be able to easily copy the examples. 2017-12-04 06:04:28 +09:00
Hiroki Noda cc83591fce Fix mixed in a tab. 2017-12-04 05:59:18 +09:00
Hiroki Noda 9007eacdf3 Create example directory and separate client/server. 2017-12-04 05:30:52 +09:00
Hiroki Noda 30e053db2a Add sendWithReplyBlocking overload taking a Duration. 2017-12-03 19:41:41 +09:00
thaven ce7716463d
Add get!T method to DBusAny (#27)
* Add ddbus.util.BasicTypes

* Implement DBusAny.get and DBusAny.typeSig

* Add unittest for DBusAny.get

* Make TypeMismatchException constructor public
2017-11-11 11:42:55 +01:00
thaven 99cb6cb071
Allow structs with non-marshaled non-canDBus fields (#28) 2017-11-04 15:12:56 +01:00
thaven 279c3ab00b
Merge pull request #25 from trishume/objpath-improv2
ObjectPath Improvements
2017-11-04 11:01:07 +01:00
Harry T. Vennik 34e42b9aa2 Improved code formatting 2017-11-04 10:59:41 +01:00
thaven df6f2aa14c
Merge pull request #26 from thaven/refactor/uda-module
Move the UDA related stuff into a separate module
2017-11-04 10:36:46 +01:00
thaven 7e46953c76
Add import of attributes to package.d 2017-10-28 23:18:28 +02:00