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.

122 lines
3.6 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to
  4. // existing Microsoft documentation.
  5. //
  6. //
  7. //
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  10. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  11. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  12. // PURPOSE.
  13. //
  14. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  15. //
  16. //
  17. //
  18. //==============================================================;
  19. #ifndef _SPACE_H
  20. #define _SPACE_H
  21. #include "DeleBase.h"
  22. #include "CompData.h"
  23. class CSpaceStation;
  24. class CComponentData;
  25. class CRocket : public CDelegationBase {
  26. public:
  27. CRocket(CSpaceStation *pSpaceStation, _TCHAR *szName, int id, LONG lWeight, LONG lHeight, LONG lPayload);
  28. virtual ~CRocket();
  29. virtual const _TCHAR *GetDisplayName(int nCol = 0);
  30. virtual const GUID & getNodeType() { return thisGuid; }
  31. virtual const int GetBitmapIndex() { return INDEX_SPACEICON; }
  32. BOOL getDeletedStatus() { return isDeleted; }
  33. void setDeletedStatus(BOOL status) { isDeleted = status; }
  34. CSpaceStation* GetParent() { return m_pSpaceStation; }
  35. int GetId() { return nId; }
  36. public:
  37. // virtual functions go here (for MMCN_*)
  38. virtual HRESULT OnSelect(IConsole *pConsole, BOOL bScope, BOOL bSelect);
  39. virtual HRESULT OnUpdateItem(IConsole *pConsole, long item, ITEM_TYPE itemtype);
  40. virtual HRESULT OnDelete(IConsole *pConsole);
  41. virtual HRESULT OnRefresh(IConsole *pConsole);
  42. virtual HRESULT OnRename(LPOLESTR pszNewName);
  43. private:
  44. // {29743810-4C4B-11d2-89D8-000021473128}
  45. static const GUID thisGuid;
  46. _TCHAR *szName;
  47. LONG lWeight;
  48. LONG lHeight;
  49. LONG lPayload;
  50. int nId;
  51. friend CSpaceStation;
  52. CSpaceStation *m_pSpaceStation;
  53. enum ROCKET_STATUS {RUNNING, PAUSED, STOPPED} iStatus;
  54. BOOL isDeleted;
  55. };
  56. class CSpaceStation : public CDelegationBase {
  57. public:
  58. CSpaceStation();
  59. virtual ~CSpaceStation();
  60. virtual const _TCHAR *GetDisplayName(int nCol = 0) { return _T("Space Station"); }
  61. virtual const GUID & getNodeType() { return thisGuid; }
  62. virtual const int GetBitmapIndex() { return INDEX_STATION; }
  63. public:
  64. virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem);
  65. virtual HRESULT GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions);
  66. virtual HRESULT OnSelect(IConsole *pConsole, BOOL bScope, BOOL bSelect);
  67. virtual HRESULT OnUpdateItem(IConsole *pConsole, long item, ITEM_TYPE itemtype);
  68. private:
  69. // {29743810-4C4B-11d2-89D8-000021473128}
  70. static const GUID thisGuid;
  71. private:
  72. enum { NUMBER_OF_CHILDREN = 9, MAX_CHILDREN = 20 };
  73. CRocket *children[MAX_CHILDREN];
  74. CComponentData *m_pComponentData;
  75. };
  76. class CSpaceFolder : public CDelegationBase {
  77. public:
  78. CSpaceFolder();
  79. virtual ~CSpaceFolder();
  80. virtual const _TCHAR *GetDisplayName(int nCol = 0) { return _T("Space Vehicles"); }
  81. virtual const GUID & getNodeType() { return thisGuid; }
  82. virtual const int GetBitmapIndex() { return INDEX_SPACEICON; }
  83. public:
  84. // virtual functions go here (for MMCN_*)
  85. virtual HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent);
  86. private:
  87. enum { IDM_NEW_SPACE = 4 };
  88. // {29743810-4C4B-11d2-89D8-000021473128}
  89. static const GUID thisGuid;
  90. private:
  91. enum { NUMBER_OF_CHILDREN = 1 };
  92. CSpaceStation *children[NUMBER_OF_CHILDREN];
  93. };
  94. #endif // _SPACE_H