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.

68 lines
1.5 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ClassFac.cpp
  6. * Content: Parsing engine
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 02/04/2000 rmt Created
  12. * 02/21/2000 rmt Updated to make core Unicode and remove ANSI calls
  13. *@@END_MSINTERNAL
  14. *
  15. ***************************************************************************/
  16. #ifndef __ADDPARSE_H
  17. #define __ADDPARSE_H
  18. #include "Addcore.h"
  19. class DP8ADDRESSPARSE
  20. {
  21. protected:
  22. typedef enum {
  23. DP8AP_IDLE,
  24. DP8AP_KEY,
  25. DP8AP_VALUE,
  26. DP8AP_USERDATA
  27. } DP8AP_STATE;
  28. public:
  29. DP8ADDRESSPARSE();
  30. ~DP8ADDRESSPARSE();
  31. HRESULT ParseURL( DP8ADDRESSOBJECT *pdp8aObject, WCHAR *pstrURL );
  32. protected:
  33. BOOL IsValidHex( WCHAR ch );
  34. BOOL IsValidKeyChar(WCHAR ch);
  35. BOOL IsValidKeyTerminator(WCHAR ch);
  36. BOOL IsValidValueChar(WCHAR ch);
  37. BOOL IsValidValueTerminator(WCHAR ch);
  38. BOOL IsValidNumber(WCHAR ch );
  39. WCHAR HexToChar( WCHAR *sz );
  40. HRESULT FSM_Key();
  41. HRESULT FSM_Value();
  42. HRESULT FSM_UserData();
  43. HRESULT FSM_CommitEntry(DP8ADDRESSOBJECT *pdp8aObject);
  44. WCHAR *m_pwszCurrentLocation; // Current Location in string
  45. WCHAR *m_pwszCurrentKey; // Key will be placed here as we build
  46. WCHAR *m_pwszCurrentValue; // Value will be placed here as we build
  47. BYTE *m_pbUserData;
  48. DWORD m_dwUserDataSize;
  49. DP8AP_STATE m_dp8State; // Current State
  50. BOOL m_fNonNumeric;
  51. DWORD m_dwLenURL;
  52. DWORD m_dwValueLen;
  53. };
  54. #endif