/* * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved. * Description: BluetoothEarPhone view * Author: * Create: 2021-10-13 */ #ifndef BLUETOOTH_EAR_PHONE_VIEW_H #define BLUETOOTH_EAR_PHONE_VIEW_H #include #include "components/ui_view_group.h" #include "components/ui_label.h" #include "components/ui_label_button.h" #include "components/ui_image_animator.h" #include "ohos_timer.h" #include "graphic_timer.h" #include "BluetoothModel.h" #define BLUETOOTH_SEARCH_IMAGE_NUM 8 namespace OHOS { class BluetoothEarPhoneView { public: BluetoothEarPhoneView(); ~BluetoothEarPhoneView(); static BluetoothEarPhoneView *GetInstance(); UIViewGroup *InitShowUpView(void); void BtEnable(void); void StopBtDiscovery(void); void BtAnimatorStart(void); void BtAnimatorStop(void); void setScanStatus(bool value); bool getScanStatus(void); private: ImageAnimatorInfo searchImageInfo[BLUETOOTH_SEARCH_IMAGE_NUM]; UIViewGroup *group{nullptr}; UILabel *titleLabel{nullptr}; UIImageAnimatorView *imageAnimator{nullptr}; bool scanStart{0}; void BtScanImageAnimator(); }; #ifdef __cplusplus extern "C" { #endif void ScanTimerCallback(int data); void CancelBrScanHandle(void); void EndScanHandle(void); #ifdef __cplusplus } #endif } // namespace OHOS #endif // BLUETOOTH_EAR_PHONE_VIEW_H