/* ** Command & Conquer Renegade(tm) ** Copyright 2025 Electronic Arts Inc. ** ** This program is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program. If not, see . */ /****************************************************************************** * * FILE * $Archive: /Commando/Code/Commando/WOLQuickMatch.h $ * * DESCRIPTION * * PROGRAMMER * Denzil E. Long, Jr. * $Author: Denzil_l $ * * VERSION INFO * $Revision: 18 $ * $Modtime: 2/20/02 5:07p $ * ******************************************************************************/ #ifndef __WOLQUICKMATCH_H__ #define __WOLQUICKMATCH_H__ #include #include #include #include class WaitCondition; class DlgWOLWaitEvent; class QuickMatchEvent : public TypedEvent { public: enum Event {QMERROR = 0, QMINFO, QMMSG, QMMATCHED, QMUNKNOWN}; Event GetEvent(void) const {return mEvent;} QuickMatchEvent(Event event, const WideStringClass& msg) : TypedEvent(msg), mEvent(event) {} ~QuickMatchEvent() {} private: Event mEvent; }; class WOLQuickMatch : public RefCountClass, public Notifier, public Observer, public Observer { public: static WOLQuickMatch* Create(void); RefPtr ConnectClient(void); RefPtr Disconnect(void); bool SendClientInfo(void); void SendServerInfo(const char* exInfo, const char* topic); DECLARE_NOTIFIER(QuickMatchEvent) protected: WOLQuickMatch(); ~WOLQuickMatch(); bool FinalizeCreate(void); void SendStatus(const wchar_t* statusMsg); void ParseResponse(const wchar_t* message); void HandleNotification(WWOnline::ServerError&); void HandleNotification(WWOnline::ChatMessage&); private: // Prevent copy and assignment WOLQuickMatch(const WOLQuickMatch&); const WOLQuickMatch& operator=(const WOLQuickMatch&); static void ProcessInfo(WOLQuickMatch*, const wchar_t*); static void ProcessError(WOLQuickMatch*, const wchar_t*); static void ProcessStart(WOLQuickMatch*, const wchar_t*); static void ProcessUnknown(WOLQuickMatch*, const wchar_t*); protected: RefPtr mWOLSession; }; #endif // __WOLQUICKMATCH_H__