Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

MtaIntegrate.hpp 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // \file MtaIntegrate.hpp
  2. //
  3. // Copyright (C) 2011 ARM Research Labs, LLC.
  4. // See www.armresearch.com for the copyright terms.
  5. //
  6. // This file defines the MtaIntegrate interface.
  7. //
  8. // $Id$
  9. //
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////
  11. #ifndef MtaIntegratehpp_included
  12. #define MtaIntegratehpp_included
  13. #include <string>
  14. #include "Utility.hpp"
  15. #include "FileBackup.hpp"
  16. /// Base class to manage a Sniffer integration with an MTA.
  17. //
  18. // This class defines the interface to integrate and unintegrate with an MTA.
  19. //
  20. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  21. class MtaIntegrate : public Utility {
  22. public:
  23. /// Constructor.
  24. MtaIntegrate();
  25. /// Specifies the operating system type.
  26. //
  27. // \param[in] OperatingSystemType is the value of SNF_OSTYPE
  28. // specified when configuring sniffer for *nix, or "Windows".
  29. //
  30. virtual void SetOperatingSystem(std::string OperatingSystemType) = 0;
  31. /// Integrate with the MTA.
  32. //
  33. // If the MTA is already integrated, this method takes no action.
  34. // Otherwise, the MTA is integrated with Sniffer, and the MTA
  35. // configuration is reloaded if the MTA is running.
  36. //
  37. // \param[in] SaveFile is the object to back up any configuration
  38. // files.
  39. //
  40. virtual void Integrate(FileBackup *SaveFile) = 0;
  41. /// Unintegrate with the MTA.
  42. //
  43. // If the MTA is not integrated, this method takes no action.
  44. // Otherwise, the MTA is unintegrated with Sniffer, and the MTA
  45. // configuration is reloaded if the MTA is running.
  46. //
  47. // \param[in] SaveFile is the object to back up any configuration
  48. // files.
  49. //
  50. virtual void Unintegrate(FileBackup *SaveFile) = 0;
  51. private:
  52. /// Check whether the MTA is determined to be running.
  53. //
  54. // \return true if the MTA is determined to be running. If the
  55. // MTA is not running, or the running status cannot be determined,
  56. // the return value is false.
  57. //
  58. virtual bool MtaIsRunningDetected() = 0;
  59. /// Reload the MTA configuration.
  60. //
  61. // This method causes the MTA to reload its configuration.
  62. //
  63. // \return true if the MTA successfully reloaded its
  64. // configuration, false otherwise.
  65. //
  66. virtual bool ReloadMta() = 0;
  67. /// Determine whether the MTA is integrated.
  68. virtual bool IsIntegrated() = 0;
  69. };
  70. #endif