33 lines
818 B
C++
33 lines
818 B
C++
#ifndef DISTRIBUTION_SERVICE_TERMINAL_H
|
|
#define DISTRIBUTION_SERVICE_TERMINAL_H
|
|
#include "CCJSONObject.h"
|
|
#include "CCString.h"
|
|
#include "TL/Map.h"
|
|
|
|
class Terminal {
|
|
JSON_TYPE_INTRUSIVE(Terminal,ID,IP,Port,StreamPort,Status,Music,Ver,TermDriveNumber);
|
|
static CTL::Map<int, Terminal*> Term_map;
|
|
public:
|
|
int ID = 1;
|
|
int Port = 10058;
|
|
int StreamPort = 10062;
|
|
int Status = 0;
|
|
int Vol = 8;
|
|
int Ver = 0;
|
|
int TermDriveNumber = 0;
|
|
int Heartbeat = 0;
|
|
CTL::String IP = "";
|
|
CTL::String Music = "";
|
|
private:
|
|
static void upStatus();
|
|
public:
|
|
static void Init();
|
|
static Terminal* getData(int ID);
|
|
static void addData(Terminal* data);
|
|
static CCVector<int> getTermList();
|
|
static CCVector<Terminal> getTermList_T();
|
|
static CTL::String toTermInfo();
|
|
};
|
|
|
|
|
|
#endif |