共用方式為


2.2.3.34 Conflict

The Conflict element is an optional child element of the Options element in Sync command requests that specifies how to resolve the conflict that occurs when an object has been changed on both the client and the server. The value specifies which object—the client object or the server object—to keep if there is a conflict.

All elements referenced in this section are defined in the AirSync namespace.

Command request/response

Parent elements

Child elements

Data type

Number allowed

Sync command request (section 2.2.1.21)

Options (section 2.2.3.125.6)

None

unsignedByte ([MS-ASDTYPE] section 2.8)

0...1 (optional)

The following table lists valid values for the element.

Value

Meaning

0

Client object replaces server object.

1

Server object replaces client object.

If the Conflict element is not present, the server object will replace the client object when a conflict occurs.

A value of 0 (zero) means to keep the client object; a value of 1 means to keep the server object. If the value is 1 and there is a conflict, a Status element (section 2.2.3.177.17) value of 7 is returned to inform the client that the object that the client sent to the server was discarded.

The Conflict element applies to the entire collection; therefore, it is not possible to apply the Conflict element value to individual items within the collection.

The Conflict element is a child of the Options element, and therefore the Conflict element appears only in requests to the server from the client.

The result of including more than one Conflict element as the child of an Options element is undefined. The server MAY return a protocol status error in response to such a command request.

If a Delete element (section 2.2.3.42.2) conflicts with an Add (section 2.2.3.7.2) or Change element (section 2.2.3.24), the Delete element takes precedence.

Protocol Versions

The following table specifies the protocol versions that support this element. The client indicates the protocol version being used by setting either the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section 2.2.1.1.2.6, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Element support

2.5

Yes

12.0

Yes

12.1

Yes

14.0

Yes

14.1

Yes

16.0

Yes

16.1

Yes