ObserverNotification.h
资源名称:rnso.zip [点击查看]
上传用户:lianquan
上传日期:2007-01-02
资源大小:197k
文件大小:2k
源码类别:
ActiveX/DCOM/ATL
开发平台:
Visual C++
- // ObserverNotification.h: interface for the ObserverNotification class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_)
- #define AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- class AFX_EXT_CLASS ObserverNotification
- {
- public:
- byte * m_pBytes;
- long m_nSize;
- DWORD m_dwSenderObject;
- ObserverNotification(DWORD dwSenderObject,byte * pBytes = NULL,long nSize = 0);
- ~ObserverNotification();
- };
- class AFX_EXT_CLASS CNotificationFromManager
- {
- public:
- enum
- {
- NOTIFY,
- NOTIFY_SUBJECTBROKEN
- };
- short m_nType;
- };
- class AFX_EXT_CLASS CNotificationFromManagerNOTIFY:public CNotificationFromManager
- {
- public:
- ObserverNotification * m_pNotificationData;
- CNotificationFromManagerNOTIFY(DWORD dwSenderSubject=0,byte * pBytes = NULL,long nSize = 0)
- {
- m_nType = NOTIFY;
- m_pNotificationData=new ObserverNotification(dwSenderSubject,pBytes,nSize);
- }
- ~CNotificationFromManagerNOTIFY()
- {
- delete m_pNotificationData;
- }
- };
- class AFX_EXT_CLASS CNotificationFromManagerNOTIFY_SUBJECTBROKEN:public CNotificationFromManager
- {
- public:
- CNotificationFromManagerNOTIFY_SUBJECTBROKEN(DWORD dwSubjectID)
- {
- m_nType = NOTIFY_SUBJECTBROKEN;
- m_dwSubjectID = dwSubjectID;
- }
- DWORD m_dwSubjectID;
- };
- #endif // !defined(AFX_OBSERVERNOTIFICATION_H__B99C427E_5ADE_11D2_A94E_FAA2A7000000__INCLUDED_)