freebusy.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. /**
  18. @file
  19. Free/busy Interface defines
  20. @defgroup libfreebusy Freebusy library
  21. @{
  22. The Free/Busy API allows mail providers to provide free/busy status information for specified
  23. user accounts within a specified time range. The free/busy status of a block of time on a user's
  24. calendar is one of the following: out-of-office, busy, tentative, or free.
  25. @par Create a Free/Busy Provider
  26. To provide free/busy information to mail users, a mail provider creates a free/busy provider
  27. and registers it with Outlook. The free/busy provider must implement the following interfaces.
  28. Note that a number of members in these interfaces are not supported and must return the specified
  29. return values. In particular, the Free/Busy API does not support write access to free/busy
  30. information and delegate access to accounts.
  31. - IFreeBusySupport \n
  32. This interface supports specification of interfaces that access free/busy data for
  33. specified users. It uses FBUser to identify a user.
  34. - IFreeBusyData \n
  35. This interface gets and sets a time range for a given user and returns an interface
  36. for enumerating free/busy blocks of data within this time range. It uses relative time
  37. to get and set this time range.
  38. - IEnumFBBlock \n
  39. This interface supports accessing and enumerating free/busy blocks of data for a user
  40. within a time range.
  41. @note
  42. An enumeration contains free/busy blocks that indicate the free/busy status of periods of
  43. time on a user's calendar, within a time range (specified by IFreeBusyData::EnumBlocks).
  44. Items on a calendar, such as appointments and meeting requests, form blocks in the enumeration.
  45. Items adjacent to one another on the calendar having the same free/busy status are combined to
  46. form one single block. A free period of time on a calendar also forms a block. Therefore, no two
  47. consecutive blocks in an enumeration would have the same free/busy status. These blocks do not
  48. overlap in time. When there are overlapping items on a calendar, Outlook merges these items to
  49. form non-overlapping free/busy blocks in the enumeration based on this order of precedence:
  50. out-of-office, busy, tentative.
  51. @par To register the free/busy provider with Outlook, the mail provider should:
  52. -# Register the free/busy provider with COM, providing a CLSID that allows access to the provider's
  53. implementation of IFreeBusySupport.
  54. -# Let Outlook know that the free/busy provider exists by setting this key in the system registry: \n
  55. HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Office\\11.0\\Outlook\\SchedulingInformation\\FreeBusySupport
  56. For example, if the transport provider is SMTP, set the above key to the following data: \n
  57. - Name Type Value \n
  58. - SMTP REG_SZ {CLSID for respective implementation of IFreeBusySupport} \n
  59. In this scenario, Outlook will co-create the COM class and use it to retrieve free/busy information
  60. for any SMTP mail users. To support an address book and transport provider that use an address entry
  61. type other than SMTP, change the Name accordingly.
  62. \remarks
  63. During installation, free/busy providers should check if a registry setting for the the same address
  64. entry type already exists. If it does, the free/busy provider should overwrite the current provider
  65. for that address entry type, and restore to that provider when it uninstalls. However, if a user has
  66. installed more than one free/busy provider for the same address entry type, the user should uninstall
  67. these providers in the reverse order as installation (that is, always uninstall the latest provider),
  68. otherwise the registry may point to a provider that has already been uninstalled.
  69. @par API Components
  70. The Free/Busy API includes the following components:
  71. - Definitions
  72. - Constants for the Free/Busy API
  73. - Data Types
  74. - FBBlock_1
  75. - FBStatus
  76. - FBUser
  77. - sfbEvent
  78. - Interfaces
  79. - IEnumFBBlock
  80. - IFreeBusyData
  81. - IFreeBusySupport
  82. */
  83. #ifndef FREEBUSY_INCLUDED
  84. #define FREEBUSY_INCLUDED
  85. #include <mapix.h>
  86. #include <mapidefs.h>
  87. namespace KC {
  88. /**
  89. * Defines a free/busy event block. This is one block of a array of FBEvent blocks
  90. *
  91. * The event blocks are stored properties PR_FREEBUSY_*
  92. *
  93. * @todo rename sfbEvent to FBEvent
  94. */
  95. struct sfbEvent {
  96. short rtmStart; /**< The start time is the number of minutes
  97. between 12 AM Coordinated Universal Time (UTC) of the
  98. first day of the month and the start time of the event
  99. in UTC. */
  100. short rtmEnd; /**< The end time is the number of minutes between 12 AM UTC of
  101. the first day of the month and the end time of the event
  102. in UTC */
  103. };
  104. #define FB_DATE(yearmonth,daytime) ((((ULONG)(unsigned short)(yearmonth))<<16)|((ULONG)(unsigned short)(daytime)))
  105. #define FB_YEARMONTH(year, month) ((((unsigned short)year<<4)&0xFFF0) | ((unsigned short)month))
  106. #define FB_YEAR(yearmonth) ( ((unsigned short)yearmonth) >> 4 )
  107. #define FB_MONTH(yearmonth) ( ((unsigned short)yearmonth)&0x000F )
  108. /**
  109. * An enumeration for the free/busy status of free/busy blocks.
  110. * The free/busy status of a block of time determines how it is displayed on a
  111. * calendar: Free, Busy, Tentative, or Out of Office.
  112. */
  113. enum FBStatus {
  114. fbFree = 0, /**< Free */
  115. fbTentative = fbFree + 1, /**< Tentative */
  116. fbBusy = fbTentative + 1, /**< Busy */
  117. fbOutOfOffice = fbBusy + 1, /**< Out Of Office */
  118. fbKopanoAllBusy = 1000 /**< Internal used */
  119. };
  120. /**
  121. * Defines a free/busy block of data. This is an item on a calendar represented by
  122. * an appointment or meeting request.
  123. */
  124. struct FBBlock_1 {
  125. LONG m_tmStart; /**< Start time for the block, expressed in relative time. */
  126. LONG m_tmEnd; /**< End time for the block, expressed in relative time. */
  127. FBStatus m_fbstatus; /**< Free/busy status for this block, indicating whether the user is
  128. out-of-office, busy, tentative, or free, during the time period
  129. between m_tmStart and m_tmEnd. */
  130. };
  131. typedef struct FBBlock_1 *LPFBBlock_1;
  132. /**
  133. * Extends the free/busy block of data. It also stores the basedate of occurrence
  134. * for exceptions. For normal occurrences base date is same as start date
  135. */
  136. struct OccrInfo {
  137. FBBlock_1 fbBlock;
  138. time_t tBaseDate;
  139. };
  140. /**
  141. * Identifies a user that may or may not have free/busy data available.
  142. */
  143. struct FBUser {
  144. ULONG m_cbEid; /**< The length of the entry ID of the mail user as represented by the IMailUser interface. */
  145. LPENTRYID m_lpEid; /**< The entry ID of the mail user as represented by the IMailUser interface. */
  146. ULONG m_ulReserved; /**< This parameter is reserved for Outlook internal use and is not supported. */
  147. LPWSTR m_pwszReserved; /**< This parameter is reserved for Outlook internal use and is not supported.*/
  148. };
  149. typedef struct FBUser *LPFBUser;
  150. /**
  151. * @interface IFreeBusyUpdate
  152. * Updates the freebusy data
  153. *
  154. * The interface IFreeBusyUpdate
  155. * Provided by: Free/busy provider
  156. * Interface identifier: IID_IFreeBusyUpdate
  157. */
  158. class IFreeBusyUpdate : public IUnknown {
  159. public:
  160. /**
  161. * Unknown function, Possible reload the freebusydata ?
  162. * @return This member must return S_OK
  163. */
  164. virtual HRESULT __stdcall Reload() = 0;
  165. /**
  166. * Add freebusy blocks, May be called more than once successively
  167. * Alternative name: AddAppt
  168. * @param lpBlocks an array of free/busy blocks to publish
  169. * @param nBlocks Number of freebusy blocks
  170. */
  171. virtual HRESULT __stdcall PublishFreeBusy(FBBlock_1 *lpBlocks, ULONG nBlocks) = 0;
  172. /**
  173. * Unknown function, this member not supported
  174. *
  175. * @note The variables of the function are possible wrong should be like,
  176. int __stdcall IFreeBusyUpdate__RemoveAppt(int,int,int,int);
  177. * @return This member must return S_OK
  178. */
  179. virtual HRESULT __stdcall RemoveAppt() = 0;
  180. /**
  181. * Remove all Freebusy data
  182. * Alternative name: RemoveAllAppt
  183. * @return This member must return S_OK
  184. */
  185. virtual HRESULT __stdcall ResetPublishedFreeBusy() = 0;
  186. /**
  187. * Unknown function, this member not supported
  188. *
  189. * @note The variables of the function are possible wrong
  190. * @return This member must return S_OK
  191. */
  192. virtual HRESULT __stdcall ChangeAppt() = 0; //retn = 10h
  193. /**
  194. * Save the freebusydata with time frame between the begintime and endtime.
  195. */
  196. virtual HRESULT __stdcall SaveChanges(FILETIME ftBegin, FILETIME ftEnd) = 0;
  197. /**
  198. * Unknown function, this member not supported
  199. *
  200. * @note The variables of the function are possible wrong
  201. * @return This member must return S_OK
  202. */
  203. virtual HRESULT __stdcall GetFBTimes() = 0; //retn = 8?
  204. /**
  205. * Unknown function, this member not supported
  206. *
  207. * @note The variables of the function are possible wrong
  208. * @return This member must return S_OK
  209. */
  210. virtual HRESULT __stdcall Intersect() = 0; //retn = 10 ?
  211. };
  212. /**
  213. * @interface IEnumFBBlock
  214. * Supports accessing and enumerating free/busy blocks of data for a user within a time range.
  215. *
  216. * Class: IEnumFBBlock
  217. * Inherits from: IUnknown
  218. * Provided by: Free/busy provider
  219. * Interface identifier: IID_IEnumFBBlock
  220. *
  221. * An enumeration contains free/busy blocks of data that do not overlap in time. When
  222. * there are overlapping items on a calendar, Outlook merges these items to form
  223. * non-overlapping free/busy blocks in the enumeration based on this order of
  224. * precedence: out-of-office, busy, tentative.
  225. *
  226. * A free/busy provider obtains this interface and the enumeration for a time range for
  227. * a user through IFreeBusyData.
  228. *
  229. */
  230. class IEnumFBBlock : public IUnknown {
  231. public:
  232. /**
  233. * Gets the next specified number of blocks of free/busy data in an enumeration.
  234. *
  235. * @param[in] celt Number of free/busy data blocks in pblk to retrieve.
  236. * @param[in] pblk Pointer to an array of free/busy blocks. The array is allocated a size of celt.
  237. The requested free/busy blocks are returned in this array.
  238. * @param[out] pcfetch Number of free/busy blocks actually returned in pblk.
  239. *
  240. * @retval S_OK The requested number of blocks has been returned.
  241. * @retval S_FALSE The requested number of blocks has not been returned.
  242. */
  243. virtual HRESULT __stdcall Next(LONG celt, FBBlock_1 *pblk, LONG *pcfetch) = 0;
  244. /**
  245. * Skips a specified number of blocks of free/busy data.
  246. *
  247. * @param[in] celt Number of free/busy blocks to skip.
  248. *
  249. * @retval S_OK The requested number of blocks has been skiped.
  250. */
  251. virtual HRESULT __stdcall Skip(LONG celt) = 0;
  252. /**
  253. * Resets the enumerator by setting the cursor to the beginning.
  254. */
  255. virtual HRESULT __stdcall Reset() = 0;
  256. /**
  257. * Creates a copy of the enumerator, using the same time restriction
  258. * but setting the cursor to the beginning of the enumerator.
  259. *
  260. * @param[out] ppclone Pointer to pointer to the copy of IEnumFBBlock interface.
  261. *
  262. * @retval E_OUTOFMEMORY There is insufficient memory for making the copy.
  263. */
  264. virtual HRESULT __stdcall Clone(IEnumFBBlock **ppclone) = 0;
  265. /**
  266. * Restricts the enumeration to a specified time period.
  267. *
  268. * @param[in] ftmStart Start time to restrict enumeration.
  269. * @param[in] ftmEnd End time to restrict enumeration.
  270. *
  271. * @note This method also resets the enumeration.
  272. */
  273. virtual HRESULT __stdcall Restrict(FILETIME ftmStart, FILETIME ftmEnd) = 0;
  274. };
  275. /**
  276. * @interface IFreeBusyData
  277. * For a given user, gets and sets a time range and returns an interface for
  278. * enumerating free/busy blocks of data within this time range.
  279. *
  280. * Class: IFreeBusyData
  281. * Inherits from: IUnknown
  282. * Provided by: Free/busy provider
  283. * Interface identifier: IID_IFreeBusyData
  284. *
  285. * Most of the members in this interface are placeholders reserved for the internal
  286. * use of Outlook and are subject to change. Free/busy providers must implement them only
  287. * as specified, returning only the specified return values.
  288. */
  289. class IFreeBusyData : public IUnknown {
  290. public:
  291. /**
  292. * This member not supported must return E_NOTIMPL.
  293. */
  294. virtual HRESULT __stdcall Reload(void*) = 0;
  295. /**
  296. * Gets an interface for a user that enumerates free/busy blocks of data within a
  297. * specified time range.
  298. *
  299. * @param[out] ppenumfb Interface to enumerate free/busy blocks.
  300. * @param[in] ftmStart Start time for enumeration. It is expressed in FILETIME.
  301. * @param[in] ftmEnd End time for enumeration. It is expressed in FILETIME.
  302. *
  303. * \remarks
  304. * Used to indicate the time range of calendar items for which to retrieve details.
  305. * The values of ftmStart and ftmEnd are cached and returned in a subsequent call of
  306. * IFreeBusyData::GetFBPublishRange.
  307. *
  308. * A free/busy provider can also subsequently use the returned IEnumFBBlock interface
  309. * to access the enumeration.
  310. */
  311. virtual HRESULT __stdcall EnumBlocks(IEnumFBBlock **ppenumfb, FILETIME ftmStart, FILETIME ftmEnd) = 0;
  312. /**
  313. * This member not supported must return E_NOTIMPL.
  314. */
  315. virtual HRESULT __stdcall Merge(void *) = 0;
  316. /**
  317. * This member not supported must return E_NOTIMPL.
  318. */
  319. virtual HRESULT __stdcall GetDelegateInfo(void *) = 0;
  320. /**
  321. * This member not supported must return S_OK.
  322. */
  323. virtual HRESULT __stdcall FindFreeBlock(LONG, LONG, LONG, BOOL, LONG, LONG, LONG, FBBlock_1 *) = 0;
  324. /**
  325. * This member not supported must return E_NOTIMPL.
  326. */
  327. virtual HRESULT __stdcall InterSect(void *, LONG, void *) = 0;
  328. /**
  329. * Sets the range of time for an enumeration of free/busy block of data for a user.
  330. *
  331. * @param[in] rtmStart
  332. * A relative time value for the start of free/busy information.
  333. * This value is the number of minutes since January 1, 1601.
  334. * @param[in] rtmEnd
  335. * A relative time value for the end of free/busy information.
  336. * This value is the number of minutes since January 1, 1601.
  337. *
  338. * \remarks
  339. * Used to indicate the time range of calendar items for which to retrieve details.
  340. * The values of ftmStart and ftmEnd are cached and returned in a subsequent call of
  341. * IFreeBusyData::GetFBPublishRange.
  342. */
  343. virtual HRESULT __stdcall SetFBRange(LONG rtmStart, LONG rtmEnd) = 0;
  344. /**
  345. * This member not supported must return E_NOTIMPL.
  346. */
  347. virtual HRESULT __stdcall NextFBAppt(void *, ULONG, void *, ULONG, void *, void *) = 0;
  348. /**
  349. * Gets a preset time range for an enumeration of free/busy blocks of data for a user.
  350. *
  351. * @param[out] prtmStart
  352. * A relative time value for the start of free/busy information.
  353. * This value is the number of minutes since January 1, 1601.
  354. * @param[out] prtmEnd
  355. * A relative time value for the end of free/busy information.
  356. * This value is the number of minutes since January 1, 1601.
  357. *
  358. * \remarks
  359. * A free/busy provider calls IFreeBusyData::EnumBlocks or IFreeBusyData::SetFBRange
  360. * to set the time range for an enumeration. IFreeBusyData::GetFBPublishRange must
  361. * return the cached values for the time range set by the most recent call for
  362. * IFreeBusyData::EnumBlocks or IFreeBusyData::SetFBRange.
  363. */
  364. virtual HRESULT __stdcall GetFBPublishRange(LONG *prtmStart, LONG *prtmEnd) = 0;
  365. };
  366. /**
  367. * @interface IFreeBusySupport
  368. * Supports specification of interfaces that access free/busy data for specified users.
  369. *
  370. * Class: IFreeBusySupport
  371. * Inherits from: IUnknown
  372. * Provided by: Free/busy provider
  373. * Interface identifier: IID_IFreeBusySupport
  374. *
  375. * \remarks
  376. * Most of the members in this interface are placeholders reserved for the internal
  377. * use of Outlook and are subject to change. Free/busy providers must implement them
  378. * only as specified, returning only the specified return values.
  379. *
  380. */
  381. class IFreeBusySupport : public IUnknown {
  382. public:
  383. /**
  384. * Initialize the freebusy support object for further uses of the interface.
  385. *
  386. * The first call to get the information to communicate with MAPI
  387. * The freebusysupport holds the session and store to use it in other functions
  388. *
  389. * @param[in] lpMAPISession
  390. * A sessionobject to open a store in other functions of IFreeBusySupport interface
  391. * @param[in] lpMsgStore
  392. * Userstore to save freebusy data. Passing NULL results in the freebusydata is readonly.
  393. * @param[in] bStore
  394. * Unknown data, is true if lpMsgStore isn't NULL
  395. *
  396. */
  397. virtual HRESULT __stdcall Open(IMAPISession* lpMAPISession, IMsgStore* lpMsgStore, BOOL bStore) = 0;
  398. /**
  399. * Close the free/busy support object data.
  400. *
  401. * It will release session and store which are initialized by IFreeBusySupport::Open
  402. *
  403. */
  404. virtual HRESULT __stdcall Close() = 0;
  405. /**
  406. * Returns, for each specified user, an interface for enumerating free/busy blocks
  407. * of data within a time range.
  408. *
  409. * @param[in] cMax
  410. * The number of IFreeBusyData interfaces to return.
  411. * @param[in] rgfbuser
  412. * The array of free/busy users to retrieve data for.
  413. * @param[in,out] prgfbdata
  414. * The array of IFreeBusyData interfaces corresponding to the rgfbuser array
  415. * of FBUser structures.
  416. *
  417. * @note This array of pointers is allocated by the caller and freed by the caller.
  418. * The actual interfaces pointed to are released when the caller is done with them.
  419. * @param[out] phrStatus
  420. * The array of HRESULT results for retrieving each corresponding IFreeBusyData
  421. * interface. The value may be NULL. A result is set to S_OK if corresponding
  422. * prgfbdata is valid.
  423. * @param[out] pcRead
  424. * The actual number of users for which an IFreeBusyData interface has been found.
  425. *
  426. * @retval S_OK
  427. * The call is successful.
  428. */
  429. virtual HRESULT __stdcall LoadFreeBusyData( ULONG cMax, FBUser *rgfbuser, IFreeBusyData **prgfbdata,
  430. HRESULT *phrStatus, ULONG *pcRead) = 0;//18
  431. /**
  432. * This member is a placeholder and is not supported, but hacked now.
  433. *
  434. * @param[in] cUsers
  435. * The number of users in lpUsers
  436. * @param[in] lpUsers
  437. * The array of user information
  438. * @param[out] lppFBUpdate
  439. * Should return array of IFreeBusyUpdate interfaces for each user.
  440. *
  441. * @note This array of pointers is allocated by the caller and freed by the caller.
  442. * The actual interfaces pointed to are released when the caller is done with them.
  443. * @param[out] lpcFBUpdate
  444. * actual returned interfaces in lppFBUpdate
  445. * @param lpData4
  446. * unknown param (always NULL? )
  447. *
  448. * @retval S_OK
  449. * The call is successful.
  450. * @retval E_NOTIMPL
  451. * The is not supported.
  452. *
  453. * @todo research for lpDate4
  454. */
  455. virtual HRESULT __stdcall LoadFreeBusyUpdate(ULONG cUsers, FBUser *lpUsers, IFreeBusyUpdate **lppFBUpdate, ULONG *lpcFBUpdate, void *lpData4) = 0;
  456. /**
  457. * This member not supported must return S_OK.
  458. */
  459. virtual HRESULT __stdcall CommitChanges() = 0;
  460. /**
  461. * This member not supported must return E_NOTIMPL.
  462. */
  463. virtual HRESULT __stdcall GetDelegateInfo(FBUser, void *) = 0;
  464. /**
  465. * This member not supported must return E_NOTIMPL.
  466. */
  467. virtual HRESULT __stdcall SetDelegateInfo(void *) = 0;
  468. /**
  469. * This member not supported must return E_NOTIMPL.
  470. */
  471. virtual HRESULT __stdcall AdviseFreeBusy(void *) = 0;
  472. /**
  473. * This member not supported must return E_NOTIMPL.
  474. */
  475. virtual HRESULT __stdcall Reload(void *) = 0;
  476. /**
  477. * This member not supported must return E_NOTIMPL.
  478. */
  479. virtual HRESULT __stdcall GetFBDetailSupport(void **, BOOL ) = 0;
  480. /**
  481. * This member not supported must return E_NOTIMPL.
  482. */
  483. virtual HRESULT __stdcall HrHandleServerSched(void *) = 0;
  484. /**
  485. * This member not supported must return E_NOTIMPL.
  486. */
  487. virtual HRESULT __stdcall HrHandleServerSchedAccess() = 0;
  488. /**
  489. * This member not supported must return FALSE.
  490. */
  491. virtual BOOL __stdcall FShowServerSched(BOOL ) = 0;
  492. /**
  493. * This member not supported must return S_OK.
  494. */
  495. virtual HRESULT __stdcall HrDeleteServerSched() = 0;
  496. /**
  497. * This member not supported must return E_NOTIMPL.
  498. */
  499. virtual HRESULT __stdcall GetFReadOnly(void *) = 0;
  500. /**
  501. * This member not supported must return E_NOTIMPL.
  502. *
  503. * @note The guid of lpData is
  504. * DEFINE_GUID(IID_I????, 0x00067069, 0x0, 0x0, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46);//{00067069-0000-0000-C000-000000000046}
  505. * lpData vtable are total 24 functions
  506. */
  507. virtual HRESULT __stdcall SetLocalFB(void *) = 0;
  508. /**
  509. * This member not supported must return E_NOTIMPL.
  510. */
  511. virtual HRESULT __stdcall PrepareForSync() = 0;
  512. /**
  513. * This member not supported must return E_NOTIMPL.
  514. */
  515. virtual HRESULT __stdcall GetFBPublishMonthRange(void *) = 0;
  516. /**
  517. * This member not supported must return E_NOTIMPL.
  518. */
  519. virtual HRESULT __stdcall PublishRangeChanged() = 0;
  520. /**
  521. * This member not supported must return E_NOTIMPL.
  522. *
  523. * Alternative name: Clean
  524. */
  525. virtual HRESULT __stdcall CleanTombstone() = 0;
  526. /**
  527. * Get delegate information of a user.
  528. *
  529. * @param[in] sFBUser The user information
  530. * @param[out] lpulStatus A 'unknown struct' with delegate information
  531. * @param[out] prtmStart The start time of the publish range (should be ULONG)
  532. * @param[out] prtmEnd The end time of the publish range (should be ULONG)
  533. *
  534. * @retval E_NOTIMPL
  535. * Not supported, client should send a meeting request
  536. *
  537. * @todo change type of prtmStart and prtmEnd from unsigned int to LONG
  538. * @todo change type lpulStatus to void or the right struct
  539. */
  540. virtual HRESULT __stdcall GetDelegateInfoEx(FBUser sFBUser, unsigned int *lpulStatus, unsigned int *prtmStart, unsigned int *prtmEnd) = 0;
  541. /**
  542. * This member not supported must return E_NOTIMPL.
  543. */
  544. virtual HRESULT __stdcall PushDelegateInfoToWorkspace() = 0;
  545. };
  546. /**
  547. * @interface IFreeBusySupportOutlook2000
  548. * Supports specification of interfaces that access free/busy data for specified users. used in Outlook 2000
  549. *
  550. * Class: IFreeBusySupportOutlook2000
  551. * Inherits from: IUnknown
  552. * Provided by: Free/busy provider
  553. * Interface identifier: IID_IFreeBusySupport
  554. *
  555. * \remarks
  556. * Most of the members in this interface are placeholders reserved for the internal
  557. * use of Outlook and are subject to change. Free/busy providers must implement them
  558. * only as specified, returning only the specified return values.
  559. *
  560. * \warning
  561. * Missing call is CleanTombstone. This is not support in outlook 2000
  562. *
  563. */
  564. class IFreeBusySupportOutlook2000 : public IUnknown {
  565. public:
  566. /*! @copydoc IFreeBusySupport::Open */
  567. virtual HRESULT __stdcall Open(IMAPISession* lpMAPISession, IMsgStore* lpMsgStore, BOOL bStore) = 0;
  568. /*! @copydoc IFreeBusySupport::Close */
  569. virtual HRESULT __stdcall Close() = 0;
  570. /*! @copydoc IFreeBusySupport::LoadFreeBusyData */
  571. virtual HRESULT __stdcall LoadFreeBusyData( ULONG cMax, FBUser *rgfbuser, IFreeBusyData **prgfbdata,
  572. HRESULT *phrStatus, ULONG *pcRead) = 0;//18
  573. /*! @copydoc IFreeBusySupport::LoadFreeBusyUpdate */
  574. virtual HRESULT __stdcall LoadFreeBusyUpdate(ULONG cUsers, FBUser *lpUsers, IFreeBusyUpdate **lppFBUpdate, ULONG *lpcFBUpdate, void *lpData4) = 0;
  575. /*! @copydoc IFreeBusySupport::CommitChanges */
  576. virtual HRESULT __stdcall CommitChanges() = 0;
  577. /*! @copydoc IFreeBusySupport::GetDelegateInfo */
  578. virtual HRESULT __stdcall GetDelegateInfo(FBUser, void *) = 0;
  579. /*! @copydoc IFreeBusySupport::SetDelegateInfo */
  580. virtual HRESULT __stdcall SetDelegateInfo(void *) = 0;
  581. /*! @copydoc IFreeBusySupport::AdviseFreeBusy */
  582. virtual HRESULT __stdcall AdviseFreeBusy(void *) = 0;
  583. /*! @copydoc IFreeBusySupport::Reload */
  584. virtual HRESULT __stdcall Reload(void *) = 0;
  585. /*! @copydoc IFreeBusySupport::GetFBDetailSupport */
  586. virtual HRESULT __stdcall GetFBDetailSupport(void **, BOOL ) = 0;
  587. /*! @copydoc IFreeBusySupport::HrHandleServerSched */
  588. virtual HRESULT __stdcall HrHandleServerSched(void *) = 0;
  589. /*! @copydoc IFreeBusySupport::HrHandleServerSchedAccess */
  590. virtual HRESULT __stdcall HrHandleServerSchedAccess() = 0;
  591. /*! @copydoc IFreeBusySupport::FShowServerSched */
  592. virtual BOOL __stdcall FShowServerSched(BOOL ) = 0;
  593. /*! @copydoc IFreeBusySupport::HrDeleteServerSched */
  594. virtual HRESULT __stdcall HrDeleteServerSched() = 0;
  595. /*! @copydoc IFreeBusySupport::GetFReadOnly */
  596. virtual HRESULT __stdcall GetFReadOnly(void *) = 0;
  597. /*! @copydoc IFreeBusySupport::SetLocalFB */
  598. virtual HRESULT __stdcall SetLocalFB(void *) = 0;
  599. /*! @copydoc IFreeBusySupport::PrepareForSync */
  600. virtual HRESULT __stdcall PrepareForSync() = 0;
  601. /*! @copydoc IFreeBusySupport::GetFBPublishMonthRange */
  602. virtual HRESULT __stdcall GetFBPublishMonthRange(void *) = 0;
  603. /*! @copydoc IFreeBusySupport::PublishRangeChanged */
  604. virtual HRESULT __stdcall PublishRangeChanged() = 0;
  605. /*!
  606. * @copydoc IFreeBusySupport::CleanTombstone
  607. *
  608. * Not supported in outlook 2000
  609. */
  610. // virtual HRESULT __stdcall CleanTombstone() = 0;
  611. /*! @copydoc IFreeBusySupport::GetDelegateInfoEx */
  612. virtual HRESULT __stdcall GetDelegateInfoEx(FBUser sFBUser, unsigned int *lpulStatus, unsigned int *prtmStart, unsigned int *prtmEnd) = 0;
  613. /*! @copydoc IFreeBusySupport::PushDelegateInfoToWorkspace */
  614. virtual HRESULT __stdcall PushDelegateInfoToWorkspace() = 0;
  615. };
  616. } /* namespace */
  617. #endif // FREEBUSY_INCLUDED
  618. /** @} */