Commit graph

43 commits

Author SHA1 Message Date
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
H. S. Teoh
50a517f4fb Replace 'byte' with 'ubyte'.
Because 'y' is unsigned in the DBus spec.
2021-01-12 01:40:07 -08: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
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
WebFreak001
958939ace1 Fix destructors on uninitialized structs 2018-08-18 20:55:42 +02:00
Jan Jurzitza
100ce3e60d
Merge branch 'master' into replace-body-with-do 2018-03-19 09:04:33 +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
Hiroki Noda
a3dcda5741 Replace body with do. 2017-12-05 22:14:08 +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
Harry T. Vennik
9bbd4a3bbf Move UDA stuff for struct support to separate module 2017-10-28 15:28:38 +02:00
WebFreak001
92447921a7 unittest ObjectPath concat & allow strings without leading / 2017-10-20 12:47:31 +02:00
WebFreak001
fd9b7ebdff public nogc ObjectPath.isValid function + ~ operator 2017-10-19 21:07:31 +02:00
Harry T. Vennik
da536be3d1 Implemented selective marshaling of struct fields
- Skips private fields by default
- Allows overriding of that default by an UDA on the struct type
- Allows per-field overriding using UDA on field
2017-07-26 09:45:39 +02:00
Harry T. Vennik
87a06cead1 Improved tests
Moved unittest for struct types from `ddbus.conv` to `ddbus.thin` and
made one struct field private.

Test now fails compile-time because of error "member a is not
accessible".
2017-07-22 15:13:55 +02:00
Harry T. Vennik
12b3b61c1b Move DBusException and wrapErrors to separate module
Also improved its implemention.
This prepares for new exception types to be added in later commits.
2017-07-08 15:56:31 +02:00
Harry T. Vennik
16efa3a6c3 Add unittest for ObjectPath 2017-06-25 18:33:57 +02:00
Harry T. Vennik
7e46fb6401 Fixup opEquals method signature to match D specification 2017-06-25 18:33:57 +02:00
Harry T. Vennik
884b31fa9f Added toHash function for usage of ObjectPath as KeyType in AAs 2017-06-25 18:33:57 +02:00
Harry T. Vennik
0439a1e8db Added support for object path type 2017-06-25 18:33:57 +02:00
Harry T. Vennik
455c0a8f0d Change signature type from char[] to const(char)[] 2017-06-05 14:28:20 +02:00
WebFreak001
33a829f95a Merge commit '6cc7ae6' into any-types 2017-04-23 20:56:54 +02:00
WebFreak001
6cc7ae6bf1 Added optimization case for binary data 2017-04-23 20:44:09 +02:00
Tristan Hume
debcc8fbc6 clean up things a little bit 2017-04-23 14:37:19 -04:00
WebFreak001
d8659c9eed Unittest for dynamic types & added to!AA, to!Tuple 2017-04-23 15:56:43 +02:00
WebFreak001
73122deb8c Support for dynamic variants (fix #9) 2017-04-23 15:19:15 +02:00
xentec
98bc5bddc1 Added basic variant type support
This also enables reading properties of DBus interfaces.
2015-12-31 00:47:19 +01:00
Tristan Hume
1457b249b7 Add basic server functionality. 2015-05-01 20:36:06 -04:00
Tristan Hume
5905d50e1a Switch to structs for thin wrappers. 2015-05-01 16:59:40 -04:00
Tristan Hume
e370a57a42 Add routing infrastructure. 2015-04-30 19:22:08 -04:00
Tristan Hume
9a73bcaad2 Added simple wrapper for calling DBus interfaces. 2015-04-29 18:34:01 -04:00
Tristan Hume
9a028b3a29 Add connection wrappers.
It can actually send messages now!
2015-04-28 21:00:48 -04:00
Tristan Hume
0e0e8971b4 DBus iterator conversion to/from D types 2015-04-27 17:38:01 -04:00
Tristan Hume
fd19791f8d Add handy utilities 2015-04-26 19:31:39 -04:00