AutopatcherClientGFx3Impl.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. #include "RakNetTypes.h"
  11. #include "FxGameDelegate.h"
  12. namespace RakNet {
  13. class AutopatcherClient;
  14. class FileListTransfer;
  15. class PacketizedTCP;
  16. // GFxPlayerTinyD3D9.cpp has an instance of this class, and callls the corresponding 3 function
  17. // This keeps the patching code out of the GFx sample as much as possible
  18. class AutopatcherClientGFx3Impl : public FxDelegateHandler
  19. {
  20. public:
  21. AutopatcherClientGFx3Impl();
  22. ~AutopatcherClientGFx3Impl();
  23. void Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie);
  24. void Update(void);
  25. void Shutdown(void);
  26. // Callback from flash
  27. static void PressedConnect(const FxDelegateArgs& pparams);
  28. static void PressedOKBtn(const FxDelegateArgs& pparams);
  29. static void PressedPatch(const FxDelegateArgs& pparams);
  30. static void OpenSite(const FxDelegateArgs& pparams);
  31. // Update all callbacks from flash
  32. void Accept(CallbackProcessor* cbreg);
  33. const char* Connect(const char *ip, unsigned short port);
  34. void UpdateConnectResult(bool isConnected);
  35. void SaveLastUpdateDate(void);
  36. void LoadLastUpdateDate(double *out, const char *appDir);
  37. void GotoMainMenu(void);
  38. AutopatcherClient *autopatcherClient;
  39. FileListTransfer *fileListTransfer;
  40. PacketizedTCP *packetizedTCP;
  41. SystemAddress serverAddress;
  42. char pathToThisExe[512];
  43. char appDirectory[512];
  44. GPtr<FxDelegate> delegate;
  45. GPtr<GFxMovieView> movie;
  46. };
  47. } // namespace RakNet
粤ICP备19079148号