Export (0) Print
Expand All

2.2.3.27.5 Class (Sync)

The Class element is an optional child element of the Collection element, the Add element, or the Options element in Sync command requests. The Class element is an optional child element of the Collection element, the Delete element, the Change element, or the Add element in Sync command responses. The parent element of the Class element in command requests and command responses depends on the protocol version being used. See the details about protocol versions at the end of this section.

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.2.20)

Collection (section 2.2.3.29.2)

Add (section 2.2.3.7.2)

Options (section 2.2.3.115.5)

None

string ([MS-ASDTYPE] section 2.6)

0...1 (optional)

Sync command response

Collection (section 2.2.3.29.2)

Delete (section 2.2.3.42.2)

Change (section 2.2.3.24)

Add (section 2.2.3.7.2)

None

string

0...1 (optional)

As a child of the Collection element in the Sync command request or response, the Class element identifies the class of the item being added to the collection, deleted from the collection, or changed in the collection.

As a child element of the Add element in the Sync command request, the Class element identifies the class of the item being added to the collection.

As a child element of the Options element in the Sync command request, the Class element assigns the filters within the Options container to a given class. Options for the same Class within the same Collection (section 2.2.3.29.2) MUST NOT be redefined. A Status element (section 2.2.3.162.16) value of 4 is returned if options for the same Class within the same Collection are redefined. The Class element is not necessary for the default items contained within the collection (contacts in a contacts folder for example). For example, to sync SMS messages, include an Options node with class "SMS". To also sync email messages at the same time, include another Options node with class "Email". Only SMS messages and email messages can be synchronized at the same time; a request for any other combination of classes will fail with a status value of 4. The result of including more than one Class element as child elements of the Options element is undefined. The server MAY return a protocol status error in response to such a command request.

As a child element of the Delete element in the Sync command response, the Class element identifies the class of the item being deleted from the collection.

As a child element of the Change element in the Sync command response, the Class element identifies the class of the item being changed in the collection.

As a child element of the Add element in the Sync command response, the Class element identifies the class of the item being added to the collection. The Class element is not included in SyncAdd responses when the class of the collection matches the item class. For example, a Sync command response for an email added to the Inbox folder would not include a Class element value of "Email" as the Inbox contains email class content by default. However, a Sync command response for an SMS message added to the Inbox does include the Class value as SMS items are not the default class type of the Inbox.

In all contexts of a Sync command request or Sync command response, the valid Class element values are as follows for the latest protocol version. Details about the protocol versions are provided at the end of this section.

  • Tasks

  • Email

  • Calendar

  • Contacts

  • SMS

  • Notes

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.4, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Element support, child of Collection

Element support, child of Add, Options, Delete, Change

2.5

X

12.0

X

12.1

X

14.0

X

14.1

X

The parent element of this element depends on the protocol version being used. For protocol versions 2.5, 12.0, and 12.1, the parent element is the Collection element in both a command request and a command response. For protocol versions 14.0 and 14.1, the parent element is the Add element or the Options element in a command request; it is the Add element, the Delete element, or the Change element in a command response.

The "SMS" and "Notes" values are valid only when the protocol version being used is 14.0 or 14.1. The values "Tasks", "Email", "Calendar", and "Contacts" are valid for all protocol versions.

The Class element is not present in the Sync response for an SMS deletion when protocol version 14.0 is used.

Show:
© 2014 Microsoft