-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update everything to conform the 0.3.0 DBus spec #9
Conversation
… name and the given instance
Continuing my proof of concept I found the message definition got also changed with the spec change of 0.3.0. |
I think this should convert the c part to byte array properly
Everything is now updated to the v0.3.0 spec, and a method is added for registering with a description For testing the golang example, there is one change that does not really belong in this fix: the I tested both examples with my fake distributor: https://gitlab.com/j0dev/rust/rust-unifiedpush-example-distributor Next on the TODO is updating the documentation on the website |
Looks good to me! Thank you so much for doing this |
Description
This merge request fixes the dbus API to be in line with the spec (this package was never updated from 0.2.0 to 0.3.0).
This comprises of the registration (distributor) and message (connector) signature. This is/was a breaking change.
Noteworthy changes
General
This merge request changes the initialization from just the long app name (reverse FQDN format) and a callback class to include a friendly application name as second parameter (moving the callback class to the third)
This friendly name is used when registering in combination with the instance given by the app to generate a nice description for the notification session. (Allowing distributors to display a user friendly list of registrations.)
A second registration function is added to allow overriding the description by the application itself
Internal changes
The description field is added to the 'instance' object in the store.
The generation and retrieval of tokens / 'instance' objects is changed to return the 'instance' so the description is also available when registering.
Internally the description is currently only set the first time an 'instance' / token is generated. During registration the description is simply taken from the 'instance' object.
saveNewToken()
is renamed togenerateNewToken()
to convey the generation and not just storing of a tokenProgress
Fixes #8