2.2.1.4 VersionVectorData

The VersionVectorData structure provides information about the DFS-R version vector. The DFS-R version vector is an array of identifiers and versions of modified files in a replicated folder. The version vector is specified in [MS-FRS2] section 2.2.1.4.1. The UUID for this structure is {7A2323C7-9EBE-494a-A33C-3CC329A18E1D}.

 typedef[uuid(7A2323C7-9EBE-494a-A33C-3CC329A18E1D)] 
    struct VersionVectorData {
   long uncompressedSize;
   long backlogCount;
   BSTR contentSetGuid;
   VARIANT versionVector;
 } _VersionVectorData;

uncompressedSize: MUST be the number of bytes in the uncompressed version vector. The version vector is defined by FRS_ASYNC_VERSION_VECTOR_RESPONSE, as specified in [MS-FRS2] section 2.2.1.4.12.

backlogCount: MUST be the number of backlogged transactions for the replicated folder on the server.

contentSetGuid: MUST be a string representation of the GUID of the replicated folder.

versionVector: MUST be the version vector for the replicated folder whose GUID is specified by the contentSetGuid field.

The version vector is either compressed (that is, an encoded field whose format is specified by the DFS-R compression algorithm (as specified in [MS-FRS2] section 3.1.1.1) or uncompressed. The version vector MUST be represented by a VARIANT field that has a VT_BSTR variant type.

The client MUST determine whether the version vector is compressed by applying the following rules:

  • If the sum of the number of characters, including the terminating null character in the BSTR, multiplied by the size, in bytes, of a Unicode character (2 bytes) is less than the value of the uncompressedSize field, the version vector is sent in compressed form. See [UNICODE4.0].

  • Otherwise, the version vector is uncompressed.

    The compressed or uncompressed version vector MUST be encoded in a BSTR and passed by using the versionVector.bstrVal field.

    The compressed or uncompressed version vector buffer MUST be encoded in a BSTR by applying the following rules:

  • The length, in bytes, of the BSTR buffer MUST be greater than or equal to the value of the size of the binary data that is to be encoded.

  • The part of the BSTR buffer between offsets 0 and "length - 1" MUST be filled by the compressed or uncompressed data, as specified previously. The remainder of the BSTR buffer (if any) MUST be ignored by the server.