summaryrefslogtreecommitdiffstats
path: root/manager.hpp
Commit message (Collapse)AuthorAgeFilesLines
* manager: switch to refactored internal APIsBrad Bishop2019-01-071-149/+11
| | | | | | | | | Switch the manager over to the new serialization concept API implementation and the new interface operations API - introduced previously. Change-Id: I756021e4c42c0f61d269dccfd9ff0c489d91c0c7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* serialize: add concept APIBrad Bishop2019-01-071-3/+4
| | | | | | | | Wrap serialization methods in a struct to match a yet to be consumed serialization template concept API. Change-Id: I4be1749f693ea5fe116bbac581428972e7670791 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Replace std::experimental::any with std::anyBrad Bishop2018-11-211-25/+26
| | | | | | | This is possible and preferrable now with the switch to c++17. Change-Id: I0c314ae9a85c8c34274cc971e63b17988db31a2b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* formatter: update clang-format and fix-up file(s)Patrick Venture2018-10-141-9/+14
| | | | | | | | clang-format-6.0 introduced new changes, also then updates to .clang-format introduce more new changes. Change-Id: Iec9f84e3a7a5bf254d66eee46cdc9b3070e06687 Signed-off-by: Patrick Venture <venture@google.com>
* Enable clang-formatBrad Bishop2018-03-291-226/+204
| | | | | | | Fix up problems and enable clang-format during CI builds. Change-Id: Ia5c88281f7090c0aa09ba586d968f1fcd8aba4f1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add support for type-only interfacesMarri Devender Rao2017-09-291-31/+97
| | | | | | | | | | Modify Maker template for type-only interfaces that do not have properties. Resolves openbmc/openbmc#1786 Change-Id: I2c48b37cf273943a0c696f6b92db0bc901a1c9b4 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* inventory: implement deserializationDeepak Kodihalli2017-08-231-3/+18
| | | | | | | | | Use Cereal to deserialize inventory information persisted in the filesystem and restore that to create inventory d-bus objects. Perform the restore when the app starts. Change-Id: I0f36a9cbdde223e4bfd9e178e33f5677217ba881 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* inventory: implement serializationDeepak Kodihalli2017-08-231-1/+13
| | | | | | | | | | | | | | | | Use Cereal to serialize and persist inventory items to the filesystem. Serialize inventory objects as and when they're created/updated via the notify() API. Create a template API to perform serialization on the sdbusplus inventory interface type. An inventory item path /foo/bar/baz implementing interfaces iface1 and iface2 would be stored in paths /foo/bar/baz/iface1 and /foo/bar/baz/iface2. Change-Id: I9a175185eac1740d6f2ca86a3ee13457edfc8ea9 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* change namespace on sdbusplus::matchPatrick Williams2017-05-011-1/+1
| | | | | | | sdbusplus::server::match::match moved to the sdbusplus::bus namespace. Change-Id: Ib1599f7efbf63570685a7029811f2eeb69ef6ace Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add object/interface update methodsBrad Bishop2017-02-151-5/+49
| | | | | | | | Add methods that handle both adding/updating objects/interfaces. Change-Id: I3c682365aad18f439babfb0413f29af05327eead Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge actions.hpp and events.hppBrad Bishop2017-02-151-1/+1
| | | | | | | | | | | | | | | Move all action/filter functors to a common functor.hpp. The intent of this refactoring is to facilitate reuse of functors in more than one context. - Moved functors from actions.hpp and events.hpp to functor.hpp. - Renamed events.cpp to functor.cpp. - Moved Action/Filter types to types.hpp. - Minor namespace shuffling. - Update pimgen to render according to the new namespaces. Change-Id: I630ec1587b8a48f6dc2eac1111365035873310d9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Set properties when constructing interfaces.Brad Bishop2017-02-141-2/+14
| | | | | | | | | Make use of new sdbusplus support for passing a map of properties and their values to the interface constructor. Change-Id: Ib0dd406fd80c89acb723e3a376af26ba57b53d27 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove details namespaceBrad Bishop2017-02-091-9/+6
| | | | | | | | The usage was incoherent and it isn't really necessary for application only objects. Change-Id: I76eb5525a39fbbef95548558e777940edf574a06 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use std::anyBrad Bishop2017-02-091-17/+8
| | | | | | | Replace holder types with std::any. Change-Id: I0cd8c2804ad4bff79a0cfe93589e699afb095e5f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use std::functionBrad Bishop2017-02-091-1/+1
| | | | | | | | Replace CallableHolder with std::function. No need to re-invent the wheel. Change-Id: I2647a802237dba4a48187718f0d3da59e97575d7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove use of sdbusplus::object::objectBrad Bishop2017-02-091-5/+3
| | | | | | | | | | | Cannot use this interface wrapper with property import constructors at the moment, so just use the interface classes directly. Emit interfaces added/removed signals manually. Change-Id: I688e1b774756d48beac7511dda0387b627e57c1f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Link with libphosphor_dbusBrad Bishop2017-02-091-2/+3
| | | | | | | | | | | Link with libphosphor_dbus. Update the manager implementation to match the new server binding in libphosphor_dbus (bool types for notify and notify signature change). Change-Id: I033d224965caf737591e363b3e2fd666605bff13 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add support for createObjects actionBrad Bishop2017-02-011-0/+4
| | | | | Change-Id: I999a5e506a236eac8ca0944b0e2b003c57612e54 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Maker factory refactoringBrad Bishop2017-02-011-11/+18
| | | | | | | | | | Prepare for the addition of new iface -> class op adapters. Get ready to pass the interface properties to the sdbusplus server binding constructor, once that method is available. Change-Id: I002cc187ac3d8d8a7fd02cc820f831e345e49a61 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove Object from testcaseBrad Bishop2017-02-011-3/+1
| | | | | | | | Currently the testcase and the application both define their own Object type. Move to a common header. Change-Id: I05dba67dca7855f522be299fcfd361913ed73fbc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Minor event refactoringBrad Bishop2017-02-011-4/+4
| | | | | | | | | | | | Assert that all events will share the same filter interface by moving event filters to event base class. Remove virtual on destructors in classes with final. Improve comments in a number of places. Change-Id: Ia32c13fd0f3b9a5fa147a2198a285bce37c27cfb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Allow multiple objects to be destroyedBrad Bishop2017-01-311-2/+3
| | | | | | | | Enhance the destroyObject action to take an array rather than a single path. Change-Id: Ic1de7274afc253042b590c71ca200618a6ff54d2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Fix a bug with new interface signalsBrad Bishop2017-01-161-3/+4
| | | | | | | | When creating new objects, Defer sending of interface added signals until all interfaces have been created. Change-Id: I031846861bb8f569be054e1d0303810fc0dd6ba6 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Regenerate manager bindingsBrad Bishop2017-01-161-3/+3
| | | | | | | Re-run sdbus++ and react to the sdbusplus interface namespace move and a real object path type. Change-Id: Id6241b55cd3f2d4c3b85e5545e4ac6e5dd439e34
* Add volatile keyword on shutdownBrad Bishop2017-01-131-1/+1
| | | | | Change-Id: I7448507cf8f18036be6c25bf4ba9d5dd8c2ba768 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove decltype where unnecessaryBrad Bishop2017-01-121-1/+1
| | | | | Change-Id: I0d1b9107810a3aaac1f52517b3ff220fdf567ee3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Run astyleBrad Bishop2017-01-121-157/+157
| | | | | Change-Id: Iec4802e9837465a7deb1fd7fd57a2068cc18c50d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add setProperty actionBrad Bishop2017-01-121-0/+27
| | | | | | | | The setProperty action sets a property to a predefined value when a match occurs. Change-Id: Ibd3cbb0da86a99e823b9cc00cc0240772d895f7f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add interface exposing utility functionsBrad Bishop2017-01-121-0/+42
| | | | | | | | Add utility functions enabling easy method calls on sdbusplus interface binding objects. Change-Id: Ie1d01f82604406705869fea0ec19d84c95d90474 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Allow arrays of dbus eventsBrad Bishop2017-01-121-4/+7
| | | | | | | | The current event <-> action relationship is one to many. Allow a many to many relationship to be expressed. Change-Id: Ibfb995cbf677b21757864dc62d9a3818af6c2aa3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add event frameworkBrad Bishop2017-01-111-5/+4
| | | | | | | | Introduce the concept of events, where the existing Dbus signal match event is one of many possible event classes. Change-Id: I9b0c6ca12daaa109f8ceb537a5fb0cc6b5f7181b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use a vector for eventsBrad Bishop2016-12-151-1/+1
| | | | | | | | | The events structure is never inserted into, searched and the keys aren't used. This was a poor choice of data structure. Change-Id: I46135e9128b3380712234e86674e53af10b37053 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Move filters.hpp to events.hppBrad Bishop2016-12-151-1/+1
| | | | | | | | | Prepare for a more generalized event description framework enabling event classes other than DBus signal matches. Filters become a sub-concept within that framework so rename the file. Change-Id: I0be9f9997239aad6e798ca16055aedc3e1233994 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Enable multiple actions per eventBrad Bishop2016-12-151-1/+1
| | | | | | | | Reduce the number of dbus signal callbacks by enabling multiple actions for a single event. Change-Id: I944eea6ac450c2ea9a201e724765edbef4e677b4 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Removed duplicated Holder adaptersBrad Bishop2016-12-151-62/+22
| | | | | | | | Refactor copy/pasted action/filter/interface object adapter types into a single templated framework. Change-Id: Iafbd814572a7db13fddc5314617e310fe5f0a062 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use sdbusplus object wrapperBrad Bishop2016-11-221-1/+8
| | | | | | | | | | | Use sdbusplus::server::object::object to wrap interfaces. This is the preferred way to ensure created objects emit freedesktop ObjectManager signals. Resolves openbmc/openbmc#756 Change-Id: Ia57057e0227ed92bef77f28e42942194f5e802f3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Fix out of tree build issuesBrad Bishop2016-11-211-1/+1
| | | | | | | | Eventually server.hpp will come from an external shared library. Until then, iquote it while it lives in-tree. Change-Id: If0f7da8e2c951443fea0d623ad03a7c54a5a5ee9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Switch to generated interface factory methodsBrad Bishop2016-11-081-0/+6
| | | | | | | | Automatically populate the association of interface with an appropriate sdbusplus server side interface binding. Change-Id: Ie46d91cf2e6726b033789be6228c10ca14a76220 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* actions: Add destroy actionBrad Bishop2016-11-081-0/+3
| | | | | | | Add an action to destroy an object on signal match. Change-Id: I23fb160bcf7507d0d0a5f2d82f1cfb24131adf76 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add actionsBrad Bishop2016-11-081-1/+5
| | | | | | | | | | Provide tooling to enable specification of pre-implemented actions to perform after a signal match. Add a default 'noop' action to be used when an action isn't specified. Change-Id: I8d3b1ef2cfc26771322820be931a61bba3ad8d94 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Enable filtering of signal matchesBrad Bishop2016-11-081-1/+2
| | | | | | | | | | Provide tooling to enable specification of pre-implemented filtering functors for signal matches. Add a default 'none' filter to be used when a filter isn't specified. Change-Id: I3549d8cf44c5f475626875fa94ca3ee8f74d6d26 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add manager skeletonBrad Bishop2016-11-081-0/+168
Add stubbed Notify implementation and register for generated signal callbacks. Add a unit test; which, at this point does little more than verify we don't coredump on startup. Change-Id: I0cda71935947c0d082612a5c52e2b7eba98516ab Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud