[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.12
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.12 |
Date: |
Thu, 20 May 2004 14:05:06 -0000 |
Update of /sync/inc
Modified Files:
Branch:
class.ipc_sync.inc.php
date: 2004/04/14 17:44:34; author: mkaemmerer; state: Exp; lines: +20 -5
Log Message:
- moved base64_decode from bo to ipc classes
- added todo's for documentation
=====================================================================
No syntax errors detected in -
=====================================================================
Index: sync/inc/class.ipc_sync.inc.php
diff -u sync/inc/class.ipc_sync.inc.php:1.11
sync/inc/class.ipc_sync.inc.php:1.12
--- sync/inc/class.ipc_sync.inc.php:1.11 Tue Apr 6 09:30:55 2004
+++ sync/inc/class.ipc_sync.inc.php Wed Apr 14 17:44:34 2004
@@ -71,7 +71,7 @@
* @return int deviceid (db-entry-id) >= 0 if is successful
*/
- function authenticate($username, $password, $device_id) {
+ function authenticate($username, $password, $device_id) {
if ($this->debug)
error_log("authenticate device: [$username] [$device_id] [$password]");
@@ -96,6 +96,7 @@
* @param int $device_id is the device_id of the device which whant to
* do the sync
* @param string $source Source-URI of the source to sync
+ * // !! todo: correct return parameter
* @return int channel_id (db-entry-id) >= 0 if is successful
*/
@@ -135,6 +136,7 @@
*
* @param string $device_URI is the device_id of the device which whant to
* do the sync
+ * !! add return parameter and describe principal
*/
function readPrincipalByID($device_id) {
@@ -182,9 +184,17 @@
function setSyncItem($device_id, $source, $LUID, $mimetype, $Itemdata) {
if ($this->debug)
- error_log("setSyncItem: $device_id, $source, $LUID, $mimetype |" .
base64_decode($Itemdata));
-
- return $this->bo->setSyncItem($device_id, $source, $LUID, $mimetype,
$Itemdata);
+ {
+ // distinguish between encoded data from XML-RPC and data from internal
classes
+ if (is_array($Itemdata)) {
+ error_log("setSyncItem: $device_id, $source, $LUID, $mimetype |" .
serialize($Itemdata));
+ return $this->bo->setSyncItem($device_id, $source, $LUID, $mimetype,
$Itemdata);
+ } else
+ {
+ error_log("setSyncItem: $device_id, $source, $LUID, $mimetype |" .
base64_decode($Itemdata));
+ return $this->bo->setSyncItem($device_id, $source, $LUID, $mimetype,
base64_decode($Itemdata));
+ }
+ }
}
/**
@@ -220,6 +230,7 @@
foreach($Ids as $iID) {
$AllItems[] = $this->getSyncItemFromId($device_id, $source, $iID,
$mimetype);
}
+ error_log("end of getSyncitemsByID: ". serialize($AllItems));
return $AllItems;
}
@@ -379,6 +390,10 @@
// add IDs
return $this->bo->addClientMappings($device_id, $source, $mapping);
+ }
+
+ function handleConflict()
+ {
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.12,
nomail <=