History log of /openbmc/sdbusplus/include/ (Results 201 – 225 of 254)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
bd372ecb02-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: add errno for internal errors

Assign errnos for InvalidEnumString and UnpackPropertyError.

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

exception: add errno for internal errors

Assign errnos for InvalidEnumString and UnpackPropertyError.

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

show more ...

b6f729d602-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: add errno for all exceptions

sd_bus maintains an errno for all exceptions. There are some
users of the library that are catching an SdBusError because they
want an easy way to change to

exception: add errno for all exceptions

sd_bus maintains an errno for all exceptions. There are some
users of the library that are catching an SdBusError because they
want an easy way to change to an errno, but as a result they are
potentially missing exceptions. Add the `get_errno` method into
our base exception object and return the same default that sd_bus
uses: EIO.

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

show more ...

0c8136a428-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

enable building with clang

Clang is more pedantic about systemd's use of C99 extensions when
high warning levels are enabled. Disable the "-Wc99-extensions"
when using the SD_BUS_ERROR_NULL macro f

enable building with clang

Clang is more pedantic about systemd's use of C99 extensions when
high warning levels are enabled. Disable the "-Wc99-extensions"
when using the SD_BUS_ERROR_NULL macro from systemd. This enables
sdbusplus to compile with clang.

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

show more ...

daaad8f728-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

message: append: fix unused variable warning

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

0ade192c19-Aug-2021 Nidhin MS <nidhin.ms@intel.com>

Fix: Unused parameter in object_server.hpp

The function argument m in callback_method_instance::callFunction is
unused.

Compiler is throwing unsused parameter error when all warnings are
enabled an

Fix: Unused parameter in object_server.hpp

The function argument m in callback_method_instance::callFunction is
unused.

Compiler is throwing unsused parameter error when all warnings are
enabled and -Werr is set.

Tested:
Build was succesful

Signed-off-by: Nidhin MS <nidhin.ms@intel.com>
Change-Id: If8da994e90f564962a2b872bc1286bd43aa600da

show more ...

cf0c072206-Aug-2021 Rashmica Gupta <rashmica.g@gmail.com>

match: Add new PropertiesChanged rule

Matches on path_namespace rather than path.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: I69d7b6cb4b79da381ebae3c4572c17b51faaf24d

bb8be9f729-Jul-2021 William A. Kennington III <wak@google.com>

native_types: Fix pendantic error

Trailing semicolons for function declarations are superfluous.

Change-Id: Ifbf8806b135deccb558bc478b1e6746c9beb9a60
Signed-off-by: William A. Kennington III <wak@g

native_types: Fix pendantic error

Trailing semicolons for function declarations are superfluous.

Change-Id: Ifbf8806b135deccb558bc478b1e6746c9beb9a60
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

c1c5106021-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: export has_convert_from_string

Commit 87b6a8d331867c24f7bd5f0160199478d97383b0 added a SFINAE
template to determine if a type has 'convert_from_string'.
Export this template out of the deta

message: export has_convert_from_string

Commit 87b6a8d331867c24f7bd5f0160199478d97383b0 added a SFINAE
template to determine if a type has 'convert_from_string'.
Export this template out of the details namespace so other code
can use it.

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

show more ...

a22dbf4016-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: correctly unpack variants of enums

When a variant contains multiple types which can be converted
from a string (such as two enums, or an enum and string), the
previous code tried a conversi

message: correctly unpack variants of enums

When a variant contains multiple types which can be converted
from a string (such as two enums, or an enum and string), the
previous code tried a conversion from the first type in the
variant. When the first type was an enum, this often threw an
exception. When the first type was a string, this turned into
a plain string containing the dbus enum value.

Add special cases to the variant unpacking to detect types
which are convertible from strings and delegate to a template
specialization of 'convert_from_string' which handles variants.
This specialization will attempt all conversions first and then
revert to a string as a fallback.

Fixes openbmc/sdbusplus#52.

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

show more ...

87b6a8d315-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: template to check if convert_from_string exists

Add a SFINAE template to determine if convert_from_string
exists for a type.

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

message: template to check if convert_from_string exists

Add a SFINAE template to determine if convert_from_string
exists for a type.

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

show more ...

05a3504215-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: move enum-string conversion routines

Move enum conversion routines out of the 'details' namespace
so they are available for library users and consolidate them
in the 'native_types' header.

message: move enum-string conversion routines

Move enum conversion routines out of the 'details' namespace
so they are available for library users and consolidate them
in the 'native_types' header.

In order to support future work of template-specialization on
`variant` types, this also added a level of indirection in the
generated specializations for enums so that they are handled
through a struct-with-op pattern. (Functions cannot be partially
specialized and overloading the template with std::variant support
requires that).

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

show more ...

145892c914-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: read: move enum exception higher

In order to better handle trying the next enumeration when
parsing variants with multiple enum types, switch the usage
of string-to-enum to the one returnin

message: read: move enum exception higher

In order to better handle trying the next enumeration when
parsing variants with multiple enum types, switch the usage
of string-to-enum to the one returning a std::optional. This
requires adding the exception (for bad enum parsing) into the
higher level 'read_single' implementation for enums.

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

show more ...

d51e593914-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: define and use C++17 style _v aliases

Create C++17 `foo_v` style aliases and replace all usages of
template `foo<...>::value` with them.

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

message: define and use C++17 style _v aliases

Create C++17 `foo_v` style aliases and replace all usages of
template `foo<...>::value` with them.

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

show more ...

9245868114-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

utility: container_traits: define C++17 _v aliases

Define C++17 'foo_v' style aliases and replace usages of
'foo<...>::value' with them.

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

utility: container_traits: define C++17 _v aliases

Define C++17 'foo_v' style aliases and replace usages of
'foo<...>::value' with them.

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

show more ...

64f0122614-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

use C++17 std::foo_v templates

Use the C++17 style `foo_v` template aliases rather than
the older `foo<...>::value` style.

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

use C++17 std::foo_v templates

Use the C++17 style `foo_v` template aliases rather than
the older `foo<...>::value` style.

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

show more ...

b16ea98814-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

utility: type_traits: use C++14 '_t' style

Add a foo_t variant of all type templates and refactor
usages to use the foo_t variant instead of `foo<...>::type`.

Signed-off-by: Patrick Williams <patri

utility: type_traits: use C++14 '_t' style

Add a foo_t variant of all type templates and refactor
usages to use the foo_t variant instead of `foo<...>::type`.

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

show more ...

34cf693214-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

utility: dedup_variant: rename in C++14 '_t' style

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

2b7da24914-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: use C++14 enable_if_t

Avoid the `enable_if<...>::type` and use the preferred C++14
`enable_if_t` short-hand.

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

message: use C++14 enable_if_t

Avoid the `enable_if<...>::type` and use the preferred C++14
`enable_if_t` short-hand.

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

show more ...

5a14953614-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

message: read: DRY the string specializations

The specializations for std::string, string_wrapper, and
string_path_wrapper are almost identical. Do some minor
refactoring and DRYing so that the sam

message: read: DRY the string specializations

The specializations for std::string, string_wrapper, and
string_path_wrapper are almost identical. Do some minor
refactoring and DRYing so that the same template specialization
can be used for all 3.

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

show more ...

1013c5ec13-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

server: remove bindings.hpp

binding.hpp had an unused template definition that was used as
an overload for converting enums to strings. This function is
no longer used within the library nor genera

server: remove bindings.hpp

binding.hpp had an unused template definition that was used as
an overload for converting enums to strings. This function is
no longer used within the library nor generated bindings. Remove
it and clean up the documentation of the generated version of this
function for enums to match the actual namespace where they are
defined.

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

show more ...

285f78b101-May-2021 William A. Kennington III <wak@google.com>

native_types: Reduce append allocation

This builds the string from left to right, instead of dealing with
string inserts, optimizing for allocations. Uses our own hex encoder
instead of relying on s

native_types: Reduce append allocation

This builds the string from left to right, instead of dealing with
string inserts, optimizing for allocations. Uses our own hex encoder
instead of relying on systemd libraries. This maintains explicit
compatability with the systemd encoding scheme.

Change-Id: Ia6c2f4fb19984f549c6bac2d67d0b5d610022038
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

226bc42a05-May-2021 William A. Kennington III <wak@google.com>

native_types: Migrate large functions to shared lib

This speeds up compilation of changes and should save space in users of
the functions.

Change-Id: Iee9029800c11dcd4e94f165766836bae327ee9b5
Signe

native_types: Migrate large functions to shared lib

This speeds up compilation of changes and should save space in users of
the functions.

Change-Id: Iee9029800c11dcd4e94f165766836bae327ee9b5
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

472b702215-Apr-2021 William A. Kennington III <wak@google.com>

message: Add call_async method

This makes it possible to perform an async method call that is agnostic
to the event loop running the sd_bus state machine.

Change-Id: I32bc0fdf89c44cc6bab1c4622b143d

message: Add call_async method

This makes it possible to perform an async method call that is agnostic
to the event loop running the sd_bus state machine.

Change-Id: I32bc0fdf89c44cc6bab1c4622b143d6e06098659
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

d06072e721-Apr-2021 Ed Tanous <edtanous@google.com>

Fix #60 by adding encoding/decoding rules

This commit attempts to make encoding more compatible with things within
openbmc that don't encode paths per the systemd method. It does this by
forcing th

Fix #60 by adding encoding/decoding rules

This commit attempts to make encoding more compatible with things within
openbmc that don't encode paths per the systemd method. It does this by
forcing the first character of every path segment to be encoded, so /abc
would be encoded as /_61bc. This is then used as a mechanism to
determine if the path needs to be decoded per systemds rules.

The decode mechanisms are also modified to check whether the first
element is encoded before decoding the portion.

Looking for input on whether this is an OK path. The hope would be that
we slowly transition the system over to using the encoding mechanisms
that can handle all ascii characters, and can round trip through
encode/decode without loss. The hope is that this patch can be reversed
at some point in the future.

As an aside, I tried reverting some of the patches, but they're somewhat
ungainly to revert at this point, and would require reverting some
bmcweb patches, which, if this patch is determined to be bad, I'm happy
to do, but I'm hoping this will get us something in the interim

Tested:
unit tests added and updated to cover some of the cases. Unit tests
pass.

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

show more ...

f886012826-Apr-2021 Ed Tanous <edtanous@google.com>

Make object_path operator/ const

This is a minor change to make operator/ const. It likely should've
been const initially, but I didn't think of it, and I didn't have a
const example of an input in

Make object_path operator/ const

This is a minor change to make operator/ const. It likely should've
been const initially, but I didn't think of it, and I didn't have a
const example of an input initially.

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

show more ...

1234567891011