[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.27
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.27 |
Date: |
Thu, 17 Jun 2004 18:00:27 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.ipc_sync.inc.php
date: 2004/06/17 16:00:27; author: mleonhardt; state: Exp; lines: +32 -15
Log Message:
- completed sourcelist editor
- now using official get admin acl for admin-functionality
- changed mimetype handling
=====================================================================
Index: sync/inc/class.ipc_sync.inc.php
diff -u sync/inc/class.ipc_sync.inc.php:1.26
sync/inc/class.ipc_sync.inc.php:1.27
--- sync/inc/class.ipc_sync.inc.php:1.26 Mon Jun 14 22:30:20 2004
+++ sync/inc/class.ipc_sync.inc.php Thu Jun 17 16:00:27 2004
@@ -179,19 +179,18 @@
* do the sync
* @param string $source source URI of the source to sync
* @param string $LUID - the Items Unique Identifier ID (also called key)
- * @param string $mimetype - holds the mimetype of Itemdata
* @return array returns an array containing of<br>
* array[0] integer value >= 0 if Item is available<br>
* array[1] LUID - returns local unique identifier - can be temporary for
new items<br>
* array[2] itemdata - returns the Item binary data
*/
- function getSyncItemFromId($deviceid, $source, $LUID, $mimetype)
+ function getSyncItemFromId($deviceid, $source, $LUID)
{
if ($this->debug)
- error_log("getSyncItemFromId: '$deviceid', '$source', '$LUID',
'$mimetype'");
+ error_log("getSyncItemFromId: '$deviceid', '$source', '$LUID'");
- return $this->bo->getSyncItemFromId($deviceid, $source, $LUID, $mimetype);
+ return $this->bo->getSyncItemFromId($deviceid, $source, $LUID);
}
/**
@@ -204,24 +203,23 @@
* do the sync
* @param string $source Source-URI of the source to sync
* @param string $LUID - the Items Unique Identifier ID (also called key)
- * @param string $mimetype - holds the mimetype of Itemdata
* @param mixed $Itemdata - holds the Item binary data (base64encoded)
* @return boolean returns true if SyncItem is successful set
*/
- function setSyncItem($deviceid, $source, $LUID, $mimetype, $Itemdata)
+ function setSyncItem($deviceid, $source, $LUID, $Itemdata)
{
// distinguish between encoded data from XML-RPC and data from internal
classes
if (is_array($Itemdata))
{
if ($this->debug)
error_log("setSyncItem: $deviceid, $source, $LUID |" .
serialize($Itemdata));
- return $this->bo->setSyncItem($deviceid, $source, $LUID, $mimetype,
$Itemdata);
+ return $this->bo->setSyncItem($deviceid, $source, $LUID, $Itemdata);
} else
{
if ($this->debug)
error_log("setSyncItem: $deviceid, $source, $LUID |" .
base64_decode($Itemdata));
- return $this->bo->setSyncItem($deviceid, $source, $LUID, $mimetype,
base64_decode($Itemdata));
+ return $this->bo->setSyncItem($deviceid, $source, $LUID,
base64_decode($Itemdata));
}
}
@@ -229,9 +227,9 @@
* TODO: docu
*/
- function setSyncItems($deviceid, $source, $mimetype, $version, $count,
$Items) {
+ function setSyncItems($deviceid, $source, $count, $Items) {
if ($this->debug)
- error_log("setSyncItems: $deviceid, $source, $mimetype, $version,
$count, Items");
+ error_log("setSyncItems: $deviceid, $source, $count, Items");
$result = array();
$fieldcount = 2;
@@ -243,7 +241,7 @@
$deviceid,
$source,
$Items[$arraypointer], // LUID
- $mimetype,
+// $mimetype,
// $version,
$Items[$arraypointer+1] // Data
)
@@ -281,15 +279,15 @@
* @return array returns a linear array of all Items (ID => Data)
*/
- function getSyncItemsbyID($deviceid, $source, $mimetype, $Ids) {
+ function getSyncItemsbyID($deviceid, $source, $Ids) {
if ($this->debug)
- error_log("getSyncItemsbyID: $deviceid, $source, $mimetype, " .
serialize($Ids));
+ error_log("getSyncItemsbyID: $deviceid, $source, " . serialize($Ids));
set_time_limit(0);
$AllItems = array();
foreach($Ids as $iID) {
- $AllItems[] = $this->getSyncItemFromId($deviceid, $source, $iID,
$mimetype);
+ $AllItems[] = $this->getSyncItemFromId($deviceid, $source, $iID);
}
return $AllItems;
@@ -466,6 +464,25 @@
return $this->bo->addClientMappings($deviceid, $source, $mapping);
}
+ /**
+ * delete mapping entries of the last sync with this device
+ *
+ * @param integer $deviceid is the deviceid of the device which whant to
+ * do the sync
+ * @param string $source Source-URI of the source to sync
+ * @param array $deletedLUIDs - array of the Items Unique Identifier (string)
LUIDs which are
+ * deleted
+ * @return boolean true if successful
+ */
+
+ function deleteClientMappings($deviceid, $source, $deletedLUIDs) {
+ if ($this->debug)
+ error_log("addClientMappings: $deviceid, $source, $mapping");
+
+ // TODO implemenation!
+ return true;
+ }
+
/*
* //Tdodo: !! add documentation
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.27,
nomail <=