If a sync client needs any kind of special conversion of the data sent to it
or received from it, this is done here. There are two sources of information
to identify an device: The first (and better) one is the DevInf device info
sent by the device during a request. If DevInf is not supported or sent by
the client, the Source/LocURI of the device request might be sufficent to
identify it.
Copyright 2005-2016 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
getPreferredContentType()
public method
When a client sends data during a sync but does not provide information
about the MIME content type with this individual item, this function
returns the content type the item is supposed to be in.
getPreferredContentTypeClient()
public method
The result is passed as an option to the backend export functions.
This is not the content type ultimately passed to the client but rather
the content type presented to the backend export functions.
After the data is retrieved from the backend, convertServer2Client()
can do some post-processing and set the correct content type acceptable
for the client if necessary.
The default implementation tries to extract the content type from the
device info. If this does not work, some defaults are used.
If the client does not provice proper DevInf data, this public function may
have to be overwritten to return the correct values.
public getPreferredContentTypeClient ( string $serverSyncURI, string $sourceSyncURI ) |
$serverSyncURI |
string |
The URI for the server database: contacts,
notes, calendar or tasks. |
$sourceSyncURI |
string |
The URI for the client database. This is
needed as the DevInf is grouped by
sourceSyncURIs. |
$requestedContentType public_oe property
The original preferred content type of the client, if provided through
DevInf.
public string $requestedContentType |
return |
string |
|