Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.9 KiB

  1. // CmdLineInfo.h: interface for the CCmdLineInfo class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CMDLINEINFO_H__505B2DF0_17E3_4E13_8BDE_34D3FF703482__INCLUDED_)
  5. #define AFX_CMDLINEINFO_H__505B2DF0_17E3_4E13_8BDE_34D3FF703482__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CCmdLineInfo : public CCommandLineInfo
  10. {
  11. public:
  12. enum CmdLineFlags
  13. {
  14. CMD_FLAG_FOLDER, // Folder specified
  15. CMD_FLAG_MESSAGE_ID, // Message ID specified
  16. CMD_FLAG_NONE // No flag specified
  17. };
  18. CCmdLineInfo():
  19. m_cmdLastFlag(CMD_FLAG_NONE),
  20. m_FolderType(FOLDER_TYPE_INBOX), // Default folder on startup is 'Inbox'
  21. m_dwlMessageId(0), // Do not select any message on startup,
  22. m_bForceNewInstace (FALSE) // By default, previous instances are used
  23. {}
  24. virtual ~CCmdLineInfo() {}
  25. void ParseParam( LPCTSTR lpszParam, BOOL bFlag, BOOL bLast );
  26. DWORDLONG GetMessageIdToSelect () const { return m_dwlMessageId; }
  27. BOOL IsOpenFolder() { return m_FolderType < FOLDER_TYPE_MAX; }
  28. FolderType GetFolderType()
  29. { ASSERT(IsOpenFolder()); return m_FolderType; }
  30. BOOL IsSingleServer() {return !m_cstrServerName.IsEmpty(); }
  31. CString& GetSingleServerName()
  32. { ASSERT(IsSingleServer()); return m_cstrServerName; }
  33. BOOL ForceNewInstance () { return m_bForceNewInstace; }
  34. private:
  35. CmdLineFlags m_cmdLastFlag;
  36. FolderType m_FolderType; // Folder to open on startup
  37. DWORDLONG m_dwlMessageId; // Message id to select on startup
  38. BOOL m_bForceNewInstace; // Do we force a new instance (/new) ?
  39. CString m_cstrServerName;
  40. };
  41. #endif // !defined(AFX_CMDLINEINFO_H__505B2DF0_17E3_4E13_8BDE_34D3FF703482__INCLUDED_)