diff --git a/src/ledflasher/animation.cpp b/src/ledflasher/animation.cpp index 0dfaad38ca395e6c7a41eacac8ebde984a441ae1..dbc891d83d0c9e75049d359eb01410312a3a8015 100644 --- a/src/ledflasher/animation.cpp +++ b/src/ledflasher/animation.cpp @@ -21,8 +21,9 @@ #include <base/bind.h> #include <base/message_loop/message_loop.h> -Animation::Animation(com::android::LEDService::ServiceProxy* service_proxy, - const base::TimeDelta& step_duration) +Animation::Animation( + com::android::LEDService::ServiceProxyInterface* service_proxy, + const base::TimeDelta& step_duration) : service_proxy_{service_proxy}, step_duration_{step_duration} { } @@ -54,7 +55,7 @@ void Animation::SetAllLEDs(bool on) { } std::unique_ptr<Animation> Animation::Create( - com::android::LEDService::ServiceProxy* service_proxy, + com::android::LEDService::ServiceProxyInterface* service_proxy, const std::string& type, const base::TimeDelta& duration) { std::unique_ptr<Animation> animation; diff --git a/src/ledflasher/animation.h b/src/ledflasher/animation.h index 63cd209fb559dcd8995181635c882f1f3d4e52b7..6df53c1c468248b75ddc774e881fb076af57f8f8 100644 --- a/src/ledflasher/animation.h +++ b/src/ledflasher/animation.h @@ -27,7 +27,7 @@ class Animation { public: - Animation(com::android::LEDService::ServiceProxy* service_proxy, + Animation(com::android::LEDService::ServiceProxyInterface* service_proxy, const base::TimeDelta& step_duration); virtual ~Animation() = default; @@ -35,7 +35,7 @@ class Animation { void Stop(); static std::unique_ptr<Animation> Create( - com::android::LEDService::ServiceProxy* service_proxy, + com::android::LEDService::ServiceProxyInterface* service_proxy, const std::string& type, const base::TimeDelta& duration); @@ -49,7 +49,7 @@ class Animation { void SetAllLEDs(bool on); private: - com::android::LEDService::ServiceProxy* service_proxy_; + com::android::LEDService::ServiceProxyInterface* service_proxy_; base::TimeDelta step_duration_; base::WeakPtrFactory<Animation> weak_ptr_factory_{this}; diff --git a/src/ledflasher/animation_blink.cpp b/src/ledflasher/animation_blink.cpp index af0a736fb98640ffcd7ba4562becdc2cf78b1b6d..5bf09784381a310c78071f5a6b652bf9e2e96b62 100644 --- a/src/ledflasher/animation_blink.cpp +++ b/src/ledflasher/animation_blink.cpp @@ -17,7 +17,7 @@ #include "animation_blink.h" AnimationBlink::AnimationBlink( - com::android::LEDService::ServiceProxy* service_proxy, + com::android::LEDService::ServiceProxyInterface* service_proxy, const base::TimeDelta& duration) : Animation{service_proxy, duration / 2} { } diff --git a/src/ledflasher/animation_blink.h b/src/ledflasher/animation_blink.h index 1509f75746df9b78573ec8f00c52ec99d19d8095..c7ee1b8f356e778d3fb4ebdde28edc1d6280f222 100644 --- a/src/ledflasher/animation_blink.h +++ b/src/ledflasher/animation_blink.h @@ -21,7 +21,7 @@ class AnimationBlink : public Animation { public: - AnimationBlink(com::android::LEDService::ServiceProxy* service_proxy, + AnimationBlink(com::android::LEDService::ServiceProxyInterface* service_proxy, const base::TimeDelta& duration); protected: diff --git a/src/ledflasher/animation_marquee.cpp b/src/ledflasher/animation_marquee.cpp index cfffe8dbbf0955f28bb0f981abf1269edffbbca1..b2ad1e1afe22f736429d1f61b396a50b6e28cdfc 100644 --- a/src/ledflasher/animation_marquee.cpp +++ b/src/ledflasher/animation_marquee.cpp @@ -17,7 +17,7 @@ #include "animation_marquee.h" AnimationMarquee::AnimationMarquee( - com::android::LEDService::ServiceProxy* service_proxy, + com::android::LEDService::ServiceProxyInterface* service_proxy, const base::TimeDelta& duration, Direction direction) : Animation{service_proxy, duration / num_leds}, direction_{direction} { diff --git a/src/ledflasher/animation_marquee.h b/src/ledflasher/animation_marquee.h index ce49e7a185555d16f156048c14cdb4465839f6c1..a31382b1e9310f68c77f44a5002e29812850eb79 100644 --- a/src/ledflasher/animation_marquee.h +++ b/src/ledflasher/animation_marquee.h @@ -23,9 +23,10 @@ class AnimationMarquee : public Animation { public: enum class Direction {Left, Right}; - AnimationMarquee(com::android::LEDService::ServiceProxy* service_proxy, - const base::TimeDelta& duration, - Direction direction); + AnimationMarquee( + com::android::LEDService::ServiceProxyInterface* service_proxy, + const base::TimeDelta& duration, + Direction direction); protected: void DoAnimationStep() override; diff --git a/src/ledflasher/ledflasher.cpp b/src/ledflasher/ledflasher.cpp index 58596479edd1adb3e3a948762cba5991cf32c4d5..e9bfa3ce9395aeb34062d6b2b2fa58532c9bf6ed 100644 --- a/src/ledflasher/ledflasher.cpp +++ b/src/ledflasher/ledflasher.cpp @@ -27,7 +27,7 @@ #include "animation.h" #include "ledservice/dbus-proxies.h" -using com::android::LEDService::ServiceProxy; +using com::android::LEDService::ServiceProxyInterface; class Daemon final : public brillo::DBusDaemon { public: @@ -37,7 +37,7 @@ class Daemon final : public brillo::DBusDaemon { int OnInit() override; private: - void OnLEDServiceConnected(ServiceProxy* service); + void OnLEDServiceConnected(ServiceProxyInterface* service); void OnLEDServiceDisconnected(const dbus::ObjectPath& object_path); // Particular command handlers for various commands. @@ -58,7 +58,7 @@ class Daemon final : public brillo::DBusDaemon { std::string status_{"idle"}; // LED service interface. - ServiceProxy* led_service_{nullptr}; + ServiceProxyInterface* led_service_{nullptr}; // Current animation; std::unique_ptr<Animation> animation_; @@ -93,7 +93,7 @@ int Daemon::OnInit() { return EX_OK; } -void Daemon::OnLEDServiceConnected(ServiceProxy* service) { +void Daemon::OnLEDServiceConnected(ServiceProxyInterface* service) { led_service_ = service; UpdateDeviceState(); }