#ifndef TJD_UI_APP_OTA_PRESENTER_H #define TJD_UI_APP_OTA_PRESENTER_H #include "Presenter.h" #include "components/ui_slider.h" #include "components/ui_view.h" #include "graphic_timer.h" #include "components/root_view.h" #include #include "TjdUiAppIds.h" #include "NativeAbility.h" namespace TJD { #define BTN_OTA_UPGRADE_ID "OtaUpgrade" #define BTN_OTA_INTERRUPT_ID "Otainterrupt" #define BTN_OTA_FAIL_ID "Otafail" #define BTN_OTA_ENTER_ID "OtaEnter" #define BTN_OTA_KNOB_ID "OtaKonb" class TjdUiAppOtaView; class TjdUiAppOtaPresenter : public OHOS::Presenter, public OHOS::UIView::OnClickListener, public OHOS::UIView::OnDragListener, public OHOS::RootView::OnKeyActListener { public: TjdUiAppOtaPresenter(); virtual ~TjdUiAppOtaPresenter(); static TjdUiAppOtaPresenter *GetInstance(void); void OnStart() override; void OnPause() override; void OnResume() override; void OnStop() override; bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event); bool OnDragStart(OHOS::UIView &view, const OHOS::DragEvent &event); bool OnDrag(OHOS::UIView &view, const OHOS::DragEvent &event); bool OnDragEnd(OHOS::UIView &view, const OHOS::DragEvent &event); bool OnKeyAct(OHOS::UIView& view, const OHOS::KeyEvent& event); private: bool UpgrateStart{false}; }; }//tjd #endif