summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* method: render as markdownPatrick Williams2016-10-133-0/+28
| | | | | Change-Id: Ie0344d632169ed779fd925d52e90299d586a0c35 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* property: render as markdownPatrick Williams2016-10-133-0/+16
| | | | | Change-Id: I2b01534e553f9d683a3866f6400708201b7805f9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* sdbus++: Utility for rendering interface YAMLPatrick Williams2016-10-131-0/+34
| | | | | Change-Id: I0ceeaba9280ef9a05c03edb2a72a15ba8591b0be Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* interface: render as markdown documentPatrick Williams2016-10-122-0/+7
| | | | | Change-Id: I885f08dd97f751220e37ea91eeab223298c81b69 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* signal: parse YAML contentPatrick Williams2016-10-122-0/+12
| | | | | Change-Id: I5e74bbdbe83bb28978b64309936e21c58f98eb6e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* method: parse YAML contentPatrick Williams2016-10-122-0/+15
| | | | | Change-Id: Icf80254fe5f8271c0e32cd7e49c910080b7451c3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* property: parse YAML contentPatrick Williams2016-10-122-0/+12
| | | | | Change-Id: I26d837ceb9dce34f822db975cca7fc3405699436 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* interface: Parse YAML contentPatrick Williams2016-10-123-0/+24
| | | | | Change-Id: I3f10b927b55e6b1f72875a18589ac3adf92e6cb0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Example interface YAML filePatrick Williams2016-10-111-0/+62
| | | | | | | | | | We are defining a YAML file format for dbus interfaces, from which we will generate documentation and client/server bindings for the sdbus++ library. This is a proposed example definition for the net.poettering.Calculator interface. Change-Id: Ib7ff063eb00e9fd801d945eaa146801ebd6fdeb0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add vtable supportPatrick Williams2016-09-273-0/+268
| | | | | | | | | The sd-bus interfaces for creating a VTABLE require C-only syntax, which prevents them from being used in C++ code. Create constexpr wrappers that emit VTABLE entries so that a VTABLE can be created in C++ code. Change-Id: I22892de1e87448ab9dce48034c9f030bc5bab9af Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message::types: minor comment fixupPatrick Williams2016-09-121-1/+1
| | | | | Change-Id: I4b2b62c8879b6e3832252fde0918e6a5bb67d078 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* variant support for append/readPatrick Williams2016-09-125-0/+215
| | | | | Change-Id: I682275405e3c4f7c798317a60ea070b3b1a0846c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Import mapbox::variant in lieu of c++17 variantPatrick Williams2016-09-125-0/+1144
| | | | | | | See http://github.com/mapbox/variant. Change-Id: Idbb2af80f0478188b652858d08817a5450630f0f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* std::tuple support for append/readPatrick Williams2016-09-125-0/+127
| | | | | Change-Id: If914032fa4f655af509ac58a5e0057968f71aa32 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* std::map support for append/readPatrick Williams2016-09-125-0/+202
| | | | | Change-Id: I3b5510b8ba400cf4d3f936f01708cb17aa009e62 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* types: Use SD_BUS_TYPE_* instead of char-constsPatrick Williams2016-09-121-13/+14
| | | | | Change-Id: Ic05416de718c5e73a381d1382623d71cdaf31958 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* std::vector support for append/readPatrick Williams2016-09-125-18/+136
| | | | | Change-Id: I1820ee2213feb37fab10a491b1099032fd48c18d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add message read functionalityPatrick Williams2016-09-123-0/+517
| | | | | | | C++ bindings for sd_bus_message_read* functions. Similar compile-time type deduction as the message::append interfaces. Change-Id: I88639bedb9703266f7282642ce261c28b736adfc
* bus::process: use message::messagePatrick Williams2016-09-122-2/+2
| | | | | Change-Id: I00f913695d0db75a07d1b0520f507ee7dc469129 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add verification to append testcasesPatrick Williams2016-09-121-1/+86
| | | | | Change-Id: Ida08a84e5a7844ed1afd80d3319d2dfc8b77c5e1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Migrate bus to message bindingsPatrick Williams2016-09-122-23/+24
| | | | | Change-Id: I29a03b146d5c050a13b4bab690d450612797f2ce Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add message bindingsPatrick Williams2016-09-121-0/+85
| | | | | | | | | | Add C++ bindings for the sd_bus_message_* class functions. This binding creates a unique_ptr wrapper around sd_bus_message*, using the appropriate sd_bus_message deref calls when the unique_ptr leaves scope. Change-Id: Ieb8b981a43406332ed3b65bc5326a0f18671d496 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add bus bindingsPatrick Williams2016-09-122-29/+188
| | | | | | | | | Add C++ bindings for the sd_bus_(bus) class interfaces. This binding creates a unique_ptr wrapper around sd_bus*, using the appropriate sd_bus deref calls when the unique_ptr leaves scope. Change-Id: I0bb3842e384217ac5606bb3bf350d7fc3babf1ad Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add message append functionalityPatrick Williams2016-09-082-0/+400
| | | | | | | | | | | | | | | | | | | Adds C++ binding to sd_bus_message_append* class functions. Uses type deduction to identify all of the parameters passed to the append function and, at compile-time, creates the appropriate dbus type string. Example: sdbusplus::message::append(m, "asdf"s); Is equal to: sd_bus_message_append_basic(m, 's', ("asdf"s).c_str()); Rather than use a naive sequence of ..._append_basic calls, the implementation will attempt to group multiple basic types into a single sd_bus_message_append call. Change-Id: I1341a0299573c61588fe225c07174b743cb3a282 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Simplify mangled names for type_id_downcast_t.Patrick Williams2016-09-021-5/+7
| | | | | | | | | | | | | | | Since type_id_downcast_t was a type-alias, the full template set was placed into the mangled name for any function using it. Create a type_id_downcast structure to simplify the name mangling. This reduces a managled name like: enable_if<is_same<array_to_ptr_t<char, remove_cv< remove_reference< char[10]>>>, char*> To: enable_if<is_same<type_id_downcast<char[10]>, char*>> Change-Id: Idd169ce51082420fb4b6df40a8cd0bc5d874acd4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add type_id templatesPatrick Williams2016-09-022-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | C++ templates to assist in type conversions between C++ types and dbus types. These templates provide a compile-time conversion between built-in types and a C-string of dbus types. Example: uint32_t a = 0; const char* b = "a string"; auto t = sdbusplus::message::types::type_id(a, b); This results in a tuple equal to std::make_tuple('u','s', '\0')', which can be converted to a C-string("us") by tuple_to_array. In a subsequent commit this interface will be used to do a compile-time transformation from something like: msg->append(a, b) To: sd_bus_message_append(msg, "us", a, b); The type_id template can be extended to support tuples, STL containers, and user-defined types as needed. Change-Id: I913501b51ffc24bcf4219f4297a1e0f8ebed97b5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add tuple_to_array templatePatrick Williams2016-07-262-0/+73
| | | | | | | C++ template to convert tuple<T...> to array<T, N>. Change-Id: Ia9dff382f9c57d7608edaec281cf7d867aeed4b2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add array_to_ptr templatePatrick Williams2016-07-262-0/+51
| | | | | | | C++ template to convert T[] type to T* type. Change-Id: I91c63b5d14b77f82d3deea3772990912dfcd4277 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Initial commitPatrick Williams2016-07-201-0/+201
OpenPOWER on IntegriCloud