History log of /openbmc/sdbusplus/include/ (Results 151 – 175 of 269)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
10010b1928-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

async: add client-object proxy

Add a class which acts as a client-side proxy to a object. The
proxy holds the object address (service, path, interface) and
creates Senders for standard dbus operati

async: add client-object proxy

Add a class which acts as a client-side proxy to a object. The
proxy holds the object address (service, path, interface) and
creates Senders for standard dbus operations: method-call,
get-property, set-property, get-all-properties. These Senders
can also be used in co-routine contexts (via co_await).

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4b2e50a8b55d10975984ac4244bb075db8746fbf

show more ...

7418766726-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

async: add context support

In order to handle async operations, we need some kind of
'run-loop' around the sd_bus_wait/sd_bus_process process.
Define a 'context' to hold the bus and manage the run-l

async: add context support

In order to handle async operations, we need some kind of
'run-loop' around the sd_bus_wait/sd_bus_process process.
Define a 'context' to hold the bus and manage the run-loop.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I16099dd2e15809776827dd85327d950af3f8f5b2

show more ...

2f58b79126-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

async: add coroutine task support

Add sdbusplus::async::task<...> template which works with the
std::executors proposal (P2300) and test-cases.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
C

async: add coroutine task support

Add sdbusplus::async::task<...> template which works with the
std::executors proposal (P2300) and test-cases.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie63791daeab90ae1cc3862bb30878531b1775fa7

show more ...

5b5d15b323-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

std::execution: import from p2300 prototype

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I47725915b544af2b71ce0f423f70f453f8bcbc39

1778b12b13-Sep-2021 Ed Tanous <edtanous@google.com>

Allow clients to disable coroutine support

This commit allows clients to opt out of the boost coroutines in
asio::connection. This was added later after the initial development of
the asio bindings

Allow clients to disable coroutine support

This commit allows clients to opt out of the boost coroutines in
asio::connection. This was added later after the initial development of
the asio bindings, and imposes unfortunate handler requirements upon
clients, namely, that boost coroutines will not compile when exceptions
have been disabled via -fno-exceptions. For clients wishing to disable
exceptions, this is unfortunate, and prevents binary size optimizations
like:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841

Therefore, this patchset allows clients to define
SDBUSPLUS_DISABLE_BOOST_COROUTINES which prevents
sdbusplus::asio::connection from pulling in boost/asio/spawn.hpp, and
disallows the use of yield_method_call (which requires a yield context).

Tested:
Compiled with
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841 and observed
a good build. See the aforementioned patchset for why this is useful,
but TL;DR, it reduced the binary size of bmcweb by ~30% for no lost
user-facing functionality.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5339c3ff288b333fb0466fb2e6ac00f5b65964b4

show more ...

41f42f6b30-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I19356ecda2940a32661f54c0b54c74acc891f9c4

6a38ed5e04-Oct-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

asio/object_server: Use nullptr

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ia38e1b7509c65fe065e1bbd1fa5f04da6355ed46

26b3ff9c04-Oct-2022 Brad Bishop <bbishop1@lenovo.com>

Fix instances of extra-semi

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I233bd736375e8fce3646232dd6d101989d941f4d

1a25a10d29-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update whitespace penalty

clang-format-15 seems to end up with a slightly different whitespace
break than clang-format-14 did. Tweak the PenaltyBreakAssignment
to favor not breaking a

clang-format: update whitespace penalty

clang-format-15 seems to end up with a slightly different whitespace
break than clang-format-14 did. Tweak the PenaltyBreakAssignment
to favor not breaking as often, which allows the two to be more
consistent.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I49826e2011bce317b6b82dc985ddd35fa6eef2cb

show more ...

5a6c790229-Sep-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

asio: fix instances of unused-exception-parameter

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ibbcea5805e4916820f797988b9b95a92e6fe2823

0eda6ebf29-Sep-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

Fix inconsistent-missing-destructor-override

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I1fcfcaf4b41319d7a0b11fb937df06bec41d7620

e8c7614c29-Sep-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

bus.hpp: fix missing-noreturn

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I734ec4f690c5a162e55ab1b69ac6b6139d942781

d86b2a0a29-Sep-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

Fix instances of zero-as-null-pointer-constant

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I87e5e39202520bd7b6066fc6444362f32659049f

37d48a0a21-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

match: more string_view improvements

- It has been suggested that `string_view` is better than `const
string_view&`[1]. Switch all calls to that type.

- In some cases the optimizations usi

match: more string_view improvements

- It has been suggested that `string_view` is better than `const
string_view&`[1]. Switch all calls to that type.

- In some cases the optimizations using string_view allowed
non-zstrings to be passed to sdbus calls without compiler warning.
Revert back to sacrificing the slight performance of constructing
the string for safety.

[1]: https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I21a542fc9264b0f998e1c234064b6e6414327b82

show more ...

4fbda94601-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

match: constexpr, noexcept, string_view-ify

Optimize the bus::match interfaces:

Add constexpr and noexcept markers on all functions which can be
done so, which potentially makes the resulti

match: constexpr, noexcept, string_view-ify

Optimize the bus::match interfaces:

Add constexpr and noexcept markers on all functions which can be
done so, which potentially makes the resulting binaries smaller.

Switch parameters and return values to string_view whenever
possible, which also makes resulting binaries smaller.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0a863b8a16349123d42011e08ab0d0464ea11548

show more ...

69e2b29819-Sep-2022 Ed Tanous <edtanous@google.com>

Combine owned strings

There are two lists in object_server for storing strings that need their
lifetime extended for both methods and signal names. Neither list is
used independently, and exists en

Combine owned strings

There are two lists in object_server for storing strings that need their
lifetime extended for both methods and signal names. Neither list is
used independently, and exists entirely just to store strings to give
the vtables something to point to, so there's no sense in keeping two
lists.

As some point, these could arguably become static sets, so that strings
memory footprints are deduplicated between interfaces in the same
daemon, but that is a more invasive change.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie676a4ffb524387abf12a0ed20f50d109c85bc58

show more ...

4ecc47b919-Sep-2022 Ed Tanous <edtanous@google.com>

Use built-in sd-bus methods for member name check

sd-bus has built-in methods for verifying member names that do a better
job checking than the method that was created here. Use them.

Signed-off-b

Use built-in sd-bus methods for member name check

sd-bus has built-in methods for verifying member names that do a better
job checking than the method that was created here. Use them.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5b5389abf7f3033f3f4de344118bf9049d81be66

show more ...

1d319d9719-Sep-2022 Ed Tanous <edtanous@google.com>

Use optional instead of unique_ptr

In this context, unique_ptr<interface_t> was used to keep a
to-b-initialized-later member variable. In modern c++, std::optional is
a better fit for this, and a d

Use optional instead of unique_ptr

In this context, unique_ptr<interface_t> was used to keep a
to-b-initialized-later member variable. In modern c++, std::optional is
a better fit for this, and a drop in replacement.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I4cfb53e13b6ffa73a48940b56db46de64dbd0bb2

show more ...

09b06c4e19-Sep-2022 Ed Tanous <edtanous@google.com>

Store concrete manager

manager_t is movable, concrete RAII object; Inside object_manager,
there is no reason it needs to be stored by unique_ptr. Move to storing
the manager by value instead of by

Store concrete manager

manager_t is movable, concrete RAII object; Inside object_manager,
there is no reason it needs to be stored by unique_ptr. Move to storing
the manager by value instead of by pointer.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I97206fd3a4cfea43ab6836f45b92a1bb2adb5c32

show more ...

bc03a4ff19-Sep-2022 Ed Tanous <edtanous@google.com>

boost::any -> std::any

Modern c++ has std::any, which is a drop in replacement for boost::any.
Convert the boost::any usages to std::any.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I

boost::any -> std::any

Modern c++ has std::any, which is a drop in replacement for boost::any.
Convert the boost::any usages to std::any.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3ac28d8c86645a878a91733e0ea404c3270766fc

show more ...

c133002d19-Sep-2022 Ed Tanous <edtanous@google.com>

Use unordered_map for callback storage

Inside object_server, we're storing callbacks in a
flat_map<string,unique_ptr>. Having the callback indirection somewhat
defeats the purpose of the flat map,

Use unordered_map for callback storage

Inside object_server, we're storing callbacks in a
flat_map<string,unique_ptr>. Having the callback indirection somewhat
defeats the purpose of the flat map, given there's an indirection anyway
to look up the callback.

This commit moves to using unordered_map, given that it has a smaller
binary size footprint.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I81dfe14751a868d6a13c1ee0a3c8be36fd99fe15

show more ...

5eb80a8003-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

Revert "message: set 'get' as const"

This reverts commit 2e37e97c5e9eb4637827bdb46db36fc78d7b9af4.

In post-review discussion, William convinced me this was a bad
idea. This allows a `const message

Revert "message: set 'get' as const"

This reverts commit 2e37e97c5e9eb4637827bdb46db36fc78d7b9af4.

In post-review discussion, William convinced me this was a bad
idea. This allows a `const message_t` to be passed to sd-bus
functions which take a non-const `message*`, likely changing
the contents in a non-const way.

Change-Id: I6803b5dee80340587618dd9dc1804d96f9f6a0e2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

654d45b501-Sep-2022 Ed Tanous <edtanous@google.com>

Give async_send_hander a real constructor

Clang apparently doesn't like std::make_unique calls on structs without
an explicit constructor, and clang-tidy errors out in CI checks. Make
the construct

Give async_send_hander a real constructor

Clang apparently doesn't like std::make_unique calls on structs without
an explicit constructor, and clang-tidy errors out in CI checks. Make
the constructor explicit on both async_send_handler and unpack_userdata.

Tested: Unit tests pass.

A hacked openbmc-build-scripts + bmcweb build pointing at this commit
passes clang-tidy checks.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iab1d2dfdebd5270ded88324c30653f9c3c48727c

show more ...

25e2a09431-Aug-2022 Nan Zhou <nanzhoumails@gmail.com>

bus: utility to process messages in infinite loop

This change introduces a simple function for synchronous DBus servers to
start listening to incoming requests and run forever.

This can avoid dupli

bus: utility to process messages in infinite loop

This change introduces a simple function for synchronous DBus servers to
start listening to incoming requests and run forever.

This can avoid duplicate while loops in server codes across repos.

Please see the following change for context.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-user-manager/+/56843

Tested: the calculator server unit test passed.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I1b6485869527e938c429c035a0551ec4dbb36c99

show more ...

9cde21ff29-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

message: add unpack method

Add an unpack method that allows reading from the message as
r-values. This simplifies the pattern:

```
foo f{};
bar b{};
msg.read(f,b);

// Can now be w

message: add unpack method

Add an unpack method that allows reading from the message as
r-values. This simplifies the pattern:

```
foo f{};
bar b{};
msg.read(f,b);

// Can now be written as...

auto [f, b] = msg.unpack<foo, bar>();
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic2ae7f2c52d41702b8c7c3af6a2efb21558a7579

show more ...

1234567891011