[Kolab-devel] zpush: name of the annotation Senario Proposal
Alain Abbas
alain.abbas at libertech.fr
Wed Mar 31 12:40:14 CEST 2010
hi
> And how is this scenario better than:
>
> (a) User enters details in phone, hits sync, gets default data, which is
> either the Kolab default, configured system wide by the admin, or
> the modified default by the user, with latter overriding former.
>
> In this step the server memorizes the phone for this user.
>
> (b) If the phone is a "flat mode" phone, the user will notice that (s)he is
> missing events/contacts/tasks. When looking into the web interface,
> there is a help item "What to do if some items are missing?" that
> explains flat mode and guides the user through activation.
>
> If the phone is a phone that supports multiple folders, step (b) falls away.
>
>
The Senario that i propose to resolve the User setting
1) The User configure his phone for the synchronization and make a first
synchro
2) the backend detect that is a new phone and maintain a list of
SerialNumber/Device type int the INBOX annotation (Root)
in this step the USer have in his phone INBOX/* in flat or folder ( the
backend has detected the devicetype and switched automaticly in the
right type
3) The user if he needs something more connect on the (admin or horde )
interface
the interface has the list of phones by the Annotation INBOX and the
user could easly select it
he could select if he want to force the mode (only for the device
who accept the 2 modes) ( the others have no sense)
he could define by folder (in INBOX) by exclusion and in USER/ and
SHARED by inclusion that he want .
at this time the Interface put the annotation for the folder in needed
for that we need only:
an annotation in INBOX and one in the folders that except to the rule
for the format i think the better is to use the function serialize
we push a Array by serialize php function in the Activesync Annotatoion
(or other like an LDAP attribute )
the format could be :
a php Hash with
type -> the type of the metadata (SYNC =For sync folder, SERIAL for
store the device list , MODE = to store the mode , others ...)
Exemple for a folder:
$meta=array();
$meta["SYNC"]["APPLX456796"]=1;
$meta["SYNC"]["ANDRO930038"]=0:
$annotation = serialize($meta);
Exemple for INBOX:
$meta["SERIAL"][0]="APPLX456796";
$meta["SERIAL"][1]="ANDRO930038";
$meta["TYPE"][0]="iphone";
$meta["TYPE"][1]="android";
$meta["MODE"]=0;
and push with serialize() php function the data in the annotation and
read it with unserialize() function , that make the code very simple and
extensible.
We could imagine a Class stored in the horde pear to encapsulate these
things
Class ActiveSyncData
public function mode() return -1|0|1|
public function phoneList() return the array of phones
public function folderSync($serial) return 0|1
public load($serializedString);
public getSerialized() return serialized string
....
Alain
More information about the devel
mailing list