-
Notifications
You must be signed in to change notification settings - Fork 17
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
Initial D-Bus XML support #88
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
In the documentation the built-in types are called fundamental so the detailed descriptions should do the same. A "primitive" type can be considered int/float/string/boolean but also a few others like set and map are "built-in" into IFEX, i.e. they are also fundamental. (Non-fundamental types are enumerations, typedefs and structs.) Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
While most usage of enumerations will be backed by an integer type, there is no real reason to disallow other types. For example, enumerations where each value is a string-constant. From now on the limitation is described as the backing type must resolve to a primitive type (e.g. it can't be a Struct, or array). This is a big change to the specification but since it is "growing" the set of possibilities it might be considered backwards compatible. (MINOR) The field that has "typing.Any" type annotation is now skipped over in the document generation (ifex_ast_doc.py) since it does not refer to any AST class. While doing that there was some small refactoring to simplify the logic also. Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
This feature has really been in theory included for a long time but it wasn't actually introduced in the files yet. Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Previous attempt to derive from Namespace, with modification was not working as well. Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
This is to prepare for a minimal user-callable wrapper located under scripts, to follow the same pattern as for ifexgen. Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
l. ifexgen_dbus is a frontend / executable command, defined in the package information (setup.py) and which calls the actual code. I just followed the same pattern as for ifexgen. 2. Rename D-Bus (correct spelling) to DBus (wrong spelling) because...python reasons :( Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
This PR was missing some template files. A a thing to learn is that it was not noticed in CI because it "successfully" produced output, but incomplete because of empty templates. Unit tests that compare the output to some expected output would have caught it, but those aren't built out yet for D-Bus. The required files are by now included on the master branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a generator for D-Bus, represented by its canonical interface description format, which is also known as the D-Bus XML introspection format.
It also adds a helper program to generate C++ server/client stubs and proxies from the resulting D-Bus XML from the sdbus_cpp project. It is in this repository represented by minimal scripts to git-clone and build the program locally and in a container.
(It has been tested, but there is no built in CI test yet that generates XML, and then applies the C++ code generator, but that may come later)
A few other things snuck in and are necessary since the new program depends on them. Apart from minor documentation etc, take note of these: