mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-22 07:14:15 +08:00
Feature: refactor ClientList and add dialog to show it
This commit is contained in:
53
server/2015Remote/context.h
Normal file
53
server/2015Remote/context.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/header.h"
|
||||
#include "common/commands.h"
|
||||
#include <atlstr.h>
|
||||
|
||||
enum {
|
||||
ONLINELIST_IP = 0, // IP<49><50><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
||||
ONLINELIST_ADDR, // <20><>ַ
|
||||
ONLINELIST_LOCATION, // <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
ONLINELIST_COMPUTER_NAME, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><>ע
|
||||
ONLINELIST_OS, // <20><><EFBFBD><EFBFBD>ϵͳ
|
||||
ONLINELIST_CPU, // CPU
|
||||
ONLINELIST_VIDEO, // <20><><EFBFBD><EFBFBD>ͷ(<28><><EFBFBD><EFBFBD>)
|
||||
ONLINELIST_PING, // PING(<28>Է<EFBFBD><D4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
ONLINELIST_VERSION, // <20>汾<EFBFBD><E6B1BE>Ϣ
|
||||
ONLINELIST_INSTALLTIME, // <20><>װʱ<D7B0><CAB1>
|
||||
ONLINELIST_LOGINTIME, // <20><EFBFBD><EEB6AF><EFBFBD><EFBFBD>
|
||||
ONLINELIST_CLIENTTYPE, // <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ONLINELIST_PATH, // <20>ļ<EFBFBD>·<EFBFBD><C2B7>
|
||||
ONLINELIST_PUBIP,
|
||||
ONLINELIST_MAX,
|
||||
};
|
||||
|
||||
class context
|
||||
{
|
||||
public:
|
||||
// <20><><EFBFBD>麯<EFBFBD><E9BAAF>
|
||||
virtual VOID InitMember(SOCKET s, VOID* svr) = 0;
|
||||
virtual BOOL Send2Client(PBYTE szBuffer, ULONG ulOriginalLength) = 0;
|
||||
virtual CString GetClientData(int index)const = 0;
|
||||
virtual void GetAdditionalData(CString(&s)[RES_MAX]) const = 0;
|
||||
virtual CString GetAdditionalData(int index) const = 0;
|
||||
virtual uint64_t GetClientID() const = 0;
|
||||
virtual std::string GetPeerName() const = 0;
|
||||
virtual int GetPort() const = 0;
|
||||
virtual std::string GetProtocol() const = 0;
|
||||
virtual int GetServerPort() const = 0;
|
||||
virtual FlagType GetFlagType() const = 0;
|
||||
virtual std::string GetGroupName() const = 0;
|
||||
virtual uint64_t GetAliveTime()const = 0;
|
||||
public:
|
||||
virtual ~context() {}
|
||||
virtual void Destroy() {}
|
||||
virtual BOOL IsLogin() const
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
virtual bool IsEqual(context* ctx) const
|
||||
{
|
||||
return this == ctx || this->GetPort() == ctx->GetPort();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user