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.

105 lines
2.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // proxynode.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class ProxyNode
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/19/2000 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef PROXYNODE_H
  19. #define PROXYNODE_H
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif
  23. class ConnectInfo;
  24. class ProxyPolicies;
  25. class ServerGroups;
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CLASS
  29. //
  30. // ProxyNode
  31. //
  32. // DESCRIPTION
  33. //
  34. // The data item for the Proxy node.
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////
  37. class __declspec(uuid("fab6fa0a-1e4f-4c2e-bc07-692cf4adaec1")) ProxyNode;
  38. class ProxyNode : public SnapInPreNamedItem
  39. {
  40. public:
  41. ProxyNode(
  42. SnapInView& view,
  43. IDataObject* parentData,
  44. HSCOPEITEM parentId
  45. );
  46. // SnapInDataItem methods.
  47. const GUID* getNodeType() const throw ()
  48. { return &__uuidof(this); }
  49. virtual HRESULT getResultViewType(
  50. LPOLESTR* ppViewType,
  51. long* pViewOptions
  52. ) throw ();
  53. virtual HRESULT onExpand(
  54. SnapInView& view,
  55. HSCOPEITEM itemId,
  56. BOOL expanded
  57. );
  58. virtual HRESULT onShow(
  59. SnapInView& view,
  60. HSCOPEITEM itemId,
  61. BOOL selected
  62. );
  63. virtual HRESULT onContextHelp(SnapInView& view) throw ();
  64. protected:
  65. ~ProxyNode() throw ();
  66. private:
  67. // Called by the connect thread.
  68. void connect(ConnectInfo& info) throw ();
  69. // Callback for the connect thread.
  70. static DWORD connectRoutine(LPVOID param) throw ();
  71. enum State
  72. {
  73. CONNECTING,
  74. CONNECTED,
  75. EXPANDED,
  76. SUPPRESSED,
  77. FAILED
  78. };
  79. // Current state of the node.
  80. State state;
  81. // Title text for the result pane message view.
  82. ResourceString title;
  83. // Body text for the result pane message view.
  84. ResourceString body;
  85. // Connection to the SDOs.
  86. SdoConnection connection;
  87. // Child proxy policy node.
  88. CComPtr<ProxyPolicies> policies;
  89. // Child server groups node.
  90. CComPtr<ServerGroups> groups;
  91. // Handle to the connect thread.
  92. HANDLE worker;
  93. };
  94. #endif // PROXYNODE_H