// SKOKODoc.h : interface of the CSKOKODoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SKOKODOC_H__209A765A_B930_4A65_B675_50CEC85B946F__INCLUDED_)
#define AFX_SKOKODOC_H__209A765A_B930_4A65_B675_50CEC85B946F__INCLUDED_

#include "NovellDirListDlg.h"  // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "FileListing.h"
#include "AssignationDlg.h"	// Added by ClassView
#include "DiskSpaceDlg.h"	// Added by ClassView

class CSKOKOView;
class CErrView;

class CSKOKODoc : public CDocument
{
friend class CListRefreshDlg;
protected: // create from serialization only
  CSKOKODoc();
  DECLARE_DYNCREATE(CSKOKODoc)

// Attributes
public:

  const CString& Owner( void ) const;

// Operations
public:
  void RefreshFileList( void );
  void SetOwner( LPCTSTR newOwner );
  void Clear( void );

// Overrides
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CSKOKODoc)
	public:
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	//}}AFX_VIRTUAL

// Implementation
public:
	void RefreshErrView( void );
	void AddErrorInfo( const CFileInfo& info );
	void UpdateFileInfo( int n, const CFileInfo& fi );
	int GetFileCount( void ) const;
	void GetErrorInfo( int n, CFileInfo* pInfo ) const;
	int GetErrorCount( void ) const;
	void GetFileInfo(int n, CFileInfo* pInfo) const;
  virtual ~CSKOKODoc();
#ifdef _DEBUG
  virtual void AssertValid() const;
  virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
  //{{AFX_MSG(CSKOKODoc)
  afx_msg void OnViewRefresh();
  afx_msg void OnFileSaveErrLog();
  afx_msg void OnFileSaveValidLog();
  afx_msg void OnUpdateFileSaveErrLog(CCmdUI* pCmdUI);
  afx_msg void OnUpdateFileSaveValidLog(CCmdUI* pCmdUI);
  afx_msg void OnUpdateViewRefresh(CCmdUI* pCmdUI);
	afx_msg void OnOperationScan();
	afx_msg void OnOperationAssignation();
	afx_msg void OnUpdateOperationAssignation(CCmdUI* pCmdUI);
	afx_msg void OnOperationAutomat();
	afx_msg void OnUpdateOperationAutomat(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFileOpen(CCmdUI* pCmdUI);
	//}}AFX_MSG
  DECLARE_MESSAGE_MAP()

private:
	CDiskSpaceDlg m_diskSpaceDlg;
  void GetOwners( void );
	void AssignFilesInDir( void );
  void AssignAllFiles( void );
  void AssignSelectedFiles( void );
	void AutoRepair( void );
	void ScanDir( void );
	CAssignationDlg m_assignDlg;
  BOOL CheckDiskSpace( LPCTSTR path );
  CSKOKOView* GetFileView( void );
  CErrView* GetErrView( void );
  void RefreshOwnerCombo( void );
  BOOL m_dirSelected;
  CString m_currentDir;
  CString m_owner;
  CNovellDirListDlg m_dirListDlg;
  CFileListing m_fileListing;
  BGDNet::Context m_ctx;
};

inline
const CString& CSKOKODoc::Owner( void ) const
{
  return m_owner;
}

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SKOKODOC_H__209A765A_B930_4A65_B675_50CEC85B946F__INCLUDED_)
