/////////////////////////////////////////////////////////////////////////////
//
//	Copyright (c) 1996-1998 Microsoft Corporation
//
//	Module Name:
//		Notify.h
//
//	Abstract:
//		Definition of the CNotify class.
//
//	Implementation File:
//		Notify.cpp
//
//	Author:
//		David Potter (davidp)	May 22, 1996
//
//	Revision History:
//
//	Notes:
//
/////////////////////////////////////////////////////////////////////////////

#ifndef _NOTIFY_H_
#define _NOTIFY_H_

/////////////////////////////////////////////////////////////////////////////
// Include Files
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// Forward Class Declarations
/////////////////////////////////////////////////////////////////////////////

class CClusterNotifyKey;
class CClusterNotify;
class CClusterNotifyContext;

/////////////////////////////////////////////////////////////////////////////
// External Class Declarations
/////////////////////////////////////////////////////////////////////////////

class CClusterDoc;
class CClusterItem;

/////////////////////////////////////////////////////////////////////////////
// ClusterNotifyKeyType
/////////////////////////////////////////////////////////////////////////////

enum ClusterNotifyKeyType
{
	cnktUnknown,
	cnktDoc,
	cnktClusterItem
};

/////////////////////////////////////////////////////////////////////////////
// CNotifyKey
/////////////////////////////////////////////////////////////////////////////

class CClusterNotifyKey
{
public:
	CClusterNotifyKey(IN CClusterDoc * pdoc);
	CClusterNotifyKey(IN CClusterItem * pci, IN LPCTSTR pszName);

	ClusterNotifyKeyType	m_cnkt;
	CString					m_strName;
	union
	{
		CClusterDoc *		m_pdoc;
		CClusterItem *		m_pci;
	};

};  //*** class CNotifyKey

typedef CList<CClusterNotifyKey *, CClusterNotifyKey *> CClusterNotifyKeyList;

/////////////////////////////////////////////////////////////////////////////
// CNotify
/////////////////////////////////////////////////////////////////////////////

class CClusterNotify
{
public:
	union
	{
		DWORD_PTR			m_dwNotifyKey;
		CClusterNotifyKey *	m_pcnk;
	};
	DWORD					m_dwFilterType;
	CString					m_strName;

};  //*** class CClusterNotify

typedef CList<CClusterNotify *, CClusterNotify *> CClusterNotifyList;

/////////////////////////////////////////////////////////////////////////////
// CClusterNotifyContext
/////////////////////////////////////////////////////////////////////////////

class CClusterNotifyContext : public CObject
{
	DECLARE_DYNAMIC(CClusterNotifyContext)

public:
	HCHANGE			m_hchangeNotifyPort;
	HWND			m_hwndFrame;

};  //*** class CClusterNotifyContext

/////////////////////////////////////////////////////////////////////////////
// Global Function Prototypes
/////////////////////////////////////////////////////////////////////////////

#ifdef _DEBUG
LPCTSTR PszNotificationName(IN DWORD dwNotification);
#endif // _DEBUG
void DeleteAllItemData(IN OUT CClusterNotifyList & rlp);

/////////////////////////////////////////////////////////////////////////////

#endif // _NOTIFY_H_
