Reserves the Hotlink/XRef Management in Teamwork mode.
GSErrCode ACAPI_TeamworkControl_ReserveHotlinkCacheManagement ( short* conflict = nullptr );
Parameters
- conflict
- [out] userId of the current owner if there is any (optional, can be
nullptr
).
Return Values
NoError
- The function has completed with success.
Error
- The Hotlink/XRef Management is reserved by another team member.
APIERR_NOPLAN
- There is no open project.
APIERR_NOTEAMWORKPROJECT
- The current project is not a Teamwork project.
For other common errors see the list of error codes.
Remarks
This function is used to reserve the Hotlink/XRef Management.
If the conflict
parameter is given, it will contain the userId of the conflicting team member if there is any.
You can find out more about the owner from the API_SharingInfo structure which can be obtained by calling the ACAPI_Environment function with the APIEnv_ProjectSharingID function code.
The userId of the current Teamwork Client can be retrieved from the API_ProjectInfo structure which can be obtained by calling the ACAPI_Environment function with the APIEnv_ProjectID function code.
This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.
Example
short conflict; GSErrCode err = ACAPI_TeamworkControl_ReserveHotlinkCacheManagement (&conflict); if (err != NoError) { ACAPI_WriteReport ("The Hotlink/XRef Management has been successfully reserved by this client.", true); } else { ACAPI_WriteReport ("The Hotlink/XRef Management has already been reserved.", true); }
Requirements
- Version: API 18 or later
- Header: ACAPinc.h
See Also
ACAPI_TeamworkControl_ReleaseHotlinkCacheManagement
ACAPI_TeamworkControl_GetHotlinkCacheManagementOwner
Teamwork Control
API Functions