summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* sdbus++: Change namespace orderPatrick Williams2016-11-172-7/+8
| | | | | | | | | | | | | 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>
* sdbus++: find templates in datadirBrad Bishop2016-11-161-1/+3
| | | | | Change-Id: Ib6ffd1ad51774825fe7227fc8ce48447bfd5b1f8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Enable configure of just sdbus++Brad Bishop2016-11-163-4/+19
| | | | | Change-Id: I9910ef3c8d632ea4ed71dbf49c48c0cd798441f7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use canonical envBrad Bishop2016-11-161-1/+1
| | | | | | | | 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>
* Install sdbus++Brad Bishop2016-11-104-2/+45
| | | | | Change-Id: Ie6af7436fdf66bd123bd196d238eff47b3fb95b8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Move templatesBrad Bishop2016-11-109-2/+3
| | | | | | | Enabling use of package_data in a setup.py. Change-Id: Ic1423033c0607e1527b0eb31638605b53f0ccc83 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Install message/types.hppBrad Bishop2016-11-091-0/+1
| | | | | Change-Id: I0073d42d1ccb56e7cd5997effb39769c2fea3fec Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* message: testcase to read missing variant typePatrick Williams2016-11-041-0/+26
| | | | | | | | | | | 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>
* build: fix out of tree buildsPatrick Williams2016-11-041-0/+1
| | | | | | | | | | 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>
* message: fix parallel test issuePatrick Williams2016-11-042-2/+2
| | | | | | | | | Both message/append and message/read were using the same service name for testcases. Ensure they use different service names to allow parallel execution of test cases. Change-Id: I060c03f69db0484b863af7cb45578f183cdff331 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* build: run testcases via autotoolsPatrick Williams2016-11-043-2/+33
| | | | | Change-Id: Ie2aec28bac16388cef39558746dfe6ce8cba199e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message: compile warning in testcasesPatrick Williams2016-11-042-0/+4
| | | | | | | Thread functions (non-void) were missing a return. Change-Id: Ib7804d92f79b96428285058101e64dceea7ad66e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* build: autotools-based install of headersPatrick Williams2016-11-043-0/+84
| | | | | Change-Id: Ie54f22002bc4fb382770c8cab606642f6072ffae Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Skip variant for unknown typesBrad Bishop2016-11-041-0/+1
| | | | | | | | | | | Reading a single variant didn't skip over the message data when encountering a type that doesn't exist in the template parameter list. Subseqeuent reads then point at the wrong data. Add a call to sdbus_message_skip in this case. Change-Id: Ia89baced1530698070f7ca4e47ba16f36c2fcafa Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* sdbus++: fix PEP8 style errorsPatrick Williams2016-10-216-24/+30
| | | | | Change-Id: I51ce57d22c86ac80322559fa1c03cb26df8eb278 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* match: add optional context parameterPatrick Williams2016-10-201-2/+4
| | | | Change-Id: I5992ea1dffd2a9faf8fed45aea3d0b12c36add8d
* match: add signal callback registererPatrick Williams2016-10-203-0/+59
| | | | | Change-Id: I833e32360391cef8acbb8268e239fbc047173835 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* interface: enable property-changed signalsPatrick Williams2016-10-202-3/+21
| | | | | Change-Id: I5a46fe2d948ddc6c1b86dd6f898b814767802054 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* object: allow deferred creation signalPatrick Williams2016-10-201-4/+24
| | | | | Change-Id: I4da3e502c667fbcd3c46749f8e0d61744beee055 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: interface namespaces closed backwardPatrick Williams2016-10-202-2/+2
| | | | | | | | | | | In the generated interface files, the closing brackets for the namespaces were commented backwards. com.example generated: } // namespace com } // namespace example Change-Id: I57a9d3b3ba30c2a90f243ba447c7295da258bd58 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: generate server bindings for propertiesPatrick Williams2016-10-202-0/+87
| | | | | Change-Id: Iabfefd94d1a261355d547c8c1cfbcf27cce825b7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: add process_discard method for server operationPatrick Williams2016-10-201-0/+7
| | | | | | | | | | | | | | | A server process will generally set up a number of sd-bus managed objects and enter a while-loop. All further interactions are expected to take place via the registered callbacks. Provide an alternative 'process' method on the bus to indicate to sd-bus that the process does not intend to handle any "escaping" messages. This allows sd-bus to immediately error to the client rather than the server discarding the message and the client timing out. Change-Id: I3bf793e9f3d4f8d330758ebd282bbf28350bf338 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: generate signal broadcast bindingsPatrick Williams2016-10-204-0/+92
| | | | | Change-Id: If1b04fedc95614c95a23768f95801e2bb9b4c0e9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* interface: add signal supportPatrick Williams2016-10-202-3/+25
| | | | | Change-Id: Ice572b6794e7cb2426a2e86b7bb92ca3d0ac7ae1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message: add signal interfacesPatrick Williams2016-10-202-0/+26
| | | | Change-Id: Ida59e91564fbc452431ff54cfd7de59d7903e7b1
* message: write testcase to confirm bool and doublePatrick Williams2016-10-202-0/+50
| | | | | Change-Id: I631046f3e6d46c299f5907ad811656be3d66ea60 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* server: minor refactoringPatrick Williams2016-10-207-7/+18
| | | | | | | | | | Move files into a server subdirectory to correspond to the 'server' namespace and create a 'server.hpp' as method to gain includes needed by any server instance. Create a few type aliases to reduce namespace levels. Change-Id: I8f8ea8e57177393faa007351a540d08873d36632 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* object: add binding for 'sd_bus_emit_object_added/removedPatrick Williams2016-10-202-0/+117
| | | | | Change-Id: I450715fb47c975737f9326c3c945da762c53accb Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: fix method_returnPatrick Williams2016-10-203-29/+8
| | | | | | | | | | method_return was using sd_bus_call instead of sd_bus_send. Fix to use sd_bus_send and move into 'message' directly since the previous arguments for having it a static method in bus is no longer valid. Change-Id: Ib74508e87f7e8be030db02b91368da7639cb28f3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: generate vtable for server bindingsPatrick Williams2016-10-202-1/+46
| | | | | Change-Id: I605a5f5db4fb2d395acab533305c7d52638fe4ce Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* vtable: avoid ambiguity in methodPatrick Williams2016-10-201-7/+9
| | | | | | | | | | When flags are passed to the method interface there is ambiguity between the method with flag and the method with offset. Rename method with offset to method_o, which matches the pattern of other vtable interfaces. Change-Id: I9c2c501ffcf391b839c4e604025ca22d6c9acdbe Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: hook interface into server bindingsPatrick Williams2016-10-202-0/+33
| | | | | | | | | | sdbusplus::server::interface class is used to register an interface on the dbus. Utilize this in the generated server bindings by containing an instance of 'interface' and creating a proper constructor. Change-Id: I068bbe1c370a55053193b89931fb8f7da740de52 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* manager: add binding for sd_bus_add_object_managerPatrick Williams2016-10-202-0/+60
| | | | | Change-Id: I9548b7fd7ce12beab10283b29a05ea31a335b03f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* interface: add binding for sd_bus_add_object_vtablePatrick Williams2016-10-202-0/+83
| | | | | Change-Id: I27ca62e107204ed8bf0b295cc22ddd56ca380568 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* slot: add binding class for sd_bus_slotPatrick Williams2016-10-201-0/+69
| | | | | Change-Id: Ib092ec3fd22be1d2a9755457235aba81acb606a1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: work around unicode support in python2Patrick Williams2016-10-201-1/+6
| | | | | | | | | unicode strings in python2 do not have certain functions, such as 'rstrip'. Send an option to Mako for python2 to ensure unicode support is disabled. Change-Id: Ia85581b5a091eec10e9999f30425a40e02de2ffc Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: generate callback methods for server bindingsPatrick Williams2016-10-204-1/+77
| | | | | | | | | | | Create sd-bus message handler methods as callbacks for object method calls. These generated callbacks will extract the parameters from the message, call the virtual-method implementation, and pack the response into a method-return message, which is sent back to the caller. Change-Id: Ia3872bbbbfdb57375a1ffdde7e64296271cdd532 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: change destructor to just 'unref'Patrick Williams2016-10-201-1/+1
| | | | | | | | | | | Previously the bus destructor called sdbus_flush_close_unref. This is inappropriate because bus objects can be created through a duplicated reference, for example, using sd_bus_message_get_bus(). Therefore, there is no certainty that there is only 1 reference to the same underlying sd_bus_t, which makes the flush/close incorrect. Change-Id: I2d3aac2f79f47ecb881a8f4bfb7bddb5686ae740 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: 'method_return' for responding to method-callsPatrick Williams2016-10-201-0/+27
| | | | | Change-Id: Id959e500f3cba7f6e3b28c572ead95879bce6275 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message: new_method_return for method-call repliesPatrick Williams2016-10-201-0/+12
| | | | | Change-Id: I1c9a1960f4f0cc904ca1534a33e4e433ed8e1649 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: use style-correct names for C++ methodsPatrick Williams2016-10-202-5/+21
| | | | | | | | | | Add attribute conversions for 'name' to support camelCase, CamelCase and snake_case naming styles. This is done using the 'inflection' library. Convert server-header templates to use these as appropriate. Change-Id: I4cecaa0fc96de9b9156e9102ccb9bf0682c8a732 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: generate header for server bindingsPatrick Williams2016-10-165-1/+103
| | | | | | | | | | | | | | | | | Add a 'server-header' command to sdbus++ that generates a class definition for the server bindings. This class defines static functions for registering as sd-bus callbacks and virtual C++ functions to implement the method behavior. It is expected that a server implementation will create a class, which inherits from this generated class, and implement all of the method behaviors. Instances of the class will then register on construction with sd-bus. Signals and properties are not yet supported. Change-Id: If0ec37b2acb6f8d528358004ec91dbe979644df7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: renderer post-processing lambdaPatrick Williams2016-10-162-2/+5
| | | | | | | | | Some of the calls to render were required to be prefixed with, for example, 'str.strip' calls to remove extra newlines. Add an optional parameter to the renderer for post-processing of the rendered content. Change-Id: Ibddbdf3a9b586df30cc55c76b39a8c8784fdaf18 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: Refactor markdown into generic rendererPatrick Williams2016-10-165-12/+19
| | | | | Change-Id: If5b1270511d9d6bfb0c9430a71d45126257793a9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: remove duplicate inheritencePatrick Williams2016-10-162-2/+2
| | | | | Change-Id: Ibdd651824df8b472308cf9ecc00b1bd1fc65f7d6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: missing dictionary lookup for process funcPatrick Williams2016-10-161-1/+1
| | | | | Change-Id: Ib26352d4323f55ff418e446c76994ed212819f70 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: use infinity for default timeoutBrad Bishop2016-10-141-1/+2
| | | | | | | | A value of zero meant don't block at all. Change-Id: Id148a63e9f212ba67ec04d50ff27e92d15689369 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: inline gettersBrad Bishop2016-10-141-3/+3
| | | | | | | To avoid multiple definitions in client applications. Change-Id: I94a25217d10ffcdc04b1ef86c20863d15620875a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add .gitignorePatrick Williams2016-10-131-0/+4
| | | | | Change-Id: Ib651fd8da3d4f6bf8ee0efe0267971705dd4ec43 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* signal: render as markdownPatrick Williams2016-10-133-0/+25
| | | | | Change-Id: Ibd5da3a0558b6ddbad3d0b64ee692746dc2ced32 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
OpenPOWER on IntegriCloud