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.

80 lines
2.1 KiB

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. ASSOCQP.H
  5. Abstract:
  6. WQL association query parser
  7. History:
  8. raymcc 04-Jul-99 Created.
  9. raymcc 14-Aug-99 Resubmit due to VSS problem.
  10. --*/
  11. #ifndef _ASSOCQP_H_
  12. #define _ASSOCQP_H_
  13. #define QUERY_TYPE_GETASSOCS 0x1
  14. #define QUERY_TYPE_GETREFS 0x2
  15. #define QUERY_TYPE_CLASSDEFS_ONLY 0x4
  16. #define QUERY_TYPE_SCHEMA_ONLY 0x8
  17. #define QUERY_TYPE_KEYSONLY 0x10
  18. #define QUERY_TYPE_CLASSDEFS_ONLY_EX 0x20
  19. class CAssocQueryParser
  20. {
  21. LPWSTR m_pszQueryText;
  22. LPWSTR m_pszTargetObjPath;
  23. LPWSTR m_pszResultClass;
  24. LPWSTR m_pszAssocClass;
  25. LPWSTR m_pszRole;
  26. LPWSTR m_pszResultRole;
  27. LPWSTR m_pszRequiredQual;
  28. LPWSTR m_pszRequiredAssocQual;
  29. DWORD m_dwType;
  30. CObjectPathParser m_PathParser;
  31. ParsedObjectPath *m_pPath;
  32. public:
  33. CAssocQueryParser();
  34. ~CAssocQueryParser();
  35. HRESULT Parse(LPWSTR Query);
  36. // Parses both query and target object path.
  37. // Returns:
  38. // WBEM_E_INVALID_QUERY on syntax error
  39. // WBEM_E_INVALID_OBJECT_PATH if the object
  40. // path is syntactically invalid.
  41. // WBEM_E_OUT_OF_MEMORY
  42. // WBEM_S_NO_ERROR
  43. LPCWSTR GetQueryText() { return m_pszQueryText; }
  44. LPCWSTR GetTargetObjPath() { return m_pszTargetObjPath; }
  45. LPCWSTR GetResultClass() { return m_pszResultClass; }
  46. LPCWSTR GetAssocClass() { return m_pszAssocClass; }
  47. LPCWSTR GetRole() { return m_pszRole; }
  48. LPCWSTR GetResultRole() { return m_pszResultRole; }
  49. LPCWSTR GetRequiredQual() { return m_pszRequiredQual; }
  50. LPCWSTR GetRequiredAssocQual() { return m_pszRequiredAssocQual; }
  51. DWORD GetQueryType() { return m_dwType; }
  52. // Returns a mask of
  53. // QUERY_TYPE_GETREFS
  54. // QUERY_TYPE_GETASSOCS
  55. // QUERY_TYPE_CLASSDEFS_ONLY
  56. // QUERY_TYPE_KEYSONLY
  57. // QUERY_TYPE_SCHEMA_ONLY
  58. const ParsedObjectPath *GetParsedPath() { return m_pPath; }
  59. };
  60. #endif