| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
Currently if a property named 'name' is added, it collides
with the parameter name. Rename the parameter to _name so
this won't happen.
Tested: Added a property named name to interface and
bitbake phosphor-dbus-interfaces
Change-Id: Iee685612276e1bf2515bcb32c41e21487f344471
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.
Change-Id: I6dcf76a74487d04d4568d55d08d1b07f627e5e74
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes sdbusplus compatible with most containers that meet
a few requirements. This includes:
std::unordered_map
std::array
std::set
boost::flat_set
boost::flat_map
Read requires a container to support emplace or emplace_back methods.
Append requires a container to suport a const iterator
Tested: The top level OpenBMC compiles properly, and the sdbusplus
unit tests compile and pass, and unit tests have been updated with a
few new types to ensure we see any breakages.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I5eb1cf7dc07bacc7aca62d87844794223ad4de80
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Change IndentWrappedFunctionNames to true in the .clang-format
file to indent function definitions that don't fit in a
single line.
Change-Id: Icbd9284b6b5cfc97f094fbf3434b255aabfd0109
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Do not return a reference from type_id_single. This causes
odr use of tuple_type_id which results in link failures.
Change-Id: I67fbefe7dca21666b551199dc62f4348aa8dc12d
Tested: Successfully built an application under gcc 6.3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: If1d6b1f04514367cc544c2507a845b3e9d6d3435
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
| |
Change-Id: I1f19ff55a04d44e0fcc1773fb0984067be1edf55
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
The nameOwnerChanged(const std::string& s) returns a match string for
the NameOwnerChanged signal of the given service name 's'.
Change-Id: I81162b2da67a336dd7b59d9e643a4c66004c6725
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I5a69ad0e55e3907d3764d0398738902f167b976f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Since the --disable-libsdbusplus doesn't build the libsdbusplus
archive, we cannot link against it in example or test directories.
Disable those sub-directories if libsdbusplus is disabled.
Change-Id: I5a1441042d5b05f7bad9d840fea154270782bcbd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following problems existed:
* The sdbus++ output directory would not exist so invoke mkdir.
* The directory for the example schema is not in . but in $(srcdir),
so use -r directive to sdbus++ to set schema root accordingly.
* The mako template files generated into the build tree, so pass
sdbus++ the template path relative to $(top_builddir).
Change-Id: I76f70ed832c7cf0ce2a7b8a8ec21672ebcea9c02
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#477.
Change-Id: I07392ae4712206753399b58650e4658ef769e558
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
| |
Create a small application which calls org.freedesktop.login1
to display a list of the active users.
Change-Id: I8d7879d98f6b89a9315aa0c71b928c50490dfedb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
With example moved to the root directory and there being an explicit
makefile for the example calculator application, there is no need to
have sdbus++ default to 'example'.
Change-Id: I2a20883d7ea88b56e1bd073ef395c236215a4132
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ie2ad4ff00208056c48c0d596053b20b82f1fb3a1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Icb6a6ca266181e9b401eec64dbbada8b7e334229
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
Add interfaces removed.
Add properties changed.
Add versions of above that take a path argument.
Change-Id: I918365a25ca9a9b30c5087de08b4c90e2f15eca3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I884ed42a53e30c9209b45e74f6317ec19bb344b4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I1849d54ca395e4cbaccb726118ec35bd0ec0c3ef
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
| |
At the moment only signal arguments are accessible in signal
messages. Key information such as the path of the object emitting
the signal are in the message headers, so provide access to those
as well.
Change-Id: I25bc18c21cd4c3d66cad4cf38235469d5092d364
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: Ifb6527c5bc686f65fea28679bc653f0509de4aec
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I47a8c6044f7275994b124e90984cbd8dbef0f0ed
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
| |
The original match constructor only allowed
sd_bus_message_handler_t functions, which does not allow for
sdbusplus::message::message's to be passed in. Add a
constructor that allows functions of the following type:
void(*)(sdbusplus::message::message&)
Change-Id: Idc006250777c5cc1a5fe48fc411da24339ca165e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than manipulate LDFLAGS directly, the correct
way to pass additional linked-to libraries is via
the LDADD and LIBADD variables for executables and
libraries respectively. Convert all cases of -lfoo
to LDADD/LIBADD.
Change-Id: Id5fb8539b3fa875430f297de37ad0f3e4ecc3726
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ia45c659a6d88e8a688bcdc92a084a8edc7455ba8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I8aa9e996505d3083ff5650c3fa5107d4143ff482
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ifb5d2b9f4cb5c6700f5c0164466cc5289ee40a26
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ie110fba8f1961ba0e1a46c670d98a2351a46d061
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ic54957df1c8d08c5461b262628fd1cc5c27217d7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I94467376e89cc813e270cbbe27b83c4415bb9d85
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
match directly works on the bus and may be used by servers
as well as clients, so sdbusplus::bus seems better suited.
Change-Id: If34ad209e83de58365bb64812d19d0bb92a2a1f0
Signed-off-by: Christian Andersen <c.andersen@kostal.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wrappers for sd_bus_emit_object_added/remove already
exist but these are not appropriate when adding a
new interface to an already existing object, or removing
an interface from an object yet other interfaces still
remain.
Change-Id: I89407bd56feb7d736e7225ee27a36eaf8bda169f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
The InvalidEnumString has a DBus identifier as org instead of
xyz. Since our domain name is openbmc-project.xyz, this
should be xyz.openbmc_project.
Change-Id: I6d2a83d3ba8c5d39c6176aa6a12aae607eb08a8c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the bus object had no semantics to recognize if
it was the primary-holder of a sd_bus or a secondary one.
On destruction, the object always called 'sd_bus_unref' and it
was assumed that the sd-bus library would properly close the
bus on last-unref. This turns out not to be true and lead to
file-descriptor leaks.
Change the constructor to mimic what is done in 'message':
- When the constructor is called with a sd_bus*, the class becomes
a secondary-holder and calls 'sd_bus_unref' on destruction, which
is the old behavior. The class also calls 'sd_bus_ref' on
construction, so this should no longer be done by callers.
- When the constructor is called via the new_* functions (or by
adding a std::false_type parameter), the class becomes a primary-
holder and calls 'sd_bus_flush_close_unref' on destruction.
Note: Current callers that use syntax like 'bus(sd_bus_ref(b))' will
need to be updated to avoid a file-descriptor leak.
Fixes openbmc/openbmc#1432.
Change-Id: Ic0c582f8fbfd44775bcdaffa6a21518a0cd056b1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ic5020eddb48d22041a51a39bae2090f379aeaeb6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The python setup script looks for the needed mako templates in
source directory (srcdir). But if the sdbusplus repository is
built through bitbake, the mako templates that are auto-generated
are created in the build directory (builddir).
Copy all the needed files to the builddir, specify update=1
to preserve any built file from being overwritten.
This allows for support of out of tree builds.
Change-Id: Icb6090df5ea083b4b5f1bc1c5b320d40f57596e0
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I83d51e9aaa165e646ce711cc8bc551f010edc448
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
| |
Allow the transaction id support to be enabled via
configure options.
In the code, ifdef the code based if transaction support
is desired.
Change-Id: I98695268397f437b6fe14621f820fbcaecb45b7a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The server bindings for transactions use the bus unique_name
to create a transaction ID. If the bus object is not in RUNNING
state, the unique_name call causes, deep in sd-bus, a call
into sd_bus_process to get the bus up and running since the unique_name
is assigned by the dbus-daemon.
When DBus objects are created there is a call to generate a signal
for object/interface creation. In sd-bus this creates a message and
calls back into the server bindings to read all of the properties of
the interface. When the transaction ID is assigned, calling
unique_name, this causes a recursive entry into sd_bus_process which
asserts.
The ideal solution would be to catch all C++ objects that might result
in a recursive call like this and call unique_name before. This would
currently be on slot, server/match, and server/interface and may be
others in the future. Instead, I took a simple approach, which is
to get the unique_name immediately after instantiating any bus-object.
Fixes openbmc/openbmc#1072.
Change-Id: I024fd2f46fd08c85317e102dfced88a11e18f9de
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
| |
Add cases uncovered by openbmc/openbmc#1025.
Change-Id: I680b95b2127d50837dccd3ea1ff655fc1eb19ec9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a call to message::append resulted in the templates generating
a call to sd_bus_message_append_basic, all flavors of char* were
being passed to sd_bus as char**.
Fix by adding type-templates to distinguish between T and T* for
the parameters to sd_bus_message_append_basic.
Fixes openbmc/openbmc#1025.
Change-Id: I2f3a204ae10803c677d1c3aecfa4d9eabc40b593
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
| |
Use an autoconf archive macro for pkg config so autoconf can fill
out Requires.private in sdbusplus.pc.in.
Change-Id: I62fd658b813ecde437756aefcee91ba42a3a94b2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I5031f82b4ae702d17f22a88aad56733e2a662b21
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
With these interfaces user can attach a sd-event event loop object
with sdbusplus::bus::bus.
Change-Id: I09dcc54e532162ae5e53d446772ab5bddaa4a0a4
Signed-off-by: Yi Li <adamliyi@msn.com>
|
|
|
|
|
|
|
|
|
| |
Add a method to the server bindings that gets properties
by looking up the name from a string.
Change-Id: I304504ba20d6747afba27cd08f79bcc564c34a46
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a constructor that takes a map of property-names to
values and initializes all properties in the map with those
values.
Change-Id: Id0eaa2ec43aed490719d12537e75c1278d290013
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Add a method to the server bindings that sets properties
by looking up the name from a string.
Change-Id: I7e9081b66dfeffd394155a574c2178a7cd039e2a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: Id3fc546c7fabe34bc31c4030d2e196f6d7f39090
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Function to get the dbus bus from a dbus message.
Forward declare it and implement it in bus.hpp so
that the return type is sdbusplus::bus::bus.
Change-Id: Ice55c8ce484ae1b575e762cc0d9e2826b4ba6504
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This scenario applies for clients that want to create an error log
and have not made a dbus call yet.
Change-Id: I2702fc01bd66deba2606fad92314eeed8c277277
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|