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.

100 lines
2.8 KiB

  1. #pragma once
  2. //+---------------------------------------------------------------------------
  3. //
  4. // Copyright (C) 1994, Microsoft Corporation.
  5. //
  6. // File: DOQUERY.HXX
  7. //
  8. // Contents: Content Index Test 'Q' query-related definitions
  9. //
  10. // History: 02 Nov 94 alanw Created from citest.hxx and screen.hxx
  11. //
  12. //----------------------------------------------------------------------------
  13. // possible query errors
  14. enum QUERY_ERROR
  15. {
  16. QUERY_IQUERY_FAILED = 0,
  17. QUERY_UNKNOWN_PROPERTY_FOR_OUTPUT,
  18. QUERY_UNKNOWN_PROPERTY_FOR_SORT,
  19. QUERY_EXECUTE_FAILED,
  20. QUERY_GETROWS_FAILED,
  21. QUERY_GETBINDINGS_FAILED,
  22. QUERY_TABLE_CONTAINS_UNKNOWN_PROPERTY,
  23. QUERY_GET_CD_FAILED,
  24. QUERY_COUNT_FAILED,
  25. QUERY_TABLE_REFRESH_FAILED,
  26. QUERY_GETSTATUS_FAILED,
  27. QUERY_GET_COLUMNS_FAILED,
  28. QUERY_NOISE_PHRASE,
  29. QUERY_INCOMPATIBLE_VERSIONS,
  30. QUERY_ERRORS_IN_COMMAND_TREE,
  31. QUERY_UNKNOWN_PROPERTY_FOR_CATEGORIZATION,
  32. };
  33. //+---------------------------------------------------------------------------
  34. //
  35. // Class: CQueryException
  36. //
  37. // Purpose: Exception class for general query errors
  38. //
  39. // History: 10-Jun-94 t-jeffc Created.
  40. //
  41. //----------------------------------------------------------------------------
  42. class CQueryException : public CException
  43. {
  44. public:
  45. CQueryException( QUERY_ERROR qe )
  46. : CException( E_INVALIDARG )
  47. {
  48. _qe = qe;
  49. }
  50. QUERY_ERROR GetQueryError() { return _qe; }
  51. // inherited methods
  52. #if !defined(NATIVE_EH)
  53. EXPORTDEF virtual int WINAPI IsKindOf( const char * szClass ) const
  54. {
  55. if( strcmp( szClass, "CQueryException" ) == 0 )
  56. return TRUE;
  57. else
  58. return CException::IsKindOf( szClass );
  59. }
  60. #endif // !NATIVE_EH
  61. private:
  62. QUERY_ERROR _qe;
  63. };
  64. class CCatState;
  65. typedef XPtr<CDbCmdTreeNode> XDbCmdTreeNode;
  66. CDbCmdTreeNode * FormQueryTree( CDbCmdTreeNode & xRst,
  67. CCatState & states,
  68. IColumnMapper * plist,
  69. BOOL fAddBmkCol = FALSE,
  70. BOOL fAddRankForBrowse= TRUE );
  71. void SetScopeProperties( ICommand * pCmd,
  72. unsigned cDirs,
  73. WCHAR const * const * apDirs,
  74. ULONG const * aulFlags,
  75. WCHAR const * const * apCats = 0,
  76. WCHAR const * const * apMachines = 0 );
  77. SCODE SetScopePropertiesNoThrow( ICommand * pCmd,
  78. unsigned cDirs,
  79. WCHAR const * const * apDirs,
  80. ULONG const * aulFlags,
  81. WCHAR const * const * apCats = 0,
  82. WCHAR const * const * apMachines = 0 );