40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
|
|
* Description: SettingModel.h
|
|
* Author:
|
|
* Create: 2021-11-23
|
|
*/
|
|
|
|
#ifndef SETTING_MODEL_H
|
|
#define SETTING_MODEL_H
|
|
|
|
#include <cstdint>
|
|
#include <map>
|
|
#include "AppViewIDs.h"
|
|
#include "UiConfig.h"
|
|
#include "SettingItem.h"
|
|
#include "SettingPresenter.h"
|
|
|
|
namespace OHOS {
|
|
static const uint16_t SETTING_ITEM_COUNT = 10;
|
|
class SettingModel {
|
|
public:
|
|
static SettingModel &GetInstance(void);
|
|
void InitSettingItem();
|
|
const SettingItem *GetSettinglistItems() const;
|
|
uint8_t GetSettingListNum() const;
|
|
bool GetBlueToothConnectStatus(void);
|
|
void UpdateBlueToothConnectStatus(bool status);
|
|
private:
|
|
SettingModel();
|
|
SettingModel(const SettingModel &);
|
|
SettingModel &operator=(const SettingModel &);
|
|
virtual ~SettingModel();
|
|
SettingItem settings[SETTING_ITEM_COUNT] = { VIEW_INVALID, nullptr, nullptr, false };
|
|
int usedLen;
|
|
bool btConnectStatus{false};
|
|
};
|
|
}
|
|
|
|
#endif
|