123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef UPDATE_ENGINE_DAEMON_H_
- #define UPDATE_ENGINE_DAEMON_H_
- #include <memory>
- #include <string>
- #if USE_BINDER
- #include <brillo/binder_watcher.h>
- #endif
- #include <brillo/daemons/daemon.h>
- #if USE_BINDER
- #if USE_OMAHA
- #include "update_engine/binder_service_brillo.h"
- #else
- #include "update_engine/binder_service_android.h"
- #endif
- #endif
- #include "update_engine/common/subprocess.h"
- #include "update_engine/daemon_state_interface.h"
- #if USE_DBUS
- #include "update_engine/dbus_service.h"
- #endif
- namespace chromeos_update_engine {
- class UpdateEngineDaemon : public brillo::Daemon {
- public:
- UpdateEngineDaemon() = default;
- protected:
- int OnInit() override;
- private:
- #if USE_DBUS
-
-
-
- void OnDBusRegistered(bool succeeded);
-
- std::unique_ptr<UpdateEngineAdaptor> dbus_adaptor_;
- #endif
-
-
-
- Subprocess subprocess_;
- #if USE_BINDER
- brillo::BinderWatcher binder_watcher_;
- #endif
- #if USE_BINDER
- #if USE_OMAHA
- android::sp<BinderUpdateEngineBrilloService> binder_service_;
- #else
- android::sp<BinderUpdateEngineAndroidService> binder_service_;
- #endif
- #endif
-
-
- std::unique_ptr<DaemonStateInterface> daemon_state_;
- DISALLOW_COPY_AND_ASSIGN(UpdateEngineDaemon);
- };
- }
- #endif
|