• A synchronization protocol (session layer?)
• Transport bindings for the synchronization protocol (between session layer and transport layer)
2. SyncML的几个概念(1.2)
1.Anchor-- timestamp(Last,Next),initiate slow sync
2.ID Mapping -- LUID(device) GUID(server) server maintain map LUID and GUID.
3.Security -- MD5 (128 bit),basic (64 bit)
4.Address (Device:IMEI/Server:URI)
5.Exchange of Device Capabilities
6.Device Memory Management(Free memory)
7.Multiple Message in package--<Final/> 222
8.Large Object Handling -- <MoreData/> 213
9.Suspend and Resume session--
suspend -- 224 Alert code to ‘Interrupt Session’
resume -- 225 device Alert code to ‘Resume Session’,Server uses the previous Sync type
Package #2 (S->D): 返回Anchor和同步类型(two-way/slow sync/...)
Package #3 (D->S): Device用Add/Update/Delete 命令把Device需要同步的记录发过去
Package #4 (S->D): Server对Device的命令返回status code表明Server是否接受,用Add/Update/Delete 命令把Server需要同步的记录发给Device
Alert Codes used at the synchronization initialization
200
TWO-WAY
Specifies a client-initiated, two-way sync
201
SLOW SYNC
Specifies a client-initiated, two-way slow-sync.
202
ONE-WAY FROM CLIENT
Specifies the client-initiated, one-way only sync from the
client to the server
203
REFRESH FROM CLIENT
Specifies the client-initiated, refresh operation for the oneway only sync from the client to the server.
204
ONE-WAY FROM SERVER
Specifies the client-initiated, one-way only sync from the
server to the client
205
REFRESH FROM SERVER
Specifies the client-initiated, refresh operation of the oneway only sync from the server to the client.
Alert Codes used by the server when alerting the sync
206
TWO-WAY BY SERVER
Specifies a server-initiated, two-way sync
207
ONE-WAY FROM
CLIENT BY SERVER
Specifies the server-initiated, one-way only sync from the
client to the server
命令名称
在 SyncML 服务器环境中的功能描述
Add
用于指示服务器在客户机的数据中建立了新的内容(比如说在电话本中新建一项)
Alert
用于通知服务器。所谓通知就是一些同步请求,其中携带了表示客户机数据库状态的数据。请参考 example.xml 中 CmdID2 和 3 的 Alert 命令,它们请求的是同步日历与电话本。 Data 元素所关联的代码指明了请求的类型,在这个例子中类型为 201 ,意思是“慢同步”(Slow Synchrionization)。在“SyncML Sync Representation 勘误信息”规范中可以找到这些代码的完整列表(请参阅 参考资料)。
Copy
请求在接收者数据库中的其他位置创建某个项的拷贝。
Delete
请求从服务器的数据库中永久删除某项。
Get
显式地请求根据所请求的 URI 从服务器数据库中获取数据项。
Map
用于维护将本地资源标识与远程资源对应的映射表。比如说,移动电话上的某项资源可能具有一个2字节的标识,而在服务器上,同一项资源的 ID 则用一个16个字符的字符串表示。
Put
用于将数据项上传到服务器指定的 URI 处。比如说 example.xml 中处理 CmdID 1 的 Put 命令。这一命令请求服务器将电话的容量(已经 SyncML Device Information DTD 编码)存储到相对 URI /devinf10 处。 Put 命令在设备同步之外使用。
Replace
请求将指定的对象替换成同步信息中的一部分。
Results
用于携带 Get 等请求返回的结果对象。
Status
用于返回与请求相关的状态代码。
Sync
用于将一组命令(如 Add、Replace 、及 Delete )封装成一次同步。
Appendix
IMEI
IMEI(International Mobile Equipment Identity)是国际移动设备身份码的缩写,国际移动装备辨识码,是由15位数字组成的"电子串号",它与每台手机一一对应,而且该码是全世界唯一的。每一只手机在组装完成后都将被赋予一个全球唯一的一组号码,这个号码从生产到交付使用都将被制造生产的厂商所记录。
IMEI为TAC + FAC + SNR + SP
1、前6位数(TAC)是"型号核准号码",一般代表机型。
2、接着的2位数(FAC)是"最后装配号",一般代表产地。
3、之后的6位数(SNR)是"串号",一般代表生产顺序号。
4、最后1位数(SP)通常是"0",为检验码,目前暂备用。
IMEI码贴在手机背面的标志上,并且读写于手机内存中。它也是该手机在厂家的"档案"和"身份证号"。