FileZillaIntern.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //---------------------------------------------------------------------------
  2. #include "stdafx.h"
  3. //---------------------------------------------------------------------------
  4. #include "FileZillaIntern.h"
  5. #include "FileZillaIntf.h"
  6. //---------------------------------------------------------------------------
  7. #pragma package(smart_init)
  8. //---------------------------------------------------------------------------
  9. TFileZillaIntern::TFileZillaIntern(TFileZillaIntf * AOwner) :
  10. FOwner(AOwner)
  11. {
  12. // not being initialied by CApiLog
  13. m_nLogMessage = 0;
  14. }
  15. //---------------------------------------------------------------------------
  16. BOOL TFileZillaIntern::PostMessage(HWND hWnd, UINT Msg, WPARAM wParam,
  17. LPARAM lParam) const
  18. {
  19. ASSERT(hWnd == NULL);
  20. ASSERT(Msg == 0);
  21. bool Result;
  22. unsigned int MessageID = FZ_MSG_ID(wParam);
  23. switch (MessageID)
  24. {
  25. case FZ_MSG_STATUS:
  26. case FZ_MSG_ASYNCREQUEST:
  27. case FZ_MSG_LISTDATA:
  28. case FZ_MSG_TRANSFERSTATUS:
  29. case FZ_MSG_REPLY:
  30. case FZ_MSG_CAPABILITIES:
  31. Result = FOwner->PostMessage(wParam, lParam);
  32. break;
  33. // ignored for performace
  34. case FZ_MSG_SOCKETSTATUS:
  35. Result = false;
  36. break;
  37. // ignore
  38. // not useful. although FTP allows switching between secure and unsecure
  39. // connection during session, filezilla does not support it,
  40. // so we are either secure or not for whole session
  41. case FZ_MSG_SECURESERVER:
  42. ASSERT(lParam == 0);
  43. Result = false;
  44. break;
  45. // should never get here, call compiled out in filezilla code
  46. case FZ_MSG_QUITCOMPLETE:
  47. default:
  48. ASSERT(FALSE);
  49. Result = false;
  50. break;
  51. }
  52. return (Result ? TRUE : FALSE);
  53. }
  54. //---------------------------------------------------------------------------