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.

208 lines
4.9 KiB

  1. /***********************************************************************
  2. *
  3. * _ABP.H
  4. *
  5. * Header file for code in ABP.C
  6. *
  7. * Copyright 1992, 1993 Microsoft Corporation. All Rights Reserved.
  8. *
  9. ***********************************************************************/
  10. /*
  11. * Used to keep track of all objects created on this session
  12. */
  13. typedef struct _object
  14. {
  15. struct _object *lppNext;
  16. LPVOID lpObject;
  17. } OBJECTLIST, *LPOBJECTLIST;
  18. #define CBOBJECTLIST sizeof(OBJECTLIST)
  19. /*
  20. * Declaration of IABProvider object implementation
  21. */
  22. #undef INTERFACE
  23. #define INTERFACE struct _ABP
  24. #undef MAPIMETHOD_
  25. #define MAPIMETHOD_(type, method) MAPIMETHOD_DECLARE(type, method, ABP_)
  26. MAPI_IUNKNOWN_METHODS(IMPL)
  27. MAPI_IABPROVIDER_METHODS(IMPL)
  28. #undef MAPIMETHOD_
  29. #define MAPIMETHOD_(type, method) MAPIMETHOD_TYPEDEF(type, method, ABP_)
  30. MAPI_IUNKNOWN_METHODS(IMPL)
  31. MAPI_IABPROVIDER_METHODS(IMPL)
  32. #undef MAPIMETHOD_
  33. #define MAPIMETHOD_(type, method) STDMETHOD_(type, method)
  34. DECLARE_MAPI_INTERFACE(ABP_)
  35. {
  36. MAPI_IUNKNOWN_METHODS(IMPL)
  37. MAPI_IABPROVIDER_METHODS(IMPL)
  38. };
  39. /*
  40. * Definition of the init object
  41. */
  42. typedef struct _ABP {
  43. ABP_Vtbl FAR * lpVtbl;
  44. FAB_IUnknown;
  45. /*
  46. * list of logon objects
  47. */
  48. LPOBJECTLIST lpObjectList;
  49. } ABP, FAR *LPABP;
  50. #define CBABP sizeof(ABP)
  51. /*
  52. * utility functions that allow access to data stored in the Init object (ABP.C)
  53. */
  54. void
  55. RemoveLogonObject(LPABPROVIDER lpABProvider, LPVOID lpvABLogon, LPFREEBUFFER lpFreeBuff);
  56. void
  57. FindLogonObject(LPABPROVIDER lpABProvider, LPMAPIUID lpMuidToFind, LPABLOGON * lppABLogon);
  58. /*
  59. * Internal utility functions that allow access to data stored in the logon object
  60. */
  61. /*
  62. * Declaration of IABLogon object implementation
  63. */
  64. #undef INTERFACE
  65. #define INTERFACE struct _ABPLOGON
  66. #undef MAPIMETHOD_
  67. #define MAPIMETHOD_(type, method) MAPIMETHOD_DECLARE(type, method, ABPLOGON_)
  68. MAPI_IUNKNOWN_METHODS(IMPL)
  69. MAPI_IABLOGON_METHODS(IMPL)
  70. #undef MAPIMETHOD_
  71. #define MAPIMETHOD_(type, method) MAPIMETHOD_TYPEDEF(type, method, ABPLOGON_)
  72. MAPI_IUNKNOWN_METHODS(IMPL)
  73. MAPI_IABLOGON_METHODS(IMPL)
  74. #undef MAPIMETHOD_
  75. #define MAPIMETHOD_(type, method) STDMETHOD_(type, method)
  76. DECLARE_MAPI_INTERFACE(ABPLOGON_)
  77. {
  78. MAPI_IUNKNOWN_METHODS(IMPL)
  79. MAPI_IABLOGON_METHODS(IMPL)
  80. };
  81. /*
  82. * Definition of the logon object
  83. */
  84. typedef struct _ABPLOGON {
  85. ABPLOGON_Vtbl FAR * lpVtbl;
  86. FAB_IUnknown;
  87. /*
  88. * Private structure
  89. */
  90. LPABPROVIDER lpABP;
  91. // LPOBJECTLIST lpObjectList; /* List of objects in this session */
  92. LPTSTR lpszFileName; /* Name of file that is browsed */
  93. MAPIUID muidID; /* UID for this logon object */
  94. LPMAPISUP lpMapiSup; /* MAPI Support object - gotten via ABPLogon */
  95. // HWND hWnd; // Window handle the AB provider can use
  96. /*
  97. * Table Data for canned tables
  98. */
  99. /* Root hierarchy */
  100. LPTABLEDATA lpTDatRoot;
  101. /* One Off Table */
  102. LPTABLEDATA lpTDatOO;
  103. /* Container Display Table */
  104. // LPTABLEDATA lpTDatCDT;
  105. /* Advanced search display table */
  106. // LPTABLEDATA lpABCSearchTbl;
  107. /* List box selections table */
  108. // LPTABLEDATA lpLBTable;
  109. } ABPLOGON, FAR *LPABPLOGON;
  110. #define CBABPLOGON sizeof(ABPLOGON)
  111. /*
  112. * Creates a new ABPLogon object (see ABLOGON.C)
  113. */
  114. HRESULT
  115. HrNewABLogon( LPABLOGON * lppABLogon,
  116. LPABPROVIDER lpABP,
  117. LPMAPISUP lpMAPISup,
  118. LPTSTR lpszSABFile,
  119. LPMAPIUID lpmuid,
  120. HINSTANCE hLibrary,
  121. LPALLOCATEBUFFER lpAllocBuff,
  122. LPALLOCATEMORE lpAllocMore,
  123. LPFREEBUFFER lpFreeBuff,
  124. LPMALLOC lpMalloc );
  125. LPMAPIUID
  126. LpMuidFromLogon(LPABLOGON lpABLogon);
  127. HRESULT
  128. HrLpszGetCurrentFileName(LPABLOGON lpABLogon, LPTSTR * lppszFileName);
  129. HRESULT
  130. HrReplaceCurrentFileName(LPABLOGON lpABLogon, LPTSTR lpstrT);
  131. BOOL
  132. FEqualFABFiles( LPABLOGON lpABLogon, LPTSTR lpszFileName);
  133. /*
  134. * Creates a new ROOT container object (see ROOT.C)
  135. */
  136. HRESULT
  137. HrNewROOT(LPABCONT * lppROOT,
  138. ULONG * lpulObjType,
  139. LPABLOGON lpABPLogon,
  140. LPCIID lpInterface,
  141. HINSTANCE hLibrary,
  142. LPALLOCATEBUFFER lpAllocBuff,
  143. LPALLOCATEMORE lpAllocMore,
  144. LPFREEBUFFER lpFreeBuff,
  145. LPMALLOC lpMalloc );
  146. /*
  147. * Creates the search object associated with the SampDirectory (see ABSEARCH.C)
  148. */
  149. HRESULT
  150. HrNewSearch(LPMAPICONTAINER * lppABSearch,
  151. LPABLOGON lpABLogon,
  152. LPCIID lpInterface,
  153. HINSTANCE hLibrary,
  154. LPALLOCATEBUFFER lpAllocBuff,
  155. LPALLOCATEMORE lpAllocMore,
  156. LPFREEBUFFER lpFreeBuff,
  157. LPMALLOC lpMalloc );
  158. /*
  159. * Macro version of IsEqualGUID
  160. */
  161. // #define IsEqualGUID(g1, g2) (memcmp((g1), (g2), sizeof(GUID)) == 0)