ACAPI_​TeamworkControl_​GetLockableStatus

Retrieves the reservation status of a lockable object set.

    API_LockableStatus  ACAPI_TeamworkControl_GetLockableStatus (
        const API_Guid&                    objectId,
        GS::PagedArray<GS::UniString>*     conflicts = nullptr
    );

 

Parameters

objectId
[in] Unique identifier of the lockable object set
conflicts
[out] List of conflicting users (optional, can be nullptr or omitted)

 

Return Values

APILockableStatus_NotExist
No Teamwork connection, or the passed objectId parameter does not identifies a valid lockable object set
APILockableStatus_Free
The given lockable object set is available for reservation, not locked
APILockableStatus_Editable
The given lockable object set is editable, already reserved by the current user
APILockableStatus_Locked
The given lockable object set is reserved by someone else
APILockableStatus_NotAvailable
Server is offline or not available

 

Remarks

This function is used to retrieve the current reservation status of a lockable object set.

In a Teamwork project object sets (like attributes, favorites, project info, etc.) can be locked by any project members having sufficient access rights, using the reservation panel on the settings dialogs. Once the user gains the lock, the object set is syncronized from the server project, that is the user practically works with exactly the same data the server has. When releasing it, the modifications to the object set are sent back to the server.

Note that a reserved lockable object set is still editable in offline mode, though you cannot release the object set until the connection status becomes online.

 

Example

See the Example section of the ACAPI_TeamworkControl_ReserveLockable and ACAPI_TeamworkControl_ReleaseLockable functions.

 

Requirements

Version: API 13 or later
Header: ACAPinc.h

 

See Also

ACAPI_TeamworkControl_IsOnline
ACAPI_TeamworkControl_GetLockableStatus
ACAPI_TeamworkControl_FindLockableObjectSet
ACAPI_TeamworkControl_ReserveLockable
ACAPI_TeamworkControl_ReleaseLockable
ACAPI_Notify_CatchLockableReservationChange
Teamwork Control
API Functions