1 /* This Source Code Form is subject to the terms of the Mozilla Public
\r
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
\r
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
\r
4 #ifndef COMMONAPI_DBUS_DBUS_SERVICE_STATUS_EVENT_H_
\r
5 #define COMMONAPI_DBUS_DBUS_SERVICE_STATUS_EVENT_H_
\r
7 #include "DBusMultiEvent.h"
\r
9 #include <CommonAPI/Event.h>
\r
10 #include <CommonAPI/types.h>
\r
15 namespace CommonAPI {
\r
19 class DBusServiceRegistry;
\r
21 class DBusServiceStatusEvent: public DBusMultiEvent<AvailabilityStatus> {
\r
23 DBusServiceStatusEvent(std::shared_ptr<DBusServiceRegistry> registry);
\r
26 void onFirstListenerAdded(const std::string& serviceName, const Listener& listener);
\r
27 void onListenerAdded(const std::string& serviceName, const Listener& listener);
\r
30 void availabilityEvent(const std::string& name, const bool& available);
\r
32 std::shared_ptr<DBusServiceRegistry> registry_;
\r
36 } // namespace CommonAPI
\r
38 #endif // COMMONAPI_DBUS_DBUS_SERVICE_STATUS_EVENT_H_
\r