summaryrefslogtreecommitdiffstats
path: root/sdbusplus/message.hpp
diff options
context:
space:
mode:
authorJames Feist <james.feist@linux.intel.com>2018-04-05 15:28:16 -0700
committerJames Feist <james.feist@linux.intel.com>2018-06-27 20:01:34 +0000
commit284a0f98a066df3d7e529dd789f3bc95befd0cb9 (patch)
tree9b78952650f6fc73ae1af406d5e93bb23935fa93 /sdbusplus/message.hpp
parent4869781566d808d14d8422ad3749371d3cb40e25 (diff)
downloadsdbusplus-284a0f98a066df3d7e529dd789f3bc95befd0cb9.tar.gz
sdbusplus-284a0f98a066df3d7e529dd789f3bc95befd0cb9.zip
Add boost asio async connection
Add an async connection and example of usage. This connection inherits the bus object and allows async method calls using boost asio. Most of these concepts are from boost-dbus. Change-Id: I33b5349d543c9ff4b6ee1ce15346c709c052e1ae Tested: Compiled and ran asio-example on bmc. Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'sdbusplus/message.hpp')
-rw-r--r--sdbusplus/message.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/sdbusplus/message.hpp b/sdbusplus/message.hpp
index 6b58099..d6b5aa7 100644
--- a/sdbusplus/message.hpp
+++ b/sdbusplus/message.hpp
@@ -193,6 +193,15 @@ class message
return _intf->sd_bus_message_is_method_error(_msg.get(), nullptr);
}
+ /** @brief Get the errno from the message.
+ *
+ * @return The errno of the message.
+ */
+ int get_errno()
+ {
+ return sd_bus_message_get_errno(_msg.get());
+ }
+
/** @brief Get the transaction cookie of a message.
*
* @return The transaction cookie of a message.
@@ -254,12 +263,13 @@ class message
friend struct sdbusplus::bus::bus;
- private:
/** @brief Get a pointer to the owned 'msgp_t'. */
msgp_t get()
{
return _msg.get();
}
+
+ private:
sdbusplus::SdBusInterface* _intf;
details::msg _msg;
};
OpenPOWER on IntegriCloud