46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/*
|
|
* Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
|
|
* Description: Reboot Presenter
|
|
* Create: 2022-04-28
|
|
*/
|
|
|
|
#ifndef REBOOT_PRESENTER_H
|
|
#define REBOOT_PRESENTER_H
|
|
|
|
#include "Presenter.h"
|
|
#include "NativeLauncher.h"
|
|
#include "NativeAbility.h"
|
|
|
|
namespace OHOS {
|
|
enum RebootPresenterNum : uint8_t {
|
|
REBOOTVIEW = 0,
|
|
REBOOTDEVICEVIEW,
|
|
SHUTDOWNDEVICEVIEW,
|
|
REBOOT_MAX,
|
|
};
|
|
|
|
#define REBOOT_BUTTON "rebootButton"
|
|
#define SHUTDOWN_BUTTON "shutdownButton"
|
|
#define REBOOTDEVICE_BUTTON "rebootDeviceButton"
|
|
#define SHUTDOWNDEVICE_BUTTON "shutdownDeviceButton"
|
|
|
|
#define REBOOT_VIEW "rebootView"
|
|
#define REBOOTDEVICE_VIEW "rebootDeviceView"
|
|
#define SHUTDOWNDEVICE_VIEW "shutdownDeviceView"
|
|
|
|
class RebootView;
|
|
class RebootPresenter : public Presenter<RebootView>,
|
|
public UIView::OnClickListener,
|
|
public UIView::OnDragListener {
|
|
public:
|
|
RebootPresenter();
|
|
~RebootPresenter();
|
|
static RebootPresenter *GetInstance();
|
|
bool OnClick(UIView& view, const ClickEvent& event) override;
|
|
bool OnDrag(UIView& view, const DragEvent& event) override;
|
|
|
|
private:
|
|
};
|
|
} // namespace OHOS
|
|
#endif
|