phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [18650] * Add source_id parameter to mappings.


From: Johan Gunnarsson
Subject: [Phpgroupware-cvs] [18650] * Add source_id parameter to mappings.
Date: Sun, 20 Jul 2008 12:08:26 +0000

Revision: 18650
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18650
Author:   johang
Date:     2008-07-20 12:08:25 +0000 (Sun, 20 Jul 2008)

Log Message:
-----------
* Add source_id parameter to mappings.
* Remove save_state stuff. Turned out it was not needed.
* <DataStore> in device information must have children. Add dummy stuff for now.

Modified Paths:
--------------
    trunk/syncml/inc/class.somappings.inc.php
    trunk/syncml/inc/class.syncml_command_map.inc.php
    trunk/syncml/inc/class.syncml_database_devinf.inc.php
    trunk/syncml/inc/class.syncml_wbxml_encoder.inc.php

Modified: trunk/syncml/inc/class.somappings.inc.php
===================================================================
--- trunk/syncml/inc/class.somappings.inc.php   2008-07-15 12:18:00 UTC (rev 
18649)
+++ trunk/syncml/inc/class.somappings.inc.php   2008-07-20 12:08:25 UTC (rev 
18650)
@@ -24,7 +24,7 @@
                 * @param $flag   Flag of mapping. NULL to include all.
                 * @return array  Multidimensional array of mappings matched.
                 */
-               function get_mapping($ch_id, $luid, $guid, $flag)
+               function get_mapping($source_id, $ch_id, $luid, $guid, $flag)
                {
                        $GLOBALS['phpgw']->db->query('
                                SELECT *
@@ -65,7 +65,7 @@
                 */
                function get_all_mapped_luids($ch_id)
                {
-                       $mappings = $this->get_mapping($ch_id, NULL, NULL, 
NULL);
+                       $mappings = $this->get_mapping(NULL, $ch_id, NULL, 
NULL, NULL);
 
                        $all_mapped_luids = array();
 
@@ -86,7 +86,7 @@
                 * @param $flag   Flag of mapping. NULL to include all.
                 * @return int    Number of mappings deleted.
                 */
-               function delete_mapping($ch_id, $luid, $guid, $flag)
+               function delete_mapping($source_id, $ch_id, $luid, $guid, $flag)
                {
                        $GLOBALS['phpgw']->db->query('
                                DELETE FROM phpgw_syncml_mappings
@@ -110,7 +110,7 @@
                 * @param $guid   GUID of mapping. NULL to include all.
                 * @param $flag   Flag of mapping. Optional. Defaults to 0.
                 */
-               function insert_mapping($ch_id, $luid, $guid, $flag = 0)
+               function insert_mapping($source_id, $ch_id, $luid, $guid, $flag 
= 0)
                {
                        $GLOBALS['phpgw']->db->query(sprintf("
                                INSERT INTO phpgw_syncml_mappings(

Modified: trunk/syncml/inc/class.syncml_command_map.inc.php
===================================================================
--- trunk/syncml/inc/class.syncml_command_map.inc.php   2008-07-15 12:18:00 UTC 
(rev 18649)
+++ trunk/syncml/inc/class.syncml_command_map.inc.php   2008-07-20 12:08:25 UTC 
(rev 18650)
@@ -47,11 +47,11 @@
                        foreach($this->mapitem as $item)
                        {
                                $somappings->delete_mapping(
-                                       $open_channel['channel_id'],
+                                       NULL, $open_channel['channel_id'],
                                        NULL, $item['target']['locuri'], NULL);
 
                                $somappings->insert_mapping(
-                                       $open_channel['channel_id'],
+                                       NULL, $open_channel['channel_id'],
                                        $item['source']['locuri'], 
$item['target']['locuri'], 0);
                        }
 

Modified: trunk/syncml/inc/class.syncml_database_devinf.inc.php
===================================================================
--- trunk/syncml/inc/class.syncml_database_devinf.inc.php       2008-07-15 
12:18:00 UTC (rev 18649)
+++ trunk/syncml/inc/class.syncml_database_devinf.inc.php       2008-07-20 
12:08:25 UTC (rev 18650)
@@ -96,7 +96,7 @@
                        syncml_logger::get_instance()->log_data('Got decoder',
                                get_class($decoder));
 
-                       $this->_put_devinf($decoder->parse($data));
+                       $this->_put_devinf($decoder->parse($data, new 
xml_mapper()));
                }
 
                function _encode_devinf_10($enc)
@@ -130,7 +130,6 @@
                        $enc->end();
                        $enc->startend('SupportLargeObjs');
                        $enc->start('DataStore');
-                       /*
                        $enc->start('SourceRef');
                        $enc->data('./contacts', SYNCML_ENCODER_TYPE_INLINE);
                        $enc->end();
@@ -161,7 +160,6 @@
                        $enc->data('7', SYNCML_ENCODER_TYPE_INLINE);
                        $enc->end();
                        $enc->end(); // SyncCap
-                       */
                        $enc->end(); // DataStore
                        $enc->end();
                }

Modified: trunk/syncml/inc/class.syncml_wbxml_encoder.inc.php
===================================================================
--- trunk/syncml/inc/class.syncml_wbxml_encoder.inc.php 2008-07-15 12:18:00 UTC 
(rev 18649)
+++ trunk/syncml/inc/class.syncml_wbxml_encoder.inc.php 2008-07-20 12:08:25 UTC 
(rev 18650)
@@ -185,39 +185,6 @@
                {
                }
 
-               /**
-                * @todo save every attribute.
-                */
-               function save_state()
-               {
-                       $this->pointer = strlen($this->structure);
-
-                       $this->saved_state = array
-                       (
-                               $this->ns_stack,
-                               $this->last_tag_code,
-                               $this->last_attributes,
-                               $this->last_payload,
-                               $this->current_code_page
-                       );
-               }
-
-               function reset_state()
-               {
-                       if(!is_null($this->saved_state))
-                       {
-                               $this->structure =
-                                       substr($this->structure, 0, 
$this->pointer);
-
-                               list(
-                                       $this->ns_stack,
-                                       $this->last_tag_code,
-                                       $this->last_attributes,
-                                       $this->last_payload,
-                                       $this->current_code_page) = 
$this->saved_state;
-                       }
-               }
-
                function _print_last_tag()
                {
                        if(!is_null($this->last_tag_code))






reply via email to

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