BackendClient.h

00001 /* START_LICENSE_HEADER
00002 
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001 Replica Software
00005 
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009 
00010 END_LICENSE_HEADER */
00011 #ifndef _BACKENDCLIENT_H_
00012 #define _BACKENDCLIENT_H_
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014 #include "RNPlatform/Inc/Encryption.h"
00015 #include "RNPlatform/Inc/ThreadClass.h"
00016 #include "RNPlatform/Inc/Thread.h"
00017 #include "RNXPSockets/Inc/XPSockets.h"
00018 #include "RNLobby/Inc/BackendServer.h"
00019 
00020 namespace RNReplicaNet
00021 {
00022 
00023 namespace RNLobby
00024 {
00025 
00032 class BackendClient : public BaseServer
00033 {
00034 public:
00035     BackendClient();
00036     virtual ~BackendClient();
00037 
00041     bool Start(const int titleID,const char *encryptionKey);
00042 
00045     bool GetCompleted(void);
00046 
00049     BackendServer::Reply GetReply(void) const;
00050 
00051     virtual void CallbackCompleted(void) {}
00052 
00054     virtual bool CallbackServerAddress(XPAddress &address);
00055 
00058     static void DisableValidateOrderingCheck(void);
00059 
00060     static bool IsAuthenticated(void);
00061 
00062 private:
00063     bool CallbackParseValidMessage(DynamicMessageHelper &message,const size_t length,const XPAddress &address);
00064 
00065     void CleanQuery(void);
00066 
00067     bool CallbackPoll(void);
00068 
00069     BackendServer::Reply mReply;
00070     int mTitleID;
00071     std::string mEncryptionKey;
00072 
00073     XPAddress mAddress;
00074 
00075     float mLastSentTime;
00076     int mTries;
00077     bool mAddressGot;
00078 };
00079 
00080 } // namespace RNLobby
00081 
00082 } // namespace RNReplicaNet
00083 
00084 #endif

Generated on Sat Jun 28 22:02:16 2008 for ReplicaNet and RNLobby by  doxygen 1.5.3