[Kolab-devel] MetaData for zpush Kolab backend

Alain Abbas alain.abbas at libertech.fr
Tue Apr 13 06:25:25 CEST 2010


hi
like advised by Gunnar we would use JSON insteed than PHP serialization 
to serialize datas

Alain

================================================================================ 


Metadata for the backend Kolab Zpush


1) storage

   The metadatas for the kolab backend will be stored in the folder 
annotation
   the entry will be :
   /vendor/kolab/activesync   value.priv
   All the annotations are per user and are private
   The global setting will be stored in the root folder INBOX
   The per folder setting will be stored in each folder

2) Data representation
   
   The data will be stored as a serialized JSON Format with specific keys
   (php instruction json_encode() and json_decode() )
   Example :
   {"APPL023Z34":{"SYNC":1,"ALARM":1}}
   that is the serialized data :
   array (
      'APPL023Z34' =>
      array (
            'SYNC' => 1,
            'ALARM' => 1,
          ),

           )


3) Global data
   
   The globals data will be stored directly in INBOX folder
   
   $meta["DEVICE"][<SERIAL-NUMBER>]["TYPE"]="type of the mobile"
   $meta["DEVICE"][<SERIAL-NUMBER>]["MODE"]= -1 | 0 | 1  
        -1 (the global mode set for the backend) (DEFAULT)
         0  Flat mode
        1  Folder mode
      

   Example:
   $meta["APPL023Z34"]["TYPE"]="iphone";
   $meta["APPL023Z34"]["MODE"]= -1;
   $meta["ANDRO099393939"]["TYPE"]="android";
   $meta["ANDRO099393939"]["MODE"]= 0;

   the annotation will be :
   
{"APPL023Z34":{"TYPE":"iphone","MODE":-1},"ANDRO099393939":{"TYPE":"android","MODE":0}}
    
   The serials will be collected by the backend at the connexion.
   if the keyword MODE doesnt exist or if it s equal to -1 for a device 
the Golbal setting will be applied


4) per Folder Setting
   
   Politic rule for the synchronization
   INBOX/* all the folders in this namespace  will be synchronised by 
default, except if the parameter is set to no
   user/*  all folders won t be synchronised by default,  except if the 
parameter is set to yes
   shared.*  same
   
   The same politic will be applied for the Alarms

   $meta[<SERIAL-NUMBER>]["SYNC"]= 0 | 1  1 the folder will be sync , 0 
the folder won t be sync
   $meta[<SERIAL-NUMBER>]["ALARM"]=0 | 1  1 the Alarms will shown
   
   Example:
   $meta["APPL023Z34"]["SYNC"]=1;
   $meta["APPL023Z34"]["ALARM"]= 1;
   $meta["ANDRO099393939"]["SYNC"]=0;
   $meta["ANDRO099393939"]["ALARM"]= 0;

   the annotation will be :
   {"APPL023Z34":{"SYNC":1,"ALARM":1},"ANDRO099393939":{"SYNC":0,"ALARM":0}}
   


   




More information about the devel mailing list