[ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 368 lignes (14 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
SyncML_Device:: (10 méthodes):
factory()
singleton()
sourceURI()
deviceInfo()
getPreferredContentType()
getPreferredContentTypeClient()
convertClient2Server()
convertServer2Client()
handleTasksInCalendar()
needsCategoryMapping()
Classe: SyncML_Device - X-Ref
The SyncML_Device:: class provides functionality that isfactory() X-Ref |
Pas de description |
singleton() X-Ref |
Pas de description |
sourceURI() X-Ref |
Returns the SourceURI from state. |
deviceInfo() X-Ref |
Returns the DevInf class from state. |
getPreferredContentType($type) X-Ref |
When a client sends data during a sync but does not provide information about the contenttype with this individual item, this function returns the contenttype the item is supposed to be in. As this is only used to parse to the horde's importdata api functions, some simple guesses for the contenttype are completely sufficient: Horde does not care whether data is text/x-vcalendar or text/calendar. |
getPreferredContentTypeClient($serverSyncURI, $sourceSyncURI) X-Ref |
Returns the preferrred contenttype of the client for the given sync data type (contacts/tasks/notes/calendar). The result is passed as an option to the Horde API export functions. Please note that this is not the contentType ultimately passed to the client but rather the contentType presented to the Horde API export functions. For example the contact api supports a contenttype text/x-vcard;version=2.1 to create a vcard in vcard 2.1 format. After the data is retrieved from horde, convertServer2Client can do some post-processing and set the correct contentType acceptable for the client if necessary. The default implementation tries to extract the contenttype from the presented device info. If this does not work, some default are used. If the client does not provice proper DevInf data, this function may have to be overwritten to return the correct values. ServerSyncURI: The server database of the sync: contacts|notes|calendar|tasks sourceSyncURI: The URI for the client database. This is needed as the DevInf is arranged by sourceSyncURIs |
convertClient2Server($content, $contentType) X-Ref |
Convert the content received from the client for the horde backend. Currently strips uid (primary key) information as client and server might use different ones. Charset conversions might be added here too. param: string $content The content to convert param: string $contentType The contentType of the content return: array array($newcontent, $newcontentType): |
convertServer2Client($content, $contentType) X-Ref |
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. Charset conversions might be added here too. param: string $content The content to convert param: string $contentType The contentType of content as returned from return: array array($newcontent, $newcontentType): |
handleTasksInCalendar() X-Ref |
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 determines whether the client does it like that. Currently this is done by checking the DevInf information. For different clients there may be different ways to find out how the client likes its tasks. |
needsCategoryMapping() X-Ref |
Some devices need a mapping of client vs. server categorie names. The backend provides a mechanism for this mapping. It is used when this needsCategoryMapping returns true. For special cases the mapping may also be implemented directly in convertClient2Server and convertServer2Client. In this case needsCategoryMapping may return false. |
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |