ObserverNotification.h
上传用户:lianquan
上传日期:2007-01-02
资源大小:197k
文件大小:2k
源码类别:

ActiveX/DCOM/ATL

开发平台:

Visual C++

  1. // ObserverNotification.h: interface for the ObserverNotification class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_)
  5. #define AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. class AFX_EXT_CLASS ObserverNotification  
  10. {
  11. public:
  12. byte * m_pBytes;
  13. long m_nSize;
  14. DWORD m_dwSenderObject;
  15. ObserverNotification(DWORD dwSenderObject,byte * pBytes = NULL,long nSize = 0);
  16. ~ObserverNotification();
  17. };
  18. class AFX_EXT_CLASS CNotificationFromManager
  19. {
  20. public:
  21. enum
  22. {
  23. NOTIFY,
  24. NOTIFY_SUBJECTBROKEN
  25. };
  26. short m_nType;
  27. };
  28. class AFX_EXT_CLASS CNotificationFromManagerNOTIFY:public CNotificationFromManager
  29. {
  30. public:
  31. ObserverNotification * m_pNotificationData;
  32. CNotificationFromManagerNOTIFY(DWORD dwSenderSubject=0,byte * pBytes = NULL,long nSize = 0)
  33. {
  34. m_nType = NOTIFY;
  35. m_pNotificationData=new ObserverNotification(dwSenderSubject,pBytes,nSize);
  36. }
  37. ~CNotificationFromManagerNOTIFY()
  38. {
  39. delete m_pNotificationData;
  40. }
  41. };
  42. class AFX_EXT_CLASS CNotificationFromManagerNOTIFY_SUBJECTBROKEN:public CNotificationFromManager
  43. {
  44. public:
  45. CNotificationFromManagerNOTIFY_SUBJECTBROKEN(DWORD dwSubjectID)
  46. {
  47. m_nType = NOTIFY_SUBJECTBROKEN;
  48. m_dwSubjectID = dwSubjectID;
  49. }
  50. DWORD m_dwSubjectID;
  51. };
  52. #endif // !defined(AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_)