/*
*******************************************************************************
* Copyright (c) 1996-97 Digi International Inc., All Rights Reserved          *
*                                                                             *
* This  software  contains  proprietary  and  confidential   information   of *
* Digi International  Inc.   By  accepting  transfer  of this copy, Recipient *
* agrees to retain this software in  confidence,  to  prevent  disclosure  to *
* others,  and  to make no  use of this software other than that for which it *
* was delivered.  This is an unpublished copyright work  Digi   International *
* Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is *
* strictly prohibited.                                                        *
*                                                                             *
* Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc. *
* Confidential  when   combined   with   the   aggregated  modules  for  this *
* product) OBJECT CODE ONLY SOURCE MATERIALS                                  *
*                                                                             *
* (C) COPYRIGHT Digi International Inc. 1996-97                               *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************

// DiagDoc.h : interface of the CDiagDoc class
//
/////////////////////////////////////////////////////////////////////////////

Revision History:

   $History: DiagDoc.h $
 * 
 * *****************  Version 16  *****************
 * User: Mikez        Date: 7/11/97    Time: 5:01p
 * Branched in $/Components/Windows/NT/Sync/Build/Diag
 * 
 * *****************  Version 15  *****************
 * User: Rodgerb      Date: 1/27/97    Time: 1:18p
 * Updated in $/Components/Windows/NT/Sync/rev2diag
 * 1) documentation
 * 2) added some new params to Physical layer stats
*/

enum
{
	uavFrameListSelChange =			0x01,
	uavFrameListRepSelChange =	0x02,
	uavFrameTreeSelChange =			0x04,
	uavTreeTreeSelChange =			0x08,
	uavByteViewSelChange =			0x10
};

// trace capture view topic IDs
enum eCaptureViewTopicID
{
	cvtidListView = 0x5006B,
	cvtidTreeView = 0x5006C,
	cvtidByteView = 0x5006D
};

class CMyArchive : public CArchive
{
public:
	CMyArchive(CFile* pFile, UINT nMode, int nBufSize = 4096, void* lpBuf = NULL) :
		CArchive(pFile, nMode, nBufSize, lpBuf) {};

	CObject* ReadObject(const CRuntimeClass* pClass);
};

class CDataSourceView;
class CDiagDoc : public CDocument
{
	CTraceData *m_TraceData;
	CTraceMiniFrame *m_Properties;

protected: // create from serialization only
	CDiagDoc();
	DECLARE_DYNCREATE(CDiagDoc)
	CTraceData *GetTraceData() { return m_TraceData; };

// Attributes
public:
	const CTraceData *GetTraceData() const { return m_TraceData; };
	BOOL IsMyFrame(CTraceMiniFrame *pFrame) const { return m_Properties == pFrame; };
// Operations
public:
	void SetTraceData(CTraceData *td) { m_TraceData = td; };
	void SetProperties(CTraceMiniFrame *prop) { m_Properties = prop; };

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDiagDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	virtual void SetTitle(LPCTSTR lpszTitle);
	//}}AFX_VIRTUAL
	void Serialize(CMyArchive& ar);

// Implementation
public:
	virtual ~CDiagDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CDiagDoc)
	afx_msg void OnCaptureSummaryinfo();
	afx_msg void OnUpdateCaptureSummaryinfo(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFileSaveAs(CCmdUI* pCmdUI);
	afx_msg void OnTracecaptureTracestatistics();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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