phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.15


From: nomail
Subject: [Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.15
Date: Sun, 23 May 2004 16:40:45 -0000

Update of /sync/inc
Modified Files:
        Branch: 
          class.ipc_sync.inc.php

date: 2004/05/03 14:36:02;  author: mkaemmerer;  state: Exp;  lines: +24 -6

Log Message:
- implemented HandleConflict
=====================================================================
Index: sync/inc/class.ipc_sync.inc.php
diff -u sync/inc/class.ipc_sync.inc.php:1.14 
sync/inc/class.ipc_sync.inc.php:1.15
--- sync/inc/class.ipc_sync.inc.php:1.14        Tue Apr 27 09:46:14 2004
+++ sync/inc/class.ipc_sync.inc.php     Mon May  3 14:36:02 2004
@@ -43,6 +43,20 @@
   var $ipcManager;
 
   /**
+   * @var     array   $conflictsolutions holds the mapping array
+   *                  ID (integer) to string of the supported handling 
+   *                  of conflicts
+   * @access  public
+   */
+     
+  var $conflictsolutions = array(
+    1 => 'serverwins', 
+    2 => 'clientwins', 
+    3 => 'duplicate', 
+    4 => 'donothing');
+  
+
+  /**
    * @var     boolean   $debug enable debug-infos
    */
   var $debug=true;
@@ -62,7 +76,7 @@
   }
 
    /**
-    * authenticate a user and device to phpGW to sync.
+    * Authenticate a user and device to phpGW to sync.
     *
     * also writes a log entry to phpGroupware log
     *
@@ -425,14 +439,18 @@
   
  /*
   * //Tdodo: !! add documentation
+  * 
   * possible values:
-  * serverwins, clientwins, serverloses, clientloses, donothing
+  * serverwins, clientwins, duplicate, donothing
   */ 
-  function handleConflict($device_id, $source, $GUID, $LUID)
+  function handleConflict($deviceid, $source, $LUID, $LUIDData)
   {
+    $id = $this->so->GetConflictHandleSetting($deviceid, $source);
+    $res = $this->conflictsolutions[$id];
     if ($this->debug)
-      error_log("handleConflict: $device_id, $source, $GUID, $LUID");
-    return "donothing";    
+      error_log("handleConflict: Device: $deviceid URI: $source Result: $res 
LUID: $LUID LUID-Data: $LUIDData");
+    
+    return $res;    
   }
   
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]