Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

MtaIntegrate.hpp 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 does nothing.
  34. //
  35. // \param[in] SaveFile is the object to back up any configuration
  36. // files.
  37. //
  38. virtual void Integrate(FileBackup *SaveFile) = 0;
  39. /// Unintegrate with the MTA.
  40. //
  41. // If the MTA is not integrated, this method does nothing.
  42. //
  43. // \param[in] SaveFile is the object to back up any configuration
  44. // files.
  45. //
  46. virtual void Unintegrate(FileBackup *SaveFile) = 0;
  47. /// Check whether the MTA is determined to be running.
  48. //
  49. // \return true if the MTA is determined to be running. If the
  50. // MTA is not running, or the running status cannot be determined,
  51. // the return value is false.
  52. //
  53. virtual bool MtaIsRunningDetected() = 0;
  54. /// Reload the MTA configuration.
  55. //
  56. // This method causes the MTA to reload its configuration.
  57. //
  58. // \return true if the MTA successfully reloaded its
  59. // configuration, false otherwise.
  60. //
  61. virtual bool ReloadMta() = 0;
  62. private:
  63. /// Determine whether the MTA is integrated.
  64. virtual bool IsIntegrated() = 0;
  65. };
  66. #endif