-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRoomProcessor.h
More file actions
68 lines (57 loc) · 1.77 KB
/
Copy pathRoomProcessor.h
File metadata and controls
68 lines (57 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef _RoomInfo_Processor_H_
#define _RoomInfo_Processor_H_
//
#include <util/tc_singleton.h>
#include "RoomProto.h"
#include "DBAgentProto.h"
#include "DataProxyProto.h"
#include "Hall.pb.h"
//
using namespace tars;
using namespace std;
using namespace room;
/**
*RoomProcessor
*
*/
class RoomProcessor
{
public:
/**
*
*/
RoomProcessor();
/**
*
*/
~RoomProcessor();
public:
//
int selectMatchRoom(const string& roomIndex, room::MatchRoomInfo& roomInfo);
//
int selectMatchRoomList(const vector<vector<string>>& whlist, vector<room::MatchRoomInfo>& roomInfoList);
//
int selectSelfRoomList(const long lPlayerID ,vector<room::MatchRoomInfo>& roomInfoList);
//
int createMatchRoom(const room::createMatchRoomReq& req, room::createMatchRoomResp& resp);
//
int updateMatchRoom(const room::updateMatchRoomReq& req, room::updateMatchRoomResp& resp);
//
int updateMatchRoomMember(const room::updateRoomMemberReq &req, room::updateRoomMemberResp &resp);
//
int selectMatchRoomMember(const string& roomIndex, vector<room::MemberInfo>& vecMemberInfo);
//
int selectMatchRoomMemberByID(const string& roomIndex, const long uid, room::MemberInfo& memberInfo);
//
int deleteMatchRoomMember(const string& roomIndex);
public:
//
int selectMatchRoomIndexList(const vector<vector<string>>& whlist, vector<string>& vecRoomIndex);
//
int selectSelfRoomIndexList(const long lPlayerID, vector<string>& vecRoomIndex);
//
int parseMemberInfo(const vector<dbagent::TField> &fields, room::MemberInfo &memberInfo);
};
//singleton
typedef TC_Singleton<RoomProcessor, CreateStatic, DefaultLifetime> RoomProcessorSingleton;
#endif