ACAPI_​TeamworkControl_​GetHotlinkCacheManagementOwner

Provides the current owner of the Hotlink/XRef Management in Teamwork mode.

    GSErrCode  ACAPI_TeamworkControl_GetHotlinkCacheManagementOwner (
        short*     owner
    );

 

Parameters

owner
[out] userId of the current owner if there is any (must not be nullptr).

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
The given parameter is nullptr.
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

Use this function to get the current owner of the Hotlink/XRef Management.

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.

If the Hotlink/XRef Management is not reserved by anybody the result will be 0.

 

Example


short owner;
GSErrCode err = ACAPI_GetHotlinkCacheManagementOwner (&owner);
if (err == NoError) {
    API_ProjectInfo projectInfo;
    ACAPI_Environment (APIEnv_ProjectID, &projectInfo);
    if (projectInfo.userId == owner)
        ACAPI_WriteReport ("The Hotlink/XRef Management is being reserved by this client.", true);
}

 

Requirements

Version: API 18 or later
Header: ACAPinc.h

 

See Also

ACAPI_TeamworkControl_ReserveHotlinkCacheManagement
ACAPI_TeamworkControl_ReleaseHotlinkCacheManagement
Teamwork Control
API Functions