Class SyncML_Device_P800

Description

P800/P900/P910: --------------- Charset: This device is able to handle UTF-8 and sends its XML packages in UTF8.

However even though the XML itself is UTF-8, it expects the enclosed vcard-data to be ISO-8859-1 unless explicitly stated otherwise (using the CHARSET option, which is deprecated for VCARD 3.0)

Encoding: String values are encoded "QUOTED-PRINTABLE"

Other: This devices handles tasks and events in one database.

As the P800 was the first device to work with package, most of the required conversions are in Device.php's default handling.

Copyright 2005-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

$Horde: framework/SyncML/SyncML/Device/P800.php,v 1.7.2.14 2009/01/06 15:23:39 jan Exp $

Located in /SyncML/SyncML/Device/P800.php (line 30)

SyncML_Device
   |
   --SyncML_Device_P800
Method Summary
 array convertClient2Server (string $content, string $contentType)
 array convertServer2Client (string $content, string $contentType, string $database)
Variables

Inherited Variables

Inherited from SyncML_Device

SyncML_Device::$requestedContentType
Methods
convertClient2Server (line 41)

Convert the content.

  • return: array($newcontent, $newcontentType): the converted content and the (possibly changed) new ContentType.
array convertClient2Server (string $content, string $contentType)
  • string $content: The content to convert.
  • string $contentType: The contentType of the content.

Redefinition of:
SyncML_Device::convertClient2Server()
Converts the content received from the client for the backend.
convertServer2Client (line 94)

Converts the content from the backend to a format suitable for the client device.

Strips the uid (primary key) information as client and server might use different ones.

  • return: Three-element array with the converted content, the (possibly changed) new content type, and encoding type (like b64 as used by Funambol).
array convertServer2Client (string $content, string $contentType, string $database)
  • string $content: The content to convert
  • string $contentType: The content type of content as returned from the backend
  • string $database: The server database URI.

Redefinition of:
SyncML_Device::convertServer2Client()
Converts the content from the backend to a format suitable for the client device.
handleTasksInCalendar (line 131)

Some devices like the Sony Ericsson P800/P900/P910 handle vtodos (tasks) and vevents in the same "calendar" sync.

This requires special actions on our side as we store this in different databases (nag and kronolith). This function could directly return true but tries to be a bit more generic so it might work for other phones as well.

void handleTasksInCalendar ()

Redefinition of:
SyncML_Device::handleTasksInCalendar()
Returns whether the device handles tasks and events in a single "calendar" sync.
omitIndividualSyncStatus (line 149)

Send individual status response for each Add,Delete,Replace.

The P800 class of devices seem to have trouble with too many status responses. So omit them for these (and only these),

void omitIndividualSyncStatus ()

Redefinition of:
SyncML_Device::omitIndividualSyncStatus()
Returns whether to send individual status response for each Add, Delete and Replace.

Inherited Methods

Inherited From SyncML_Device

 SyncML_Device::convertClient2Server()
 SyncML_Device::convertServer2Client()
 SyncML_Device::convertUTC2LocalTime()
 SyncML_Device::factory()
 SyncML_Device::getPreferredContentType()
 SyncML_Device::getPreferredContentTypeClient()
 SyncML_Device::handleTasksInCalendar()
 SyncML_Device::omitIndividualSyncStatus()
 SyncML_Device::useCdataTag()
 SyncML_Device::useLocalTime()

Documentation generated on Sun, 30 Jan 2011 05:20:14 +0000 by phpDocumentor 1.4.3