#ifndef BLUETOOTHONLINEDEVICE_H
#define BLUETOOTHONLINEDEVICE_H

#include <QByteArray>

#include <QStringList>

#include <QMap>

#include <qDebug>

class BluetoothOnlineDevice
{
public:
    QByteArray   MAC;

    QByteArray   Singal;

    int SingalInt()
    {
        bool ok;
        Singal.toInt(&ok);
        if(ok)
        {
             return Singal.toInt(&ok);
        }
        else
        {
             return 0;
        }
    }

    QByteArray   Name;

    QString NameStr()
    {
        return QString(Name);
    }

    QString      NameStatus;

    int          UUIDNum;

    QStringList  UUID;

    QString      BOARDDATA;

    int QListIndexLoc;
};

extern QMap <QString,BluetoothOnlineDevice* > BluetoothOnlineMan;

bool BluetoothScanDataDeal(QByteArray tem_MAC,QByteArray tem_Name,QString TemNameStatus);

QString BluetoothGetShowString(QByteArray tem_MAC);

bool BluetoothBoradNameIsChanged(QByteArray tem_MAC,QByteArray temName);

bool BluetoothSignalUpdata(QByteArray tem_MAC,QByteArray tem_Signal);

bool BluetoothIsExist(QByteArray tem_MAC);

void BluetoothBoradDataDeal(QByteArray tem_MAC,QByteArray tem_Signal,QByteArray tem_Name);

void BluetoothAddTheQListIndex(QByteArray tem_MAC,int QListIndex);

QStringList GetBluetoothList();

QByteArray GetBluetoothMAC(int QListIndex);

void ClearTheBuletoothOnlineDeciveQmap();

int BluetoothGetTheQListIndex(QByteArray tem_MAC);

#endif // BLUETOOTHONLINEDEVICE_H
