1
0

Options.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //---------------------------------------------------------------------------
  2. #include "stdafx.h"
  3. #include <Options.h>
  4. #include <FileZillaIntern.h>
  5. #include <FileZillaIntf.h>
  6. //---------------------------------------------------------------------------
  7. CString COptions::GetInstanceOption(CApiLog * Instance, int OptionID)
  8. {
  9. ASSERT(Instance);
  10. ASSERT(dynamic_cast<TFileZillaIntern *>(Instance) != NULL);
  11. TFileZillaIntern * Intern = (TFileZillaIntern *)Instance;
  12. const TFileZillaIntf * Intf = Intern->GetOwner();
  13. ASSERT(Intf != NULL);
  14. CString Result = Intf->Option(OptionID);
  15. switch (OptionID)
  16. {
  17. case OPTION_PROXYPASS:
  18. case OPTION_FWPASS:
  19. Result = CCrypt::encrypt(Result);
  20. break;
  21. }
  22. return Result;
  23. }
  24. //---------------------------------------------------------------------------
  25. int COptions::GetInstanceOptionVal(CApiLog * Instance, int OptionID)
  26. {
  27. ASSERT(Instance);
  28. ASSERT(dynamic_cast<TFileZillaIntern *>(Instance) != NULL);
  29. TFileZillaIntern * Intern = (TFileZillaIntern *)Instance;
  30. const TFileZillaIntf * Intf = Intern->GetOwner();
  31. ASSERT(Intf != NULL);
  32. return Intf->OptionVal(OptionID);
  33. }