Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

  1. //
  2. // MODULE: SNIFFCONNECTOR.H
  3. //
  4. // PURPOSE: sniffing connection class
  5. //
  6. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  7. //
  8. // AUTHOR: Oleg Kalosha
  9. //
  10. // ORIGINAL DATE: 12-11-98
  11. //
  12. // NOTES: This is base abstract class which describes connection of
  13. // CSniff class to module(s), which are able to call sniffing
  14. // scripts.
  15. //
  16. // Version Date By Comments
  17. //--------------------------------------------------------------------
  18. // V3.2 12-11-98 OK
  19. //
  20. #if !defined(AFX_SNIFFCONNECTOR_H__49F470BA_6F6A_11D3_8D39_00C04F949D33__INCLUDED_)
  21. #define AFX_SNIFFCONNECTOR_H__49F470BA_6F6A_11D3_8D39_00C04F949D33__INCLUDED_
  22. #if _MSC_VER > 1000
  23. #pragma once
  24. #endif // _MSC_VER > 1000
  25. #include "Stateless.h"
  26. ////////////////////////////////////////////////////////////////////////////////////
  27. // CSniffConnector
  28. // this class is enabling topic-related CSniff class use capabilities of programm
  29. // to invoke actual sniffing scripts
  30. ////////////////////////////////////////////////////////////////////////////////////
  31. class CSniffConnector
  32. {
  33. CStatelessPublic m_Stateless;
  34. public:
  35. CSniffConnector() {}
  36. virtual ~CSniffConnector() {}
  37. public:
  38. long PerformSniffing(CString strNodeName, CString strLaunchBasis, CString strAdditionalArgs);
  39. protected:
  40. // PURE virtual
  41. virtual long PerformSniffingInternal(CString strNodeName, CString strLaunchBasis, CString strAdditionalArgs) =0;
  42. };
  43. inline long CSniffConnector::PerformSniffing(CString strNodeName, CString strLaunchBasis, CString strAdditionalArgs)
  44. {
  45. m_Stateless.Lock(__FILE__, __LINE__);
  46. long ret = PerformSniffingInternal(strNodeName, strLaunchBasis, strAdditionalArgs);
  47. m_Stateless.Unlock();
  48. return ret;
  49. }
  50. #endif // !defined(AFX_SNIFFCONNECTOR_H__49F470BA_6F6A_11D3_8D39_00C04F949D33__INCLUDED_)