ISO IEC 29341-15:2010 pdf – lnformation technology – UPnP device architecture – Part 15-10: Content Synchronization Device Control Protocol – Synchronization Service.
2.3 SynchronIzation Data Structure Management
This subclause describes how a synchronization data structure gets added, modihed and deleted. The synchronization data structure is defined by the A ARG TYPE SvncDats state variable IS.. Clause 2.7.4) and any changes to the data structures get evented by the SyncChanpe state variable. See 2.7.1, SyncChanpe stale variable, and 2.8 “Eventlng and Moderation’ for details on how to send an event message for the synchronization data structure change.
2.3.1 Synchronization Data Structure Addition
Since the same synchronization data structure is kept in the partner devices within a partnership, any addition to the existing synchronization data structure such as adding a new synchronization relationship or new a palrGroup within an existing partnership MUST abide by the following rules:
Note: a new partnership within an existing synchronization relationship is not allowed in this version of the specification.
• When adding a new synchronization relationship or adding a new pairGroup. the two partner devices MUST be in the network. When a partner leaves the network while adding a synchronization data structure, the first partner that receives this addition request MUST not update its synchronization data structure, Likewise, when a partner fails for some reason alter receiving a successful response for addition from the second partner. added synchronization relationship or pairGroup in the second partner MUST be destroyed. To remove such stale data in the second partner, the second partner exchanges its own synchronization data structure with the first partner by invoking the UPnP action ExchanpeSyncOata() when the first partner comes back to the network..
2.3.2 Synchronization Data Structure Modification
Since the same synchronization data structure is kept in all the partner devices, any modifications to the existing synchronization data structure such as modification to an XML element in a synchronization relationship or in a partnership within an existing synchronization relationship or in a pairGroup within an existing partnership MUST follow the following rules:
To modify a synchronization relationship or a partnership or a pairGroup, all partner devices MUST be in the network. When a partner leaves the network while modifying a synchronization data structure, the first partner that receives this modification request MUST not update its synchronization data structure. When a partner fails for some reason after receiving a successful response for modifications from the second partner, the modified synchronization relationship or pairGroup in the second partner MUST be destroyed. To remove such stale data in the second partner, the second partner exchanges its own synchronization data structure with the first partner by invoking the UPnP action ExchanpeSyncData() when the first partner comes back to the network..The partner device can determine the staleness of Its partnership or pairGroup data by comparing the parlnersIt,gxudaleID attribute and the p,rroupcupdateID with the one In the other partner device, respectively. Upon creation of a synchronization data structure, all partner devices MUST keep the pprtnprshi@jodp(e1D and the pairorouø(ak,pdatelO attributes that are increased by 1 whenever a change is made on the partnership or pairGroup that the partner belongs to. II the values of the oprtnershio(uodplelD or Dp,rGrpuo(uDdptelD are ditferent then the partnership information with higher value of Dprtnershfy(duycipteID or oasrGrououodateID is up’todate, and the partner with the lower value MUST update its partnership or pairGroup information with the one from the other partner. After update, the DarInershiDøucipfeID and airGrouSudateiD values on both the partners become identical.
• The change ot the partner device in a partnership is NOT allowed.
• A device which is currently processing a modification request MUST reject any subsequent modification requests on the same data structure or part of the data structure.