FXICS.c File Reference

Fast Transfer and Incremental Change Synchronization operations. More...

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

Functions

_PUBLIC_ enum MAPISTATUS FXCopyFolder (mapi_object_t *obj, uint8_t copyFlags, uint8_t sendOptions, mapi_object_t *obj_source_context)
 
_PUBLIC_ enum MAPISTATUS FXCopyMessages (mapi_object_t *obj, mapi_id_array_t *message_ids, uint8_t copyFlags, uint8_t sendOptions, mapi_object_t *obj_source_context)
 
_PUBLIC_ enum MAPISTATUS FXCopyProperties (mapi_object_t *obj, uint8_t level, uint32_t copyFlags, uint8_t sendOptions, struct SPropTagArray *properties, mapi_object_t *obj_source_context)
 
_PUBLIC_ enum MAPISTATUS FXCopyTo (mapi_object_t *obj, uint8_t level, uint32_t copyFlags, uint8_t sendOptions, struct SPropTagArray *excludes, mapi_object_t *obj_source_context)
 
_PUBLIC_ enum MAPISTATUS FXDestConfigure (mapi_object_t *obj, enum FastTransferDestConfig_SourceOperation sourceOperation, mapi_object_t *obj_destination_context)
 
_PUBLIC_ enum MAPISTATUS FXGetBuffer (mapi_object_t *obj_source_context, uint16_t maxSize, enum TransferStatus *transferStatus, uint16_t *progressStepCount, uint16_t *totalStepCount, DATA_BLOB *blob)
 Get data from source fast transfer object. More...
 
_PUBLIC_ enum MAPISTATUS FXPutBuffer (mapi_object_t *obj_dest_context, DATA_BLOB *blob, uint16_t *usedSize)
 Send data to a destination fast transfer object. More...
 
_PUBLIC_ enum MAPISTATUS GetLocalReplicaIds (mapi_object_t *obj_store, uint32_t IdCount, struct GUID *ReplGuid, uint8_t GlobalCount[6])
 
_PUBLIC_ enum MAPISTATUS ICSSyncConfigure (mapi_object_t *obj, enum SynchronizationType sync_type, uint8_t send_options, uint16_t sync_flags, uint32_t sync_extraflags, DATA_BLOB restriction, struct SPropTagArray *property_tags, mapi_object_t *obj_sync_context)
 
_PUBLIC_ enum MAPISTATUS ICSSyncGetTransferState (mapi_object_t *obj, mapi_object_t *obj_sync_context)
 
_PUBLIC_ enum MAPISTATUS ICSSyncOpenCollector (mapi_object_t *folder, bool isContentsCollector, mapi_object_t *obj_collector)
 
_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateBegin (mapi_object_t *obj_sync_context, enum StateProperty state_property, uint32_t length)
 Initialize an ICS Initial State upload. More...
 
_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateContinue (mapi_object_t *obj_sync_context, DATA_BLOB state)
 Send data for an ICS Initial State upload. More...
 
_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateEnd (mapi_object_t *obj_sync_context)
 Signal completion of an ICS Initial State upload. More...
 
_PUBLIC_ enum MAPISTATUS SetLocalReplicaMidsetDeleted (mapi_object_t *obj_folder, const struct GUID ReplGuid, const uint8_t GlobalCountLow[6], const uint8_t GlobalCountHigh[6])
 
_PUBLIC_ enum MAPISTATUS TellVersion (mapi_object_t *obj_store, uint16_t version[3])
 

Detailed Description

Fast Transfer and Incremental Change Synchronization operations.

Function Documentation

_PUBLIC_ enum MAPISTATUS FXCopyFolder ( mapi_object_t obj,
uint8_t  copyFlags,
uint8_t  sendOptions,
mapi_object_t obj_source_context 
)

Prepare a server for Fast Transfer transmission of a folder hierachy

This function is used to configure a server for a fast-transfer folder hierachy send operation. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the folder object, and any sub-objects (including folder properties and messages). It can optionally copy sub-folders, depending on copyFlags.

Parameters
objthe source object for the operation (folder)
copyFlagsflags that change the copy behaviour (see below)
sendOptionsflags that change the format of the transfer (see FXCopyMessages)
obj_source_contextthe fast transfer source context for future ROPs

copyflags can be zero or more of the following:

  • FastTransferCopyFolder_CopySubfolders to recursively copy any sub-folders and contained messages
  • FastTransferCopyFolder_NoGhostedContent to omit any ghosted content when copying public folders
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXCopyMessages ( mapi_object_t obj,
mapi_id_array_t message_ids,
uint8_t  copyFlags,
uint8_t  sendOptions,
mapi_object_t obj_source_context 
)

Prepare a server for Fast Transfer transmission of a list of messages

This function is used to configure a server for a fast-transfer message send operation. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the message objects, and any sub-objects (including attachments and embedded messages).

Parameters
objthe source object for the operation (folder)
message_idsthe message IDs for the messages to copy.
copyFlagsflags that change the copy behaviour (see below)
sendOptionsflags that change the format of the transfer (see below)
obj_source_contextthe fast transfer source context for future ROPs

copyflags can be zero or more of the following:

  • FastTransferCopyMessage_Move - configure output for move
  • FastTransferCopyMessage_BestBody - output message bodies in original format (if not set, output in RTF)
  • FastTransferCopyMessage_SendEntryId - include message and change identification in the output stream

sendOptions can be zero or more of the following:

  • FastTransfer_Unicode - enable Unicode output
  • FastTransfer_UseCpid (not normally used directly - implied by ForUpload)
  • FastTransfer_ForUpload - (enable Unicode, and advise the server that transfer is server->client->server)
  • FastTransfer_RecoverMode - advise the server that the client supports recovery mode
  • FastTransfer_ForceUnicode - force Unicode output
  • FastTransfer_PartialItem - used for synchronisation download

If the FastTransfer_ForUpload is set, the next call must be TellVersion()

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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_id_array::count, emsmdb_transaction_wrapper(), mapi_id_array_get(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXCopyProperties ( mapi_object_t obj,
uint8_t  level,
uint32_t  copyFlags,
uint8_t  sendOptions,
struct SPropTagArray *  properties,
mapi_object_t obj_source_context 
)

Prepare a server for Fast Transfer transmission of the properties of a folder, message or attachment

This function is used to configure a server for a fast-transfer download of properties. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the specified properties of the source object. It can optionally copy properties of sub-objects, depending on Level.

Parameters
objthe source object for the operation (folder, message or attachment)
levelwhether to copy properties of sub-objects of folders or messages (set to 0) or not (set to any other value)
copyFlagsflags that change the copy behaviour (see below)
sendOptionsflags that change the format of the transfer (see FXCopyMessages)
propertiesthe list of properties to transfer
obj_source_contextthe fast transfer source context for future ROPs

copyflags may be the following:

  • FastTransferCopyProperties_Move to configure as part of a move operation

Be careful in setting level to something other than zero. In particular, if level is non-zero for a message, then the list of recipients, and any attachments or embedded messages, will not be transferred.

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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXCopyTo ( mapi_object_t obj,
uint8_t  level,
uint32_t  copyFlags,
uint8_t  sendOptions,
struct SPropTagArray *  excludes,
mapi_object_t obj_source_context 
)

Prepare a server for Fast Transfer transmission of a folder, message or attachment

This function is used to configure a server for a fast-transfer download of a folder, message or attachment. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the source object, potentially omitting some properties. It can optionally copy sub-objects, depending on Level.

Parameters
objthe source object for the operation (folder, message or attachment)
levelwhether to copy sub-objects of folders or messages (set to 0) or not (set to any other value)
copyFlagsflags that change the copy behaviour (see below)
sendOptionsflags that change the format of the transfer (see FXCopyMessages)
excludesthe list of properties to exclude from the transfer
obj_source_contextthe fast transfer source context for future ROPs

copyflags can be zero or more of the following:

  • FastTransferCopyTo_Move to configure as part of a move operation
  • FastTransferCopyTo_BestBody to use original format for message bodies (if not set, use RTF instead)

Be careful in setting level to something other than zero. In particular, if level is non-zero for a message, then the list of recipients, and any attachments or embedded messages, will not be transferred.

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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXDestConfigure ( mapi_object_t obj,
enum FastTransferDestConfig_SourceOperation  sourceOperation,
mapi_object_t obj_destination_context 
)

Prepare a server for Fast Transfer receive

This function is used to configure a server for fast-transfer receive operation. This could be the target server in a server->client->server copy, or for a client->server upload.

Parameters
objthe target object for the upload (folder, message or attachment)
sourceOperationthe type of transfer (one of FastTransferDest_CopyTo, FastTransferDest_CopyProperties,FastTransferDest_CopyMessages or FastTransferDest_CopyFolder)
obj_destination_contextthe fast transfer context for future ROPs.
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXGetBuffer ( mapi_object_t obj_source_context,
uint16_t  maxSize,
enum TransferStatus *  transferStatus,
uint16_t *  progressStepCount,
uint16_t *  totalStepCount,
DATA_BLOB *  blob 
)

Get data from source fast transfer object.

Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block is small, it will fit into a single call, and the transferStatus will indicate completion. However larger transfers will require multiple calls.

Parameters
obj_source_contextthe source object (from FXCopyTo, FXCopyProperties, FXCopyFolder or FXCopyMessages)
maxSizethe maximum size (pass 0 to indicate maximum available size)
transferStatusresult of the transfer
progressStepCountthe approximate number of steps (of totalStepCount) completed
totalStepCountthe approximate number of steps (total)
blobthis part of the transfer
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS FXPutBuffer ( mapi_object_t obj_dest_context,
DATA_BLOB *  blob,
uint16_t *  usedSize 
)

Send data to a destination fast transfer object.

Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block is small, it will fit into a single call, and the transferStatus will indicate completion. However larger transfers will require multiple calls.

Parameters
obj_dest_contextthe destination object (from FXDestConfigure)
blobthis part of the transfer
usedSizehow many bytes of this part of the transfer that were used (only less than the total if an error occurred)
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS GetLocalReplicaIds ( mapi_object_t obj_store,
uint32_t  IdCount,
struct GUID *  ReplGuid,
uint8_t  GlobalCount[6] 
)

Reserves a range of IDs to be used by a local replica

Parameters
obj_storepointer on the store MAPI object
IdCountID range length to reserve
ReplGuidpointer to the GUID structure returned by the server
GlobalCountbyte array that specifies the first allocated field
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), OPENCHANGE_CHECK_NOTIFICATION, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncConfigure ( mapi_object_t obj,
enum SynchronizationType  sync_type,
uint8_t  send_options,
uint16_t  sync_flags,
uint32_t  sync_extraflags,
DATA_BLOB  restriction,
struct SPropTagArray *  property_tags,
mapi_object_t obj_sync_context 
)

Prepare a server for ICS download

This function is used to configure a server for ICS (Incremental Change Synchronization) download. You use the synchronization context handle for other ICS and Fast Transfer operations.

Parameters
objthe target object for the upload (folder)
sync_typethe type of synchronization that will be performed (just folder contents, or whole folder hierachy)
send_optionsflags that change the format of the transfer (see FXCopyMessages)
sync_flagsflags that change the behavior of the transfer (see below)
sync_extraflagsadditional flags that change the behavior of the transfer (see below)
restrictiona Restriction structure to limit downloads (only for sync_type == SynchronizationType_Content)
property_tagsthe properties to exclude (or include, if SynchronizationFlag_OnlySpecifiedProperties flag is set) in the download
obj_sync_contextthe resulting synchronization context handle

sync_flags can be zero or more of the following:

  • SynchronizationFlag_Unicode to use Unicode format (must match in send_options)
  • SynchronizationFlag_NoDeletions - whether to download changes about message deletion
  • SynchronizationFlag_IgnoreNoLongerInScope - whether to download changes for messages that have gone out of scope.
  • SynchronizationFlag_ReadState - server to download changes to read state
  • SynchronizationFlag_FAI server to download changes to FAI messages
  • SynchronizationFlag_Normal - server to download changes to normal messages
  • SynchronizationFlag_OnlySpecifiedProperties - set means to include only properties that are listed in property_tags, not-set means to exclude properties that are listed in property_tags
  • SynchronizationFlag_NoForeignIdentifiers - ignore persisted values (usually want this set)
  • SynchronizationFlag_BestBody - format for outputting message bodies (set means original format, not-set means output in RTF)
  • SynchronizationFlag_IgnoreSpecifiedOnFAI - ignore property_tags restrictions for FAI messages
  • SynchronizationFlag_Progress - whether to output progress information.
Note
SynchronizationFlag_IgnoreNoLongerInScope, SynchronizationFlag_ReadState, SynchronizationFlag_FAI, SynchronizationFlag_Normal, SynchronizationFlag_OnlySpecifiedProperties, SynchronizationFlag_BestBody and SynchronizationFlag_IgnoreSpecifiedOnFAI are only valid if the synchronization type is SynchronizationType_Content.

sync_extraflags can be zero or more of the following:

  • SynchronizationExtraFlag_Eid - whether the server includes the PR_FID / PR_MID in the download
  • SynchronizationExtraFlag_MessageSize - whether the server includes the PR_MESSAGE_SIZE property in the download (only for sync_type == SynchronizationType_Content)
  • SynchronizationExtraFlag_Cn - whether the server includes the PR_CHANGE_NUM property in the download.
  • SynchronizationExtraFlag_OrderByDeliveryTime - whether the server sends messages sorted by delivery time (only for sync_type == SynchronizationType_Content)
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncGetTransferState ( mapi_object_t obj,
mapi_object_t obj_sync_context 
)

obtain an object to get the sync transfer state

Parameters
objthe source object
obj_sync_contextthe synchronization transfer state object
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncOpenCollector ( mapi_object_t folder,
bool  isContentsCollector,
mapi_object_t obj_collector 
)

Prepare a folder for ICS upload

Parameters
folderthe folder for the collector creation
isContentsCollectortrue for contents collector, false for hierachy collector
obj_collectorpointer to the resulting ICS collector
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateBegin ( mapi_object_t obj_sync_context,
enum StateProperty  state_property,
uint32_t  length 
)

Initialize an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateContinue and ICSSyncUploadStateEnd) used to send the initial state for an ICS download to the server.

Parameters
obj_sync_contextthe synchronization context (from ICSSyncConfigure)
state_propertythe type of ICS state that will be uploaded (see below)
lengththe length (in bytes) of the ICS state that will be uploaded

state_property can be one of the following:

  • PidTagIdsetGiven
  • PidTagCnsetSeen
  • PidTagCnsetSeenFAI
  • PidTagCnsetRead
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateContinue ( mapi_object_t obj_sync_context,
DATA_BLOB  state 
)

Send data for an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateEnd) used to send the initial state for an ICS download to the server.

Parameters
obj_sync_contextthe synchronization context (from ICSSyncConfigure)
statethe state data for this part of the upload
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateEnd ( mapi_object_t obj_sync_context)

Signal completion of an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateContinue) used to send the initial state for an ICS download to the server.

Parameters
obj_sync_contextthe synchronization context (from ICSSyncConfigure)
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS SetLocalReplicaMidsetDeleted ( mapi_object_t obj_folder,
const struct GUID  ReplGuid,
const uint8_t  GlobalCountLow[6],
const uint8_t  GlobalCountHigh[6] 
)

Mark a range of Message Ids as deleted / unused

This function allows the client to specify that a specific range of message identifiers will never be used on a particular folder. This allows the server to make optimisations for message identifier sets during incremental change synchronisation operations.

Parameters
obj_folderpointer to the folder MAPI object
ReplGuidthe GUID for the MIDSET
GlobalCountLowlower end of the range to be marked as deleted
GlobalCountHighupper end of the range to be marked as deleted
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_INVALID_PARAMETER: one of the function parameters is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), OPENCHANGE_CHECK_NOTIFICATION, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS TellVersion ( mapi_object_t obj_store,
uint16_t  version[3] 
)

Advise a server of the "other server" version

This function is used to set up a fast server-client-server transfer.

Parameters
obj_storepointer to the store MAPI object
versionthe server version
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_INVALID_PARAMETER: one of the function parameter is invalid
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References emsmdb_transaction_wrapper(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), and OPENCHANGE_RETVAL_IF.


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/