VDSF
Menu

API functions for vdsf folders.


Functions

VDSF_EXPORT int vdsFolderClose (VDS_HANDLE objectHandle)
 Close a folder.
VDSF_EXPORT int vdsFolderGetFirst (VDS_HANDLE objectHandle, vdsFolderEntry *pEntry)
 Iterate through the folder - no data items are removed from the folder by this function.
VDSF_EXPORT int vdsFolderGetNext (VDS_HANDLE objectHandle, vdsFolderEntry *pEntry)
 Iterate through the folder.
VDSF_EXPORT int vdsFolderOpen (VDS_HANDLE sessionHandle, const char *folderName, size_t nameLengthInBytes, VDS_HANDLE *objectHandle)
 Open an existing folder (see vdsCreateObject to create a new folder).
VDSF_EXPORT int vdsFolderStatus (VDS_HANDLE objectHandle, vdsObjStatus *pStatus)
 Return the status of the folder.


Function Documentation

VDSF_EXPORT int vdsFolderClose ( VDS_HANDLE  objectHandle  ) 

Close a folder.

This function terminates the current access to the folder in shared memory (the folder itself is untouched).

Parameters:
[in] objectHandle The handle to the folder (see vdsFolderOpen).
Returns:
0 on success or a vdsErrors on error.

VDSF_EXPORT int vdsFolderGetFirst ( VDS_HANDLE  objectHandle,
vdsFolderEntry pEntry 
)

Iterate through the folder - no data items are removed from the folder by this function.

Data items which were added by another session and are not yet committed will not be seen by the iterator. Likewise, destroyed data items (even if not yet committed) are invisible.

Parameters:
[in] objectHandle The handle to the folder (see vdsFolderOpen).
[out] pEntry The data structure provided by the user to hold the content of each item in the folder. Memory allocation for this buffer is the responsability of the caller.
Returns:
0 on success or a vdsErrors on error.

VDSF_EXPORT int vdsFolderGetNext ( VDS_HANDLE  objectHandle,
vdsFolderEntry pEntry 
)

Iterate through the folder.

Data items which were added by another session and are not yet committed will not be seen by the iterator. Likewise, destroyed data items (even if not yet committed) are invisible.

Evidently, you must call vdsFolderGetFirst to initialize the iterator.

Parameters:
[in] objectHandle The handle to the folder (see vdsFolderOpen).
[out] pEntry The data structure provided by the user to hold the content of each item in the folder. Memory allocation for this buffer is the responsability of the caller.
Returns:
0 on success or a vdsErrors on error.

VDSF_EXPORT int vdsFolderOpen ( VDS_HANDLE  sessionHandle,
const char *  folderName,
size_t  nameLengthInBytes,
VDS_HANDLE objectHandle 
)

Open an existing folder (see vdsCreateObject to create a new folder).

Parameters:
[in] sessionHandle The handle to the current session.
[in] folderName The fully qualified name of the folder.
[in] nameLengthInBytes The length of folderName (in bytes) not counting the null terminator (null-terminators are not used by the vdsf engine).
[out] objectHandle The handle to the folder, allowing us access to the folder in shared memory. On error, this handle will be set to zero (NULL) unless the objectHandle pointer itself is NULL.
Returns:
0 on success or a vdsErrors on error.

VDSF_EXPORT int vdsFolderStatus ( VDS_HANDLE  objectHandle,
vdsObjStatus pStatus 
)

Return the status of the folder.

Parameters:
[in] objectHandle The handle to the folder (see vdsFolderOpen).
[out] pStatus A pointer to the status structure.
Returns:
0 on success or a vdsErrors on error.

Last updated on April 07, 2008.