4.2.1 Setting a Flag
The following example shows a Sync command request ([MS-ASCMD] section 2.2.1.21) sent from the client to the server to set a flag with a start date and due date, but with no reminder.
-
<?xml version="1.0" encoding="utf-8"?> <Sync xmlns:email="Email:" xmlns:tasks="Tasks:" xmlns="AirSync:"> <Collections> <Collection> <SyncKey>1520171944</SyncKey> <CollectionId>5</CollectionId> <DeletesAsMoves>1</DeletesAsMoves> <GetChanges>1</GetChanges> <WindowSize>512</WindowSize> <Commands> <Change> <ServerId>5:3</ServerId> <ApplicationData> <email:Read>1</email:Read> <email:Flag> <email:Status>2</email:Status> <email:FlagType>for Follow Up</email:FlagType> <tasks:StartDate>2009-02-24T08:00:00.000Z</tasks:StartDate> <tasks:UtcStartDate>2009-02-24T08:00:00.000Z</tasks:UtcStartDate> <tasks:DueDate>2009-02-25T12:00:00.000Z</tasks:DueDate> <tasks:UtcDueDate>2009-02-25T12:00:00.000Z</tasks:UtcDueDate> <tasks:ReminderSet>0</tasks:ReminderSet> </email:Flag> </ApplicationData> </Change> </Commands> </Collection> </Collections> </Sync>
The following example shows an independent Sync command response sent from the server to the client to set a flag with a start date, a due date, and a reminder on the client.
-
<?xml version="1.0" encoding="utf-8"?> <Sync xmlns:email="Email:" xmlns:tasks="Tasks:" xmlns="AirSync:"> <Collections> <Collection> <SyncKey>735431712</SyncKey> <CollectionId>5</CollectionId> <Status>1</Status> <Commands> <Change> <ServerId>5:7</ServerId> <ApplicationData> <email:Flag> <tasks:DueDate>2009-02-20T08:00:00.000Z</tasks:DueDate> <tasks:UtcDueDate>2009-02-20T08:00:00.000Z</tasks:UtcDueDate> <tasks:UtcStartDate>2009-02-19T08:00:00.000Z</tasks:UtcStartDate> <tasks:Subject>With Reminder</tasks:Subject> <email:Status>2</email:Status> <email:FlagType>Flag for follow up</email:FlagType> <tasks:StartDate>2009-02-19T08:00:00.000Z</tasks:StartDate> <tasks:ReminderSet>1</tasks:ReminderSet> <tasks:ReminderTime>2009-02-19T21:00:00.000Z</tasks:ReminderTime> </email:Flag> </ApplicationData> </Change> </Commands> </Collection> </Collections> </Sync>