libmapi/freebusy.c File Reference

Convenient API to access FreeBusy. More...

#include <libmapi/libmapi.h>
#include <ctype.h>

Functions

_PUBLIC_ int GetFreeBusyYear (const uint32_t *publish_start)
_PUBLIC_ enum MAPISTATUS GetUserFreeBusyData (mapi_object_t *obj_store, const char *recipient, struct SRow *pSRow)
_PUBLIC_ enum MAPISTATUS IsFreeBusyConflict (mapi_object_t *obj_store, struct FILETIME *date, bool *conflict)

Detailed Description

Convenient API to access FreeBusy.


Function Documentation

_PUBLIC_ int GetFreeBusyYear ( const uint32_t *  publish_start  ) 

Return the year associated with the FreeBusy start range

Parameters:
publish_start pointer to the publish start integer
Returns:
a valid year on success, otherwise 0

Referenced by IsFreeBusyConflict().

_PUBLIC_ enum MAPISTATUS GetUserFreeBusyData ( mapi_object_t obj_store,
const char *  recipient,
struct SRow *  pSRow 
)

Retrieve FreeBusy data associated with the specified recipient

Parameters:
obj_store pointer to the public folder MAPI object
recipient name of the recipient to fetch freebusy data
pSRow pointer to the returned properties
Note:
The function returns a SRow structure with the following property tags:
  1. PR_NORMALIZED_SUBJECT
  2. PR_FREEBUSY_LAST_MODIFIED
  3. PR_FREEBUSY_START_RANGE
  4. PR_FREEBUSY_END_RANGE
  5. PR_FREEBUSY_ALL_MONTHS
  6. PR_FREEBUSY_ALL_EVENTS
  7. PR_FREEBUSY_TENTATIVE_MONTHS
  8. PR_FREEBUSY_TENTATIVE_EVENTS
  9. PR_FREEBUSY_BUSY_MONTHS
  10. PR_FREEBUSY_BUSY_EVENTS
  11. PR_FREEBUSY_OOF_MONTHS
  12. PR_FREEBUSY_OOF_EVENTS
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References FindRow(), FREEBUSY_FOLDER, FREEBUSY_USER, get_SPropValue_SRowSet_data(), GetABRecipientInfo(), GetContentsTable(), GetDefaultPublicFolder(), GetHierarchyTable(), GetProps(), global_mapi_ctx, mapi_object_get_session(), mapi_object_init(), mapi_object_release(), MAPIFreeBuffer(), olFolderPublicFreeBusyRoot, OPENCHANGE_RETVAL_IF, OpenFolder(), OpenMessage(), ORG, ORG_UNIT, PR_ADDRBOOK_MID, PR_DISPLAY_NAME, PR_EMAIL_ADDRESS_UNICODE, PR_FID, PR_FREEBUSY_ALL_EVENTS, PR_FREEBUSY_ALL_MONTHS, PR_FREEBUSY_BUSY_EVENTS, PR_FREEBUSY_BUSY_MONTHS, PR_FREEBUSY_END_RANGE, PR_FREEBUSY_LAST_MODIFIED, PR_FREEBUSY_OOF_EVENTS, PR_FREEBUSY_OOF_MONTHS, PR_FREEBUSY_START_RANGE, PR_FREEBUSY_TENTATIVE_EVENTS, PR_FREEBUSY_TENTATIVE_MONTHS, PR_INSTANCE_NUM, PR_MID, PR_NORMALIZED_SUBJECT, RES_PROPERTY, set_SPropTagArray(), SetColumns(), SortTable(), and x500_get_dn_element().

Referenced by IsFreeBusyConflict().

_PUBLIC_ enum MAPISTATUS IsFreeBusyConflict ( mapi_object_t obj_store,
struct FILETIME *  date,
bool *  conflict 
)

Check if a date conflicts with existing FreeBusy Busy/Out Of Office events

Parameters:
obj_store pointer to the public folder MAPI object
date pointer to the date to check
conflict pointer to the returned boolean value
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References find_SPropValue_data(), GetFreeBusyYear(), GetUserFreeBusyData(), global_mapi_ctx, mapi_object_get_session(), OPENCHANGE_RETVAL_IF, PR_FREEBUSY_ALL_EVENTS, PR_FREEBUSY_ALL_MONTHS, PR_FREEBUSY_START_RANGE, mapi_session::profile, and mapi_profile::username.


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/