Method and apparatus for synchronizing contact data stores
A mobile device for synchronizing contact data stores comprising: a host having: a database for storing contact records; and a contact application communicating with the database and being capable of altering the contact records; a client having: a client contact application capable of altering the contact records; and a client data manager communicating with the client contact application for storing contact records; a state machine; a client listener to determine when a change has been made and propagate the change to the host; and a host listener to determine when a client record has been changed in the database and propagate the change to the client, wherein the database and the client data manager are synchronized through the state machine. Also, a method for synchronizing contact record storage by notification and propagation of changes through the state machine upon changes occurring in the database and client data manager.
1 . A mobile device for synchronizing contact data stores comprising:
a) a host, said host having:
i. a database for storing contact records; and
ii. a contact application communicating with said database, said contact application being capable of altering said contact records;
b) a client, said client having:
i. a client contact application, said client contact application being capable of altering said contact records; and
ii. a client data manager communicating with said client contact application for storing contact records;
c) a state machine for communicating between said client and said host;
d) a client listener to determine when a change has been made at said client and propagate said change to said host through said state machine; and
e) a host listener to determine when a client record has been changed in said database and propagate said change to said client,
wherein said database and said client data manager are synchronized through said state machine.
2 . The mobile device of claim 1 further comprising a database management system between said contact application and said database.
3 . The mobile device of claim 2 further comprising a client database communicating with said client data manager and maintaining synchronized contact records with said database in said host.
4 . The mobile device of claim 1 , wherein altering said contact records includes adding a new contact record, deleting and existing contact record or modifying an existing contact record.
5 . The mobile device of claim 1 , further comprising a communications system for communicating with an external database.
6 . The mobile device of claim 5 , wherein the mobile device further includes memory for storing a variable, said variable indicating whether said mobile device is enabled to synchronize with said external database.
7 . The mobile device of claim 6 , wherein the client database becomes a master database when said variable indicates that said mobile device is enabled to synchronize with said external database.
8 . A method for synchronizing contact data stores in a mobile device having a host database and a client database, the method comprising:
a) designating one of the host database and client database a master database and the other of the host database and client database as a slave database;
b) configuring a listening application to monitor the master database;
c) if the master database changes, sending a message from the listening application, through a state machine, to the slave database with the change in the master database;
d) setting a data manager to monitor the slave database; and
e) if the data manager detects a change request for the slave database, sending a change message to the master database.
9 . The method of claim 8 , wherein said designating step is determined based on a variable set at the mobile device.
10 . The method of claim 9 , wherein the variable designates that the mobile device can synchronize with an external database.
11 . The method of claim 10 , wherein the client database becomes the master database if the variable designates the mobile device can synchronize with an external database.
12 . The method of claim 8 , wherein the host and client databases are address books.
13 . The method of claim 12 , wherein changes to the host and client databases originate at a contact application.
14 . The method of claim 10 , further comprising the step of synchronizing the client database with the external database.