home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / mprui.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.2 KB  |  207 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  2. /*++
  3.  
  4. Copyright (c) 1996-1999, Microsoft Corporation
  5.  
  6. Module Name:
  7.     mprui.h
  8.  
  9. Abstract:
  10.     Declarations for the Multi-Protocol router's UI plugin interface.
  11.  
  12. --*/
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17.  
  18. // forward declarations
  19. #ifdef _cplusplus
  20.   struct IMprUIHost;
  21.   struct IMprUIPlugin;
  22. #else
  23.   typedef struct IMprUIHost IMprUIHost;
  24.   typedef struct IMprUIPlugin IMprUIPlugin;
  25. #endif
  26.  
  27. // {73A827F0-FF6E-11cf-AA6B-00805F0C9232}
  28. DEFINE_GUID(IID_IMprUIHost,
  29. 0x73a827f0, 0xff6e, 0x11cf, 0xaa, 0x6b, 0x0, 0x80, 0x5f, 0xc, 0x92, 0x32);
  30.  
  31. // {73A827F1-FF6E-11cf-AA6B-00805F0C9232}
  32. DEFINE_GUID(IID_IMprUIPlugin,
  33. 0x73a827f1, 0xff6e, 0x11cf, 0xaa, 0x6b, 0x0, 0x80, 0x5f, 0xc, 0x92, 0x32);
  34.  
  35. #undef INTERFACE
  36. #define INTERFACE IMprUIHost
  37.  
  38. DECLARE_INTERFACE_(IMprUIHost, IUnknown)
  39. {
  40.   // *** IUnknown methods ***
  41.   STDMETHOD(QueryInterface) (
  42.     THIS_
  43.     REFIID riid,
  44.     LPVOID FAR* ppvObj
  45.     ) PURE;
  46.  
  47.   STDMETHOD_(ULONG,AddRef) (
  48.     THIS
  49.     ) PURE;
  50.  
  51.   STDMETHOD_(ULONG,Release) (
  52.     THIS
  53.     ) PURE;
  54.  
  55.   // *** IMprUIHost methods ***
  56.  
  57.   // Create a floating window for the given control
  58.   //  Use CoTaskMemAlloc to allocate pszTitle
  59.   STDMETHOD(FloatWindow) (
  60.     THIS_
  61.     REFCLSID rguidModule,            // CLSID representing the object
  62.     REFCLSID rclsidCtrl,             // CLSID of Ole Control to create
  63.     IMprUIPlugin* pConnection,       // Plugin in node making request
  64.     DWORD dwContext,                 // constant context passed back to Ole Control
  65.     PWCHAR pszTitle                  // Title of floating window
  66.     ) PURE;
  67.  
  68.   // Force all nodes to be refreshed
  69.   STDMETHOD(GlobalRefresh) (
  70.     THIS
  71.     ) PURE;
  72. };
  73.  
  74. #undef INTERFACE
  75. #define INTERFACE IMprUIPlugin
  76.  
  77. DECLARE_INTERFACE_(IMprUIPlugin, IUnknown)
  78. {
  79.   // *** IUnknown methods ***
  80.   STDMETHOD(QueryInterface) (
  81.     THIS_
  82.     REFIID riid,
  83.     LPVOID FAR* ppvObj
  84.     ) PURE;
  85.  
  86.   STDMETHOD_(ULONG,AddRef) (
  87.     THIS
  88.     ) PURE;
  89.  
  90.   STDMETHOD_(ULONG,Release) (
  91.     THIS
  92.     ) PURE;
  93.  
  94.   // *** IMprUIPlugin Methods ***
  95.  
  96.   // Connect to router.  The plugin module should disconnect from the
  97.   //  router when the IMprUIPlugin is released.
  98.   STDMETHOD(ConnectToRouter) (
  99.     THIS_
  100.     LPCTSTR pRouterName,
  101.     IMprUIHost *pMprUIHost
  102.     ) PURE;
  103.  
  104.   // Returns the text for the given node.
  105.   //  Use CoTaskMemAlloc to allocate memory for ppszTitle
  106.   STDMETHOD(GetTitle) (
  107.     THIS_
  108.     PWSTR*      ppszTitle
  109.     ) PURE;
  110.  
  111.   // Returns a context menu for the given node.
  112.   //  Menu will be destroyed by host.
  113.   STDMETHOD(GetContextMenu) (
  114.     THIS_
  115.     HMENU*      phMenu
  116.     ) PURE;
  117.  
  118.   // Processes the command returned by the context menu
  119.   // There are reserved commands (used to pass down the Hotkeys)
  120.   // such as IDM_HOTKEY_INSERT, IDM_HOTKEY_DELETE, and
  121.   // IDM_HOTKEY_RETURN.  These commands are to be assigned to
  122.   // the appropriate task by the implementor of this interface.
  123.   STDMETHOD(ProcessCommand) (
  124.     THIS_
  125.     WPARAM      wParam,
  126.     LPARAM      lParam,
  127.     HWND        hWndParent
  128.     ) PURE;
  129.  
  130.   // Returns CLSID for the ole control which displays right hand pane
  131.   //  Use CoTaskMemAlloc to allocate space for CLSID*
  132.   STDMETHOD(GetCLSID) (
  133.     THIS_
  134.     CLSID**     ppClsid
  135.     ) PURE;
  136. };
  137.  
  138. #define IDM_HOTKEY_INSERT        (1024)
  139. #define IDM_HOTKEY_DELETE        (1025)
  140. #define IDM_HOTKEY_RETURN        (1026)
  141.  
  142. /* name mangling off */
  143. #ifdef __cplusplus
  144. extern "C" {
  145. #endif
  146.  
  147. typedef DWORD
  148. (APIENTRY* PFNMPRUITRANSPORTCONFIG)(
  149.     IN      HWND        hwndParent,
  150.     IN      LPCWSTR     pwsMachine,
  151.     IN      DWORD       dwTransportId,
  152.     IN      DWORD       dwReserved
  153.     );
  154.  
  155. #define MPRUITRANSPORTCONFIG                    MprUITransportConfig
  156. #define SZMPRUITRANSPORTCONFIG                  "MprUITransportConfig"
  157.  
  158.  
  159. typedef DWORD
  160. (APIENTRY* PFNMPRUIPROTOCOLCONFIG)(
  161.     IN      HWND        hwndParent,
  162.     IN      LPCWSTR     pwsMachine,
  163.     IN      DWORD       dwTransportId,
  164.     IN      DWORD       dwProtocolId,
  165.     IN      DWORD       dwReserved
  166.     );
  167.  
  168. #define MPRUIPROTOCOLCONFIG                     MprUIProtocolConfig
  169. #define SZMPRUIPROTOCOLCONFIG                   "MprUIProtocolConfig"
  170.  
  171.  
  172.  
  173. typedef DWORD
  174. (APIENTRY* PFNMPRUITRANSPORTINTERFACECONFIG)(
  175.     IN      HWND        hwndParent,
  176.     IN      LPCWSTR     pwsMachine,
  177.     IN      LPCWSTR     pwsInterface,
  178.     IN      DWORD       dwIfType,
  179.     IN      DWORD       dwTransportId,
  180.     IN      DWORD       dwReserved
  181.     );
  182.  
  183. #define MPRUITRANSPORTINTERFACECONFIG           MprUITransportInterfaceConfig
  184. #define SZMPRUITRANSPORTINTERFACECONFIG         "MprUITransportInterfaceConfig"
  185.  
  186.  
  187.  
  188. typedef DWORD
  189. (APIENTRY* PFNMPRUIPROTOCOLINTERFACECONFIG)(
  190.     IN      HWND        hwndParent,
  191.     IN      LPCWSTR     pwsMachine,
  192.     IN      LPCWSTR     pwsInterface,
  193.     IN      DWORD       dwIfType,
  194.     IN      DWORD       dwTransportId,
  195.     IN      DWORD       dwProtocolId,
  196.     IN      DWORD       dwReserved
  197.     );
  198.  
  199. #define MPRUIPROTOCOLINTERFACECONFIG            MprUIProtocolInterfaceConfig
  200. #define SZMPRUIPROTOCOLINTERFACECONFIG          "MprUIProtocolInterfaceConfig"
  201.  
  202.  
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #pragma option pop /*P_O_Pop*/
  207.