History log of /openbmc/sdbusplus/test/server/ (Results 1 – 19 of 19)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ce8d16d907-Sep-2022 Willam A. Kennington III <wak@google.com>

treewide: Leverage sdbus++-gen-meson

This makes us more consistent with other projects instead of writing
meson builds for sdbus++ by hand.

Change-Id: I38b69bc67b6a3d80cda1b508a76e106a50d8ab93
Sign

treewide: Leverage sdbus++-gen-meson

This makes us more consistent with other projects instead of writing
meson builds for sdbus++ by hand.

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

show more ...

293c8a2602-Sep-2022 William A. Kennington III <wak@google.com>

sdbus++: Fix meson dependency generation

All of the generated meson files optionally look for sdbus++ sources
that can be plumbed in to allow changes to the generator code to
correctly trigger rebui

sdbus++: Fix meson dependency generation

All of the generated meson files optionally look for sdbus++ sources
that can be plumbed in to allow changes to the generator code to
correctly trigger rebuilds.

This will require adding a new variable prior to generated sources,
`sdbusplusplus_depfiles`. You can convert previous meson defitions with
the follwing.

```
sdbusplus_dep = dependency('sdbusplus')
sdbusplusplus_prog = find_program('sdbus++', native: true)
sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
sdbusplusplus_depfiles = files()
if sdbusplus_dep.type_name() == 'internal'
sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
endif
```

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

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/.shellcheckrc
/openbmc/sdbusplus/OWNERS
/openbmc/sdbusplus/README.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/list-users.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/net/poettering/Calculator/meson.build
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/src/exception.cpp
/openbmc/sdbusplus/test/bus/match.cpp
/openbmc/sdbusplus/test/meson.build
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/read.cpp
Test/meson.build
message_variant.cpp
object.cpp
/openbmc/sdbusplus/test/unpack_properties.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbus++-gen-meson
/openbmc/sdbusplus/tools/sdbus++-gendir
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
ba5460db30-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

server: object: default emit destruct signals

In the mailing list discussion [1] it was observed that there were cases
where daemons like `phosphor-logging` do not end up emitting
InterfacesRemoved

server: object: default emit destruct signals

In the mailing list discussion [1] it was observed that there were cases
where daemons like `phosphor-logging` do not end up emitting
InterfacesRemoved signals even when the holding sdbusplus::object_t was
destructed.

After investigation, we determined that there are valid use cases for not
calling `object->emit_added()` but still wanting the removal signals to be
emitted. Specifically, the case of a daemon creating initial object prior
to claiming a bus-name it is good to omit the emission.

I examined all cases where callers were using `action::defer_emit` and
it was acceptable for all of them to later send the InterfacesRemoved
signals on destruction. To enable the old behavior, if desired, I added
a new enumeration which is `action::emit_no_signals`.

1. https://lore.kernel.org/openbmc/CAGm54UHMED4Np0MThLfp4H-i8R24o8pCns2-6MEzy1Me-9XJmA@mail.gmail.com/

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

show more ...

9f11c97914-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

format: copy configs from phosphor-dbus-interfaces and reformat

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

e944507f12-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

yaml: format with prettier

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

4a46eb5a23-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

object: handle diamond inheritance

Commit 664922157bbbd14f0ad1692cee5547f60f6c617c added an inheritance
to `server::object` to gain access to the bus-pointer. This was
observed to cause a compile f

object: handle diamond inheritance

Commit 664922157bbbd14f0ad1692cee5547f60f6c617c added an inheritance
to `server::object` to gain access to the bus-pointer. This was
observed to cause a compile failure in some applications which had a
diamond-inheritance structure due to a nested `object` inheritance:

`object<object<iface0, iface1>, object<iface2, iface3>>`

These clients probably should not have attempted a nested/diamond
because the previous implementation would have resulted in a silent
failure to make `action::emit_interface_added` work properly (since
object itself doesn't have an `emit_added` function).

Improve the `object` so that:
- Diamond inheritance is no longer possible with nested inherits.
- The `action::emit_interface_added` action works properly with
nested inherits.

This required adding some template specialization to determine if one of
the type arguments to `object` were nested (ie.
`object<Args0..., object<Args1...>, Args2...>`) and collapse out the
nested `object` inheritance (so that the example acts exactly the same
as `object<Args0..., Args1..., Args2...>`).

Tested: Enhance the existing `object::emit` test cases to operate on a
nested `object` structure.

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

show more ...

ba33c2a219-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

manager,interface: use shortened types

Use the shortened alias types whenever possible for `manager` and
`interface`.

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

manager,interface: use shortened types

Use the shortened alias types whenever possible for `manager` and
`interface`.

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

show more ...

0f282c4819-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

bus: shorten bus type

Create an alias `sdbusplus::bus_t` to `sdbusplus::bus::bus` to reduce
duplication.

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

bus: shorten bus type

Create an alias `sdbusplus::bus_t` to `sdbusplus::bus::bus` to reduce
duplication.

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

show more ...

10d7aa1219-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

message: shorten message type

Create an alias `sdbusplus::message_t` to `sdbusplus::message::message`
to reduce duplication.

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

message: shorten message type

Create an alias `sdbusplus::message_t` to `sdbusplus::message::message`
to reduce duplication.

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

show more ...


/openbmc/sdbusplus/OWNERS
/openbmc/sdbusplus/docs/error.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbuspp_support/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/read_into_tuple.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/src/exception.cpp
/openbmc/sdbusplus/src/message/native_types.cpp
/openbmc/sdbusplus/src/server/transaction.cpp
/openbmc/sdbusplus/test/bus/match.cpp
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/read.cpp
message_variant.cpp
/openbmc/sdbusplus/test/unpack_properties.cpp
/openbmc/sdbusplus/tools/sdbusplus/error.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/error.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
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 ...

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

test: add tests for enum parsing

Add test cases to cover the parsing of enums from generated
bindings, including two DISABLED test cases to show the issues
reported in openbmc/sdbusplus#52.

Signed-

test: add tests for enum parsing

Add test cases to cover the parsing of enums from generated
bindings, including two DISABLED test cases to show the issues
reported in openbmc/sdbusplus#52.

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

show more ...


/openbmc/sdbusplus/MAINTAINERS
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbuspp_support/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/dedup_variant.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/memory.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/src/bus.cpp
/openbmc/sdbusplus/src/message/native_types.cpp
/openbmc/sdbusplus/src/server/interface.cpp
/openbmc/sdbusplus/src/server/transaction.cpp
/openbmc/sdbusplus/test/meson.build
/openbmc/sdbusplus/test/message/call.cpp
/openbmc/sdbusplus/test/message/types.cpp
Test.interface.yaml
message_variant.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/tools/sdbus++-gen-meson
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
/openbmc/sdbusplus/tools/setup.py
c67e1e8704-Nov-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: support special double values

Enable properties to have default values of special IEEE floating
points: 'NaN', 'infinity' and 'epsilon'.

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

sdbus++: support special double values

Enable properties to have default values of special IEEE floating
points: 'NaN', 'infinity' and 'epsilon'.

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

show more ...

4690d88c08-Oct-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: handle duplicate generated variant types

4ac7e56e8e18202fad3b2734346c6d4c7a6957fc added support for 'size_t'
and 'ssize_t' types to sdbus++. On some architectures these collide
with '[u]in

sdbus++: handle duplicate generated variant types

4ac7e56e8e18202fad3b2734346c6d4c7a6957fc added support for 'size_t'
and 'ssize_t' types to sdbus++. On some architectures these collide
with '[u]int32_t' or '[u]int64_t' types and so may not be added to a
combined variant (ie. variant<uint32_t, size_t> will fail to compile
on some architectures). The generated bindings in sdbus++ need a
variant from the set of all properties for some of the constructor
forms.

Create a template type which will formulate a non-duplicative type set
from which a variant can be constructed and modify the sdbus++ generator
to use this variant type instead of std::variant directly. Added test
cases here to cover this condition for 'size' and 'ssize' sdbus++ types.

It is possible this could have been resolved in the generator itself,
but then the generator would have needed to know which architecture the
generated bindings were going to be compiled for. This would have made
the header files incompatible between x86-64 and arm32. I chose instead
to keep the header files consistent across all architectures and let the
compiler make the type decision.

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

show more ...

d5ce346c11-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add type 'object_path' alias

The underlying dbus and sdbusplus type is 'object_path', but the
current sdbus++ type is 'path'. Add an alias which is more obvious.

There are currently some

sdbus++: add type 'object_path' alias

The underlying dbus and sdbusplus type is 'object_path', but the
current sdbus++ type is 'path'. Add an alias which is more obvious.

There are currently some users of 'path' is phosphor-dbus-interfaces,
so we cannot immediately remove 'path'. Once this is merged we can
migrate them to 'object_path'.

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

show more ...

dbfb967911-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

native_types: add != comparison for string_wrapper

If a 'type: path' is added to a sdbus++ interface YAML file, the
resulting code does not compile due to a missing != comparison
operator for string

native_types: add != comparison for string_wrapper

If a 'type: path' is added to a sdbus++ interface YAML file, the
resulting code does not compile due to a missing != comparison
operator for string_wrapper. Add it and enhance the test case to
cover.

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

show more ...

4ac7e56e10-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add size_t / ssize_t types to YAML

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

e1c73d3b10-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: support 'readonly' flag

The previous documentation of 'const' did not match the
specification at a D-Bus level nor the implementation in sdbus++.
Correct the documentation for 'const' and a

sdbus++: support 'readonly' flag

The previous documentation of 'const' did not match the
specification at a D-Bus level nor the implementation in sdbus++.
Correct the documentation for 'const' and add a new 'readonly' flag
which enables the previously documented behavior for 'const.

This was reported by a user outside of the openbmc project which had
already been using the 'readonly' flag in their YAML to identify this
condition. Previously, sdbus++ silently ignored flags it didn't
explicitly support but as of 20255a5fce55a0743dc3d307d1168f18ed553751
this turned into an error.

There are cases of interfaces in 'phosphor-dbus-interfaces' currently
using 'const' where they likely desire a 'readonly' instead. We are
not changing the behavior of 'const' with this commit, so there would
be no regressions induced by this code change.

Resolves openbmc/sdbusplus#48.

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

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/.clang-ignore
/openbmc/sdbusplus/.gitignore
/openbmc/sdbusplus/MAINTAINERS
/openbmc/sdbusplus/README.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/list-users.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/net/poettering/Calculator.interface.yaml
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/README.md
/openbmc/sdbusplus/include/sdbusplus/server/bindings.hpp
/openbmc/sdbusplus/include/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/include/sdbusplus/server/manager.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/slot.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/read_into_tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/tuple_to_array.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/meson_options.txt
/openbmc/sdbusplus/src/exception.cpp
/openbmc/sdbusplus/src/sdbus.cpp
/openbmc/sdbusplus/src/server/transaction.cpp
/openbmc/sdbusplus/subprojects/googletest.wrap
/openbmc/sdbusplus/test/bus/aio.cpp
/openbmc/sdbusplus/test/bus/match.cpp
/openbmc/sdbusplus/test/exception/sdbus_error.cpp
/openbmc/sdbusplus/test/meson.build
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/native_types.cpp
/openbmc/sdbusplus/test/message/read.cpp
/openbmc/sdbusplus/test/message/types.cpp
Test.interface.yaml
/openbmc/sdbusplus/test/timer.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/test/vtable/vtable.cpp
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbus++
/openbmc/sdbusplus/tools/sdbus++-gendir
/openbmc/sdbusplus/tools/sdbusplus/error.py
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/main.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/signal.py
/openbmc/sdbusplus/tools/sdbusplus/templates/error.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.prototype.hpp.mako
/openbmc/sdbusplus/tools/setup.py
e57c38e920-Sep-2019 Lei YU <mine260309@gmail.com>

Emit adding/removing interfaces for object server

The object server currently either creats the objects and interfaces, or
defer the signal by not adding objects.

In practice, we have situations th

Emit adding/removing interfaces for object server

The object server currently either creats the objects and interfaces, or
defer the signal by not adding objects.

In practice, we have situations that the code would like to add
interfaces to an existing object, and it's not supported, or needs
tricky code to workaround.
Exmaples:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/5820
https://gerrit.openbmc-project.xyz/c/openbmc/openpower-pnor-code-mgmt/+/5346

This commit adds the support by:
1. Adding emit_added() in interface.hpp and the generated server.hpp
2. Adding a enum class in object's constructor to indicate which action
to do, to create the object, or adding the interface, or defer signal
as before.

So the user of object<> could pass `action::emit_interface_added` to the
constructor to tell the object server *only* emit interface added to
DBus, without emitting object added.
The previous code stays the same behavior:
* If `true` is passed in object's constructor, it defers emitting object
added signal;
* If no extra parameter is passed in object's constructor, it emits
object added signal as before.

Tested: 1. Make sure the openbmc builds fine with
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/25089
because phosphor-logging uses its own server.hpp for interface, the
above patch removes that.
2. Manually write a small service to verify the interfaces are
added and removed by using the `emit_interface_added` action.
3. Added the unit test cases for object.hpp to check the
ctor/dtor with different actions.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I178c5bed3c9ff39ee2ac8d143fbe9131b0753dfa

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/.gitignore
/openbmc/sdbusplus/LICENSE
/openbmc/sdbusplus/MAINTAINERS
/openbmc/sdbusplus/Makefile.am
/openbmc/sdbusplus/README.md
/openbmc/sdbusplus/bootstrap.sh
/openbmc/sdbusplus/configure.ac
/openbmc/sdbusplus/docs/error.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/Makefile.am
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/list-users.cpp
/openbmc/sdbusplus/example/net/poettering/Calculator.errors.yaml
/openbmc/sdbusplus/example/net/poettering/Calculator.interface.yaml
/openbmc/sdbusplus/sdbusplus.pc.in
/openbmc/sdbusplus/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/sdbusplus/bus.hpp.in
/openbmc/sdbusplus/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/sdbusplus/exception.cpp
/openbmc/sdbusplus/sdbusplus/exception.hpp
/openbmc/sdbusplus/sdbusplus/message.hpp
/openbmc/sdbusplus/sdbusplus/message/append.hpp
/openbmc/sdbusplus/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/sdbusplus/message/read.hpp
/openbmc/sdbusplus/sdbusplus/message/types.hpp
/openbmc/sdbusplus/sdbusplus/sdbus.cpp
/openbmc/sdbusplus/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/sdbusplus/server.hpp.in
/openbmc/sdbusplus/sdbusplus/server/README.md
/openbmc/sdbusplus/sdbusplus/server/bindings.hpp
/openbmc/sdbusplus/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/sdbusplus/server/manager.hpp
/openbmc/sdbusplus/sdbusplus/server/object.hpp
/openbmc/sdbusplus/sdbusplus/server/transaction.cpp
/openbmc/sdbusplus/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/sdbusplus/slot.hpp
/openbmc/sdbusplus/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/sdbusplus/timer.hpp
/openbmc/sdbusplus/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/sdbusplus/utility/read_into_tuple.hpp
/openbmc/sdbusplus/sdbusplus/utility/tuple_to_array.hpp
/openbmc/sdbusplus/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/sdbusplus/vtable.hpp
/openbmc/sdbusplus/test/Makefile.am
/openbmc/sdbusplus/test/bus/list_names.cpp
/openbmc/sdbusplus/test/bus/match.cpp
/openbmc/sdbusplus/test/exception/sdbus_error.cpp
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/native_types.cpp
/openbmc/sdbusplus/test/message/read.cpp
/openbmc/sdbusplus/test/message/types.cpp
Test.interface.yaml
object.cpp
/openbmc/sdbusplus/test/timer.cpp
/openbmc/sdbusplus/test/utility/tuple_to_array.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/test/valgrind.supp
/openbmc/sdbusplus/test/vtable/vtable.cpp
/openbmc/sdbusplus/test/vtable/vtable_c.c
/openbmc/sdbusplus/tools/Makefile.am
/openbmc/sdbusplus/tools/sdbus++
/openbmc/sdbusplus/tools/sdbusplus/__init__.py
/openbmc/sdbusplus/tools/sdbusplus/enum.py
/openbmc/sdbusplus/tools/sdbusplus/error.py
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/renderer.py
/openbmc/sdbusplus/tools/sdbusplus/signal.py
/openbmc/sdbusplus/tools/sdbusplus/templates/error.mako.cpp
/openbmc/sdbusplus/tools/sdbusplus/templates/error.mako.hpp
/openbmc/sdbusplus/tools/sdbusplus/templates/error.mako.md
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.mako.md
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.mako.server.cpp.in
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.mako.server.hpp
/openbmc/sdbusplus/tools/sdbusplus/templates/method.mako.md
/openbmc/sdbusplus/tools/sdbusplus/templates/method.mako.prototype.hpp.in
/openbmc/sdbusplus/tools/sdbusplus/templates/property.mako.md
/openbmc/sdbusplus/tools/sdbusplus/templates/property.mako.prototype.hpp.in
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.mako.md
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.mako.prototype.hpp
/openbmc/sdbusplus/tools/setup.py.in