IMAPISession.c File Reference

Session initialization options. More...

#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"

Functions

_PUBLIC_ enum MAPISTATUS OpenMsgStore (struct mapi_session *session, mapi_object_t *obj_store)
 
_PUBLIC_ enum MAPISTATUS OpenPublicFolder (struct mapi_session *session, mapi_object_t *obj_store)
 
_PUBLIC_ enum MAPISTATUS OpenUserMailbox (struct mapi_session *session, const char *username, mapi_object_t *obj_store)
 

Detailed Description

Session initialization options.

Function Documentation

_PUBLIC_ enum MAPISTATUS OpenMsgStore ( struct mapi_session session,
mapi_object_t obj_store 
)

Open the Message Store

This function opens the main message store. This allows access to the normal user folders.

Parameters
sessionpointer to the MAPI session context
obj_storethe result of opening the store
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
MAPIInitialize which is required before opening the store
GetLastError to check the result of a failed call, if necessary
OpenPublicFolder if you need access to the public folders
Examples:
fetchappointment.c, and fetchmail.c.

References GetLastError(), OPENCHANGE_RETVAL_IF, OpenUserMailbox(), mapi_session::profile, and mapi_profile::username.

_PUBLIC_ enum MAPISTATUS OpenPublicFolder ( struct mapi_session session,
mapi_object_t obj_store 
)

Open the Public Folder store

This function opens the public folder store. This allows access to the public folders.

Parameters
obj_storethe result of opening the store
sessionpointer to the MAPI session context
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
MAPIInitialize which is required before opening the store
GetLastError to check the result of a failed call, if necessary
OpenMsgStore if you need access to the message store folders

References emsmdb_transaction_wrapper(), mapi_obj_store::fid_pf_EFormsRegistry, mapi_obj_store::fid_pf_EFormsRegistryRoot, mapi_obj_store::fid_pf_FreeBusyRoot, mapi_obj_store::fid_pf_ipm_subtree, mapi_obj_store::fid_pf_LocalSiteFreeBusy, mapi_obj_store::fid_pf_LocalSiteOfflineAB, mapi_obj_store::fid_pf_NNTPArticle, mapi_obj_store::fid_pf_non_ipm_subtree, mapi_obj_store::fid_pf_OfflineAB, mapi_obj_store::fid_pf_public_root, GetNewLogonId(), mapi_obj_store::guid, mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_logon_store(), mapi_object_set_session(), OPENCHANGE_CHECK_NOTIFICATION, OPENCHANGE_RETVAL_IF, mapi_object::private_data, mapi_session::profile, PublicFolder, and mapi_obj_store::store_type.

_PUBLIC_ enum MAPISTATUS OpenUserMailbox ( struct mapi_session session,
const char *  username,
mapi_object_t obj_store 
)

Open another user mailbox

This function opens the main message store. This allows access to the normal user folders.

Parameters
sessionpointer to the MAPI session context
usernamename of the user's mailbox to open
obj_storethe result of opening the store
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
MAPIInitialize which is required before opening the store
GetLastError to check the result of a failed call, if necessary
OpenPublicFolder if you need access to the public folders

References emsmdb_transaction_wrapper(), mapi_obj_store::fid_common_views, mapi_obj_store::fid_deferred_actions, mapi_obj_store::fid_deleted_items, mapi_obj_store::fid_inbox, mapi_obj_store::fid_mailbox_root, mapi_obj_store::fid_outbox, mapi_obj_store::fid_schedule, mapi_obj_store::fid_search, mapi_obj_store::fid_sent_items, mapi_obj_store::fid_shortcuts, mapi_obj_store::fid_spooler_queue, mapi_obj_store::fid_top_information_store, mapi_obj_store::fid_views, GetNewLogonId(), mapi_obj_store::guid, mapi_profile::mailbox, mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_logon_store(), mapi_object_set_session(), OPENCHANGE_CHECK_NOTIFICATION, OPENCHANGE_RETVAL_CALL_IF, OPENCHANGE_RETVAL_IF, mapi_profile::org, mapi_profile::ou, mapi_object::private_data, PrivateFolderWithoutCachedFids, mapi_session::profile, and mapi_obj_store::store_type.

Referenced by OpenMsgStore().


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/