Discussion:
[BitPim-devel] Changes to BitPim schema
Joe Pham
2006-04-14 21:09:30 UTC
Permalink
To accommodate the V710 phonebook, I'm proposin the following changes to the following BitPim schemas:

groups schema changes:

1. New 'ringtone' field:
groups=[ { 'name': 'group name', 'ringtone': 'ringtone name' }, ... ]

phonebook schema changes:

1. Add fields 'speeddial', 'ringtone', and 'wallpaper' to 'emails'
2. Add fields 'ringtone', 'wallpaper' to 'numbers'
3. New dict of list 'maillist' to store Mailing List data:
phonebook[index]['maillist']=[
{ 'entry': string of names, numbers separated by '\x00\x00'
'speeddial': speedial index of this entry,
'ringtone': ringtone name of this entry,
'wallpaper': wallpaper name of this entry }, ... ]

These changes should not impact exising data and/or existing phones.

Comments and suggestions are welcome.

-Joe Pham



_____________________________________________________________________
Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!
Roger Binns
2006-04-16 06:52:57 UTC
Permalink
Post by Joe Pham
1. Add fields 'speeddial', 'ringtone', and 'wallpaper' to 'emails'
What are the semantics of this?
Post by Joe Pham
{ 'entry': string of names, numbers separated by '\x00\x00'
That should be a standard python list. Also what happens
if two people have the same name? It sounds like this
should be a list of references to contact entry ids.

Roger
Joe Pham
2006-04-16 07:29:18 UTC
Permalink
Post by Roger Binns
Post by Joe Pham
1. Add fields 'speeddial', 'ringtone', and 'wallpaper' to 'emails'
What are the semantics of this?
phonebook[index]['emails']=[{ 'email': <string>, 'type': <string>, 'speeddial': <int>, 'ringtone': <string>, 'wallpaper': <string> }, ...]
Post by Roger Binns
Post by Joe Pham
{ 'entry': string of names, numbers separated by '\x00\x00'
That should be a standard python list.
It should, though I wasn't quite sure the database would take it, so I forced it to be a string instead:

phonebook[index]['maillist']=[ { 'entry': [ <string> ...] ... or
phonebook[index]['maillist']=[ { 'entry': [ { 'name': <string } ... ]
Post by Roger Binns
Also what happens if two people have the same name?
The mail list items are either phone numbers and/or email addresses.
Post by Roger Binns
It sounds like this should be a list of references to contact entry
ids.
It is a list of speed dials (index) of the phone numbers/email addresses of the mail list.

-Joe Pham



_____________________________________________________________________
Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!
Roger Binns
2006-04-16 18:42:17 UTC
Permalink
Post by Joe Pham
Post by Roger Binns
Post by Joe Pham
1. Add fields 'speeddial', 'ringtone', and 'wallpaper' to 'emails'
What are the semantics of this?
phonebook[index]['emails']=[{ 'email': <string>, 'type': <string>,
'speeddial': <int>, 'ringtone': <string>, 'wallpaper': <string> }, ...]
That isn't semantics :-) Does the phone have an email address
independent of anything else?
Post by Joe Pham
Post by Roger Binns
Post by Joe Pham
{ 'entry': string of names, numbers separated by '\x00\x00'
That should be a standard python list.
It should, though I wasn't quite sure the database would take it
Did you try? And if it can't the database should be fixed, not
mangling the data.
Post by Joe Pham
Post by Roger Binns
Also what happens if two people have the same name?
The mail list items are either phone numbers and/or email addresses.
You said 'string of names'. Do they reference contacts on the
phone? eg if I have a contact of John Smith with number 1234567890
and the list has 1234567890 in it and then on the phone I change
John Smith's number, does the list change as well?
Post by Joe Pham
Post by Roger Binns
It sounds like this should be a list of references to contact entry
ids.
It is a list of speed dials (index) of the phone numbers/email
addresses of the mail list.
Then it really does sound like we should use references. If we
import into BitPim, change details for the contact and export
back to the phone, then the right thing should happen.

Roger
Joe Pham
2006-04-16 22:02:08 UTC
Permalink
Does the phone have an email address independent of anything else?
Yes, an email address is an entry by itself, independent of anything else. The same is also true for a number or mail list.
Did you try? And if it can't the database should be fixed, not
mangling the data.
Yes, I did and it didn't work. I'll look into making the database more flexible.
You said 'string of names'.
I misspoke. It's a list of entries, whereas an entry could be either a number or an email address (but not another mail list entry).
Do they reference contacts on the phone? eg if I have a contact of
John Smith with number 1234567890 and the list has 1234567890 in it
and then on the phone I change John Smith's number, does the list
change as well?
The list still points to the same entry even though the name, phone number, or speed dial may change.
Then it really does sound like we should use references. If we
import into BitPim, change details for the contact and export back
to the phone, then the right thing should happen.
I believe you're correct. But until the database is improved, I'll leave this feature out and document it as a limitation.

-Joe Pham



_____________________________________________________________________
Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!
Roger Binns
2006-04-20 06:24:35 UTC
Permalink
Post by Joe Pham
Post by Roger Binns
Did you try? And if it can't the database should be fixed, not
mangling the data.
Yes, I did and it didn't work. I'll look into making the database more flexible.
Your current code should really be put into a branch until the
database code is updated. Otherwise we end up with 3 different
formats for this information that compatibility will have to
be maintained with:

- Not present at all
- Single field seperated by \x00\x00
- Python list
Post by Joe Pham
Post by Roger Binns
Then it really does sound like we should use references. If we
import into BitPim, change details for the contact and export back
to the phone, then the right thing should happen.
I believe you're correct. But until the database is improved,
I'll leave this feature out and document it as a limitation.
There is no improvement needed in the database. All that has
to change is what is stored - ie instead of storing the numbers
directly, store the serials for the entry being referenced.

Roger
Joe Pham
2006-04-20 22:19:35 UTC
Permalink
Post by Roger Binns
Your current code should really be put into a branch until the
database code is updated.
I thought about that same thing, but I figured that the feature is turned off, the code dormant and isolated, so there shouldn't be any compatibility issue. I resume the coding once the database is improved.
Post by Roger Binns
instead of storing the numbers directly, store the serials for the
entry being referenced.
Understand. However the issue is that the field is now a list, which breaks the database.

-Joe Pham




_____________________________________________________________________
Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!

Loading...