bbd00231 | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
server-bindings: convertForMessage utility
Some C++ types, such as enumerations, need some conversion before they can be added to a message. Provide a global utility which passes a C++ reference un
server-bindings: convertForMessage utility
Some C++ types, such as enumerations, need some conversion before they can be added to a message. Provide a global utility which passes a C++ reference unchanged, which can be used in all server-bindings.
Specific C++ types that need conversion will provide their own override of this in their own namespace/class. "Argument dependent lookup" rules will allow the override to be used where appropriate.
Change-Id: I0e9f64974ea12093c1b67f28847da4696fa85f61 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
2adcefa6 | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: fix enumeration property default values
Current generation emits for enumerations: Enum property = EnumValue Fix this to be: Enum property = Enum::EnumValue
Change-Id: Iae1e8e4ad73
sdbus++: fix enumeration property default values
Current generation emits for enumerations: Enum property = EnumValue Fix this to be: Enum property = Enum::EnumValue
Change-Id: Iae1e8e4ad73bf8623ed9f3b2d3ec57803c7f18bd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0aa0dded | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: convert binding enum types to valid C++
When an enumeration is used in the bindings, the type of it depends on the context. We use 'string' types to send the enumeration across the dbus, s
sdbus++: convert binding enum types to valid C++
When an enumeration is used in the bindings, the type of it depends on the context. We use 'string' types to send the enumeration across the dbus, so we need to use 'string' types when doing message operations. We use the real enum type when calling binding functions, so we need to specify that in prototypes.
Change-Id: I31ab137b0c751d8a2bdec1c417a60455690ce103 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
8c00fed2 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add enumeration parsing
Change-Id: I6d02574942b38adbe2dc537f5279721cde2c8bc7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
fa5c311b | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate markdown for errors
Change-Id: Iafdf4c30e312b0ef7faeea3e3a7379f1868a61dc Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
d2505cc1 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate markdown for enumerations
Change-Id: I8b62aea7094e6e8e12d39e1341ebd07fc547b12b Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
bd0b06b4 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: clean up extra error response
The property set/get and method callback functions are suppose to return 1 or true to sdbus, otherwise the callbacks are treated as unhandled. Since the gener
sdbus++: clean up extra error response
The property set/get and method callback functions are suppose to return 1 or true to sdbus, otherwise the callbacks are treated as unhandled. Since the generated callbacks all populate the response message correctly, the result is that the client receives two messages but the 2nd (an error) is silently ignored by clients because it is a duplicate message. Clean this up, which reduces needless activity on the dbus.
Change-Id: I39699e498b0d113ec9819670a92e44e8108c88db Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ea241447 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: enhance exception information
Use both 'name' and 'description' for exceptions. All sdbusplus exceptions now have a 'name()' and 'description()' method which give the dbus error name and a
sdbus++: enhance exception information
Use both 'name' and 'description' for exceptions. All sdbusplus exceptions now have a 'name()' and 'description()' method which give the dbus error name and a human-readable description respectively. The standard 'what' is now '<name>: <description>'.
Change-Id: Ic6cdb88350c07589cbfbf233e84a575632383af6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
4a5c3b30 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Prepend all errors with 'Error' namespace
Old: Error identifier: com.example.Interface.LogicError Exception class: com::example::Interface::common::LogicError
New: Error identi
sdbus++: Prepend all errors with 'Error' namespace
Old: Error identifier: com.example.Interface.LogicError Exception class: com::example::Interface::common::LogicError
New: Error identifier: com.example.Interface.Error.LogicError Exception class: com::example::Interface::Error::LogicError
Change-Id: I866046f4a0514f5bce40bdef46a218060d107765 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d0cd9667 | 14-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use consistent typenames for properties
Previously, the generated code was assuming C++ names, but the example (Calculator.interface.yaml) used an arbitrary name ('integer'). This commit d
sdbus++: use consistent typenames for properties
Previously, the generated code was assuming C++ names, but the example (Calculator.interface.yaml) used an arbitrary name ('integer'). This commit defines a consistent typename scheme and validates it when interfaces are generated.
Use English typenames from the DBus protocol in interface files rather than the C++ name or a single-letter DBus name. Use square-bracket ([]) to identify sub-types for containers.
Examples: 'int64', 'path', 'array[dict[string, byte]]'
Change-Id: I38abe84c9cd3d5f839968349d2d3cfa0b8796cd0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
31691cf1 | 13-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add exception handling to server bindings
Change-Id: Id313bb05c7cb910b7669046cffac668bf04af11d Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
1a28306d | 13-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
exception: define 'internal_exception' class
internal_exception will be used for sdbusplus-generated errors. These errors could be thrown by any sdbusplus call and therefore by any generated server
exception: define 'internal_exception' class
internal_exception will be used for sdbusplus-generated errors. These errors could be thrown by any sdbusplus call and therefore by any generated server binding. Define this class to differentiate between binding-defined errors and sdbusplus-defined errors.
Change-Id: I725729c8e874b638cde8ce72289b87ed807d27c1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
250654e8 | 11-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate error cpp
Change-Id: I63ea5ea07ab4efb0da21ee10de7fe9db429c1ffd Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
179ed9be | 11-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate error header
Change-Id: I6e1beb1da2b5c3c3ea612b9aa688ea037d6173e6 |
7d7fda56 | 11-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: parse error info yaml
Change-Id: I73361b6f9b48b32a206d1e6d3e52ff46195b3cbc Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
f4a6f41f | 11-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
exception: Create exception class
Change-Id: I576ac6fdbca5ca7d186040c36abac1f0a5dc73cb Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
7aa8a1e2 | 11-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Change namespace order
Rather than sdbusplus::server::<interface>::<interface_last> order for namespaces, use: sdbusplus::<interface>::server::<interface_last>
This avoids a name colli
sdbus++: Change namespace order
Rather than sdbusplus::server::<interface>::<interface_last> order for namespaces, use: sdbusplus::<interface>::server::<interface_last>
This avoids a name collision for two interfaces such as: - org.example.Object (class Object) - org.example.Object.Delete (namespace Object)
Change-Id: Iec5e2b61c0d5e34d0d8920abd51f469ec5cbd9a6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ccacc4af | 10-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
sdbus++: find templates in datadir
Change-Id: Ib6ffd1ad51774825fe7227fc8ce48447bfd5b1f8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
14275cfd | 10-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
Enable configure of just sdbus++
Change-Id: I9910ef3c8d632ea4ed71dbf49c48c0cd798441f7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
de32f577 | 10-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
Use canonical env
Workaround bitbake failing to handle /bin/env when it sanity checks for file runtime dependencies.
Change-Id: Ia967bf28cb3c2de812ad295265e728e0826e80ab Signed-off-by: Brad Bishop
Use canonical env
Workaround bitbake failing to handle /bin/env when it sanity checks for file runtime dependencies.
Change-Id: Ia967bf28cb3c2de812ad295265e728e0826e80ab Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
bba7f8c0 | 10-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
Install sdbus++
Change-Id: Ie6af7436fdf66bd123bd196d238eff47b3fb95b8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
33906871 | 10-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
Move templates
Enabling use of package_data in a setup.py.
Change-Id: Ic1423033c0607e1527b0eb31638605b53f0ccc83 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
cd977611 | 09-Nov-2016 |
Brad Bishop <bradleyb@us.ibm.com> |
Install message/types.hpp
Change-Id: I0073d42d1ccb56e7cd5997effb39769c2fea3fec Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
f101ee28 | 04-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
message: testcase to read missing variant type
Commit ac52113 fixed an issue where reading a variant from a message when the C++ variant did not contain the type of the dbus variant caused the messa
message: testcase to read missing variant type
Commit ac52113 fixed an issue where reading a variant from a message when the C++ variant did not contain the type of the dbus variant caused the message to get into an invalid state.
Add a testcase for this condition.
Change-Id: Iea58a4440d72a1d2969d80f782ec1f316cb5ff29 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
75538a7b | 04-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
build: fix out of tree builds
The test directory needs -I$(top_srcdir) in order to find the header files provided by the project itself. When doing an in-tree build, this is done automatically by a
build: fix out of tree builds
The test directory needs -I$(top_srcdir) in order to find the header files provided by the project itself. When doing an in-tree build, this is done automatically by automake due to 'config.h' being generated in the root.
Change-Id: I3ea13eda98a73122f370a70ecf1f8d2c66540346 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|