Source code of Windows XP (NT5)
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.

78 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name :
  4. cmdline.h
  5. Abstract:
  6. Command line class declarations. This class takes care of command line
  7. parsing and validation. And, it will add the user options to global
  8. CUserOptions object.
  9. Author:
  10. Michael Cheuk (mcheuk)
  11. Project:
  12. Link Checker
  13. Revision History:
  14. --*/
  15. #ifndef _CMDINFO_H_
  16. #define _CMDINFO_H_
  17. #include "lcmgr.h"
  18. //---------------------------------------------------------------------------
  19. // Command line class. It accepts 3 valid set of parameters
  20. // 1. linkchk -s ServerName -i InstanceNumber
  21. // 2. linkchk -s ServerName -a VirtualDirectoryAlias -p VirtualDirectoryPath
  22. // 3. linkchk -u URL
  23. //
  24. class CCmdLine
  25. {
  26. // Public interfaces
  27. public:
  28. // Constructor
  29. CCmdLine();
  30. // Validate the command line paramters and add them to global CUserOptions object
  31. BOOL CheckAndAddToUserOptions();
  32. // Called by CLinkCheckApp for each parameters
  33. void ParseParam(
  34. TCHAR chFlag, // parameter flag
  35. LPCTSTR lpszParam // value
  36. );
  37. // Protected funtions
  38. protected:
  39. // Query the metabase for server/instance directories and
  40. // add them to the global CUserOptions object
  41. BOOL QueryAndAddDirectories();
  42. // Protected members
  43. protected:
  44. CString m_strHostName; // hostname (eg. localhost)
  45. CString m_strAlias; // virtual directory alias
  46. CString m_strPath; // virtual directory path
  47. int m_iInstance; // server instance
  48. CString m_strURL; // URL path
  49. BOOL m_fInvalidParam; // Is parameters invalid?
  50. }; // class CCmdLine
  51. #endif // _CMDINFO_H_