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.

96 lines
1.9 KiB

  1. //
  2. // cookie.h : Declaration of Cookie and related classes.
  3. // Cory West
  4. //
  5. #ifndef __COOKIE_H_INCLUDED__
  6. #define __COOKIE_H_INCLUDED__
  7. //
  8. // Instance handle of the DLL (initialized during
  9. // Component::Initialize).
  10. //
  11. extern HINSTANCE g_hInstanceSave;
  12. #include "nodetype.h"
  13. #include "cache.h"
  14. #include "stdcooki.h"
  15. class Cookie:
  16. public CCookie,
  17. public CStoresMachineName,
  18. public CBaseCookieBlock
  19. {
  20. public:
  21. Cookie( SchmMgmtObjectType objecttype,
  22. LPCTSTR lpcszMachineName = NULL )
  23. : CStoresMachineName( lpcszMachineName ),
  24. m_objecttype( objecttype ),
  25. hResultId( 0 )
  26. { ; }
  27. ~Cookie() { ; }
  28. //
  29. // Returns < 0, 0 or > 0.
  30. //
  31. virtual HRESULT CompareSimilarCookies( CCookie* pOtherCookie,
  32. int* pnResult );
  33. //
  34. // CBaseCookieBlock.
  35. //
  36. virtual CCookie* QueryBaseCookie(int i);
  37. virtual int QueryNumCookies();
  38. SchmMgmtObjectType m_objecttype;
  39. Cookie *pParentCookie;
  40. //
  41. // If this is a result item, here's the handle to it.
  42. //
  43. HRESULTITEM hResultId;
  44. inline void SetResultHandle( HRESULTITEM hri ) {
  45. hResultId = hri;
  46. };
  47. //
  48. // The name of the schema object that this
  49. // cookie refers to. We have to refer to the
  50. // cache object by name so that if the cache
  51. // reloads, we won't be left holding a dangling
  52. // pointer.
  53. //
  54. CString strSchemaObject;
  55. //
  56. // If this is an attribute of a class
  57. // (pParentCookie->m_objecttype == SCHMMGMT_CLASS),
  58. // these variables give us display info.
  59. //
  60. VARIANT_BOOL Mandatory;
  61. BOOL System;
  62. //
  63. // If this is an attribute of a class, this is the
  64. // name of the class that the attribute is a member
  65. // of.
  66. //
  67. CString strSrcSchemaObject;
  68. };
  69. #endif