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.

125 lines
3.0 KiB

  1. #ifndef _I_APPLOADER_H
  2. #define _I_APPLOADER_H
  3. #include <basetyps.h>
  4. #include "gcc.h"
  5. typedef enum
  6. {
  7. APPLET_ID_WB = 0,
  8. APPLET_ID_FT = 1,
  9. APPLET_ID_CHAT = 2,
  10. APPLET_LAST = 3,
  11. }
  12. APPLET_ID;
  13. typedef enum
  14. {
  15. APPLDR_NO_ERROR = 0,
  16. APPLDR_FAIL,
  17. APPLDR_CANCEL_EXIT,
  18. }
  19. APPLDR_RESULT;
  20. typedef enum
  21. {
  22. APPLET_QUERY_SHUTDOWN = 0,
  23. APPLET_QUERY_NM2xNODE,
  24. }
  25. APPLET_QUERY_ID;
  26. #undef INTERFACE
  27. #define INTERFACE IAppletLoader
  28. DECLARE_INTERFACE(IAppletLoader)
  29. {
  30. STDMETHOD_(void, ReleaseInterface)(THIS) PURE;
  31. STDMETHOD_(APPLDR_RESULT, AppletStartup)(THIS_
  32. IN BOOL fNoUI) PURE;
  33. STDMETHOD_(APPLDR_RESULT, AppletCleanup)(THIS_
  34. IN DWORD dwTimeout) PURE;
  35. STDMETHOD_(APPLDR_RESULT, AppletInvoke)(THIS_
  36. IN BOOL fLocal,
  37. IN GCCConfID,
  38. IN LPSTR pszCmdLine) PURE;
  39. STDMETHOD_(APPLDR_RESULT, AppletQuery)(THIS_
  40. IN APPLET_QUERY_ID eQueryId) PURE;
  41. STDMETHOD_(APPLDR_RESULT, OnNM2xNodeJoin)(THIS) PURE;
  42. };
  43. typedef enum
  44. {
  45. APPLET_LIBRARY_FREED = 0,
  46. APPLET_LIBRARY_LOADED,
  47. APPLET_WORK_THREAD_STARTED,
  48. APPLET_CLOSING,
  49. APPLET_WORK_THREAD_EXITED,
  50. }
  51. APPLET_STATUS;
  52. #define CREATE_APPLET_LOADER_INTERFACE "CreateAppletLoaderInterface"
  53. typedef T120Error (WINAPI *LPFN_CREATE_APPLET_LOADER_INTERFACE) (IAppletLoader **);
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. // caller: NM/UI, T.120
  58. T120Error WINAPI T120_LoadApplet(APPLET_ID, BOOL fLocal, T120ConfID, BOOL fNoUI, LPSTR pszCmdLine);
  59. // caller: NM/UI shutdown
  60. T120Error WINAPI T120_CloseApplet(APPLET_ID, BOOL fNowRegardlessRefCount, BOOL fSync, DWORD dwTimeout);
  61. // caller: applet itself
  62. T120Error WINAPI T120_AppletStatus(APPLET_ID, APPLET_STATUS);
  63. // caller: NM/UI
  64. T120Error WINAPI T120_QueryApplet(APPLET_ID, APPLET_QUERY_ID);
  65. // node ID --> user name
  66. //
  67. // Return value is zero (in case of failure)
  68. // or the length of node name (in case of valid <conf ID, node ID>).
  69. //
  70. // The caller should check if the buffer size given is large enough to
  71. // hold the entire node name. If not, the caller should provide a new buffer
  72. // and call this function again in order to get the entire node name.
  73. //
  74. ULONG WINAPI T120_GetNodeName(T120ConfID, T120NodeID, LPSTR pszName, ULONG cchName);
  75. // node ID + GUID --> user data
  76. //
  77. // Return value is zero (in case of failure)
  78. // or the size of user data (in case of valid <conf ID, node ID, GUID>).
  79. //
  80. // The caller should check if the buffer size given is large enough to
  81. // hold the entire user data. If not, the caller should provide a new buffer
  82. // and call this function again in order to get the entire user data.
  83. //
  84. ULONG WINAPI T120_GetUserData(T120ConfID, T120NodeID, GUID *, LPBYTE pbBuffer, ULONG cbBufSize);
  85. // node ID --> node version
  86. //
  87. // Node version (like NM 3.0) is maintained iinside CConf's NodeVersion list
  88. // Given confId and node id, returns node's version number
  89. //
  90. DWORD_PTR WINAPI T120_GetNodeVersion(T120ConfID, T120NodeID);
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif // _I_APPLOADER_H