 |
Diarkis C++Client Library API Document
|
Go to the documentation of this file.
13 #include "logging/LoggerFactory.h"
55 virtual void SetupTcpMatchMaker(
const std::shared_ptr<IDiarkisTcp>& tcp,
const std::shared_ptr<LoggerFactory>& loggerFactory);
71 virtual void SetupUdpMatchMaker(
const std::shared_ptr<IDiarkisUdp>& udp,
72 const std::shared_ptr<LoggerFactory>& loggerFactory,
73 const std::shared_ptr<DiarkisP2PBase>& p2pBase);
83 void SetRoomModule(
const std::shared_ptr<IDiarkisRoom>& room);
117 virtual bool SendHostMatchmaking(
const char* uid,
120 const char* profileID,
123 size_t conditionsCount,
124 const uint8_t* metadata,
134 virtual bool SendHostMatchmaking(
const std::string& uid,
137 const std::string& profileID,
138 const std::string& tag,
139 const std::vector<MatchMakerCondition>& conditions,
140 const std::vector<uint8_t>& metadata,
151 virtual void SendAbortMatchmaking(
void);
167 virtual void SendDisbandMatchmaking(
const uint8_t* message,
size_t messageSize);
175 virtual void SendDisbandMatchmaking(
const std::vector<uint8_t>& message);
191 virtual void SendClaimReservedMatchmaking(
const uint8_t* message,
size_t messageSize);
199 virtual void SendClaimReservedMatchmaking(
const std::vector<uint8_t>& message);
215 virtual void SendJoinMatchmakingFromResult(
MatchMakerResultItem& result,
const uint8_t* message,
size_t messageSize);
223 virtual void SendJoinMatchmakingFromResult(
MatchMakerResultItem& result,
const std::vector<uint8_t>& message);
237 virtual void SendLeaveMatchmaking(
const uint8_t* message,
size_t messageSize);
245 virtual void SendLeaveMatchmaking(
const std::vector<uint8_t>& message);
259 virtual void SendSync(
const uint8_t* message,
size_t messageSize);
267 virtual void SendSync(
const std::vector<uint8_t>& message);
279 virtual void SendNotifyMatchmakingCompletion(
void);
299 virtual void SendP2PAddressSync(uint8_t linkedClients = 0);
329 virtual void SendSearch(
const char** profileIDs,
330 size_t profileIDsCount,
333 size_t conditionsCount,
336 const uint8_t* message,
345 virtual void SendSearch(
const std::vector<std::string>& profileIDs,
346 const std::string& tag,
347 const std::vector<MatchMakerCondition>& conditions,
350 const std::vector<uint8_t>& message);
364 virtual bool SendStartBackfill(
const char* roomID);
372 virtual bool SendStartBackfill(
const std::string& roomID);
390 virtual bool SendKick(
const char* userID);
398 virtual bool SendKick(
const std::string& userID);
433 virtual bool SendHostTeamMatchmaking(
const char* uid,
436 const char* profileID,
439 size_t conditionsCount,
440 const uint8_t* metadata,
450 virtual bool SendHostTeamMatchmaking(
const std::string& uid,
453 const std::string& profileID,
454 const std::string& tag,
455 const std::vector<MatchMakerCondition>& conditions,
456 const std::vector<uint8_t>& metadata,
487 virtual void SendSearchTeamMatchmaking(
const char** profileIDs,
488 size_t profileIDsCount,
491 size_t conditionsCount,
494 const uint8_t* message,
503 virtual void SendSearchTeamMatchmaking(
const std::vector<std::string>& profileIDs,
504 const std::string& tag,
505 const std::vector<MatchMakerCondition>& conditions,
508 const std::vector<uint8_t>& message);
526 virtual void SendCommit(
void);
540 virtual void SendIssueTicket(uint8_t ticketType);
552 virtual void SendTicketCancel(uint8_t ticketType);
568 virtual void SendTicketBroadcast(uint8_t ticketType,
const uint8_t* message,
size_t messageSize);
576 virtual void SendTicketBroadcast(uint8_t ticketType,
const std::vector<uint8_t>& message);
588 virtual void SendTicketLeave(uint8_t ticketType);
612 bool IsComplete(
void);
620 bool IsGotoRoom(
void);
628 void ResetGotoRoom(
void);
636 void ClearList(
void);
660 bool IsTicketComplete(
void);
668 bool IsTicketCancel(
void);
692 void SetOwnUID(
const char* uid);
700 void SetOwnUID(
const std::string& uid);
791 virtual void OnComplete(
void);
1005 std::shared_ptr<IDiarkisMatchMaker>
mm_;
bool bTicketComplete_
Whether ticket matching has been completed.
Definition: DiarkisMatchMakerBase.h:1133
std::shared_ptr< DiarkisP2PBase > p2pBase_
Pointer to DiarkisP2PBase class.
Definition: DiarkisMatchMakerBase.h:1037
std::shared_ptr< IDiarkisLogger > logger_
Pointer to IDiarkisLogger class.
Definition: DiarkisMatchMakerBase.h:1045
Arguments of the callback event to be called when TicketCancel push is received.
Definition: eventArgs.h:1666
std::recursive_mutex list_mutex_
list mutex
Definition: DiarkisMatchMakerBase.h:1093
Diarkis::StdVector< Diarkis::StdString > teamMemberLists_
User ID list of team matched members.
Definition: DiarkisMatchMakerBase.h:1109
bool bTicketCancel_
Whether matching by ticket was cancelled.
Definition: DiarkisMatchMakerBase.h:1149
Arguments of the callback event called when a payload is sent or received.
Definition: eventArgs.h:252
Argument of the callback event called when MatchMaker's Search or TeamSearch is executed.
Definition: eventArgs.h:1742
Diarkis::StdString ticketMessage_
Message when matching by ticket is completed.
Definition: DiarkisMatchMakerBase.h:1141
DiarkisTransportType
Protocol type.
Definition: transport.h:27
Arguments of the callback event called when MatchMaker response is received.
Definition: eventArgs.h:1598
Base class that wraps the IDiarkisMatchMaker class for easy use of MatchMaker functionality.
Definition: DiarkisMatchMakerBase.h:24
Definition: directMessage.h:16
Diarkis::StdVector< std::function< void()> > eventUnsubscriptions_
Lambda function control list.
Definition: DiarkisMatchMakerBase.h:1053
Search condition for matchmaking.
Definition: matchMaker.h:25
Arguments of the callback event called when MatchMaker push is received.
Definition: eventArgs.h:1642
Structure to contain MatchMaker search results.
Definition: eventArgs.h:64
Diarkis::StdString myUid_
My user ID.
Definition: DiarkisMatchMakerBase.h:1069
std::shared_ptr< IDiarkisRoom > room_
Pointer to IDiarkisRoom class.
Definition: DiarkisMatchMakerBase.h:1029
bool bComplete_
Whether matching has been completed.
Definition: DiarkisMatchMakerBase.h:1117
Argument of the callback event called when a UDP or TCP Response is received.
Definition: eventArgs.h:1365
std::shared_ptr< IDiarkisMatchMaker > mm_
Pointer to IDiarkisMatchMaker class.
Definition: DiarkisMatchMakerBase.h:1005
Arguments of the callback event called when start P2P connection.
Definition: eventArgs.h:1817
Diarkis::StdString ownerUid_
Matching owner's user ID.
Definition: DiarkisMatchMakerBase.h:1077
Arguments of the callback event called when MatchMaker Join response is received.
Definition: eventArgs.h:1690
std::shared_ptr< IDiarkisUdp > udp_
Pointer to IDiarkisUdp class.
Definition: DiarkisMatchMakerBase.h:1021
Diarkis::StdString ticketBroadcastMessage_
Message received on TicketBroadcast.
Definition: DiarkisMatchMakerBase.h:1085
Arguments of the callback event called when MatchMaker host has changed.
Definition: eventArgs.h:1794
Diarkis::StdVector< uint8_t > Buff_
Buffer for transmission.
Definition: DiarkisMatchMakerBase.h:1061
Argument of the callback event called when MatchMaker's HostMatchmaking or TeamHostMatchmaking is exe...
Definition: eventArgs.h:1546
bool bTeamMatchOwner_
Whether the owner who issued the TeamMatch Host or Search.
Definition: DiarkisMatchMakerBase.h:1157
Diarkis::StdVector< Diarkis::StdString > memberLists_
User ID list of matched members.
Definition: DiarkisMatchMakerBase.h:1101
#define DIARKIS_API
Definition: common.h:47
std::shared_ptr< IDiarkisTcp > tcp_
Pointer to IDiarkisTcp class.
Definition: DiarkisMatchMakerBase.h:1013
bool bGotoRoom_
Whether or not a message wasent to move to the game scene.
Definition: DiarkisMatchMakerBase.h:1125
Argument of the callback event called when a UDP or TCP Push is received.
Definition: eventArgs.h:1316