All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.syncbuilder.sync.Dlp
java.lang.Object
   |
   +----com.syncbuilder.sync.Dlp

  Summary

public final class  Dlp
     extends java.lang.Object
{
          // Fields 4
     public static final int END_NORMAL;
     public static final int END_OTHER;
     public static final int END_OUT_OF_MEMORY;
     public static final int END_USER_CANCELLED;

          // Methods 55
     public void addSyncLogEntry(String) throws DlpException;
     public byte[] callApplication(Char4, int, int, byte[], int[]) throws DlpException;
     public Database createDB(String, Char4, Char4, int, int) throws DlpException;
     public Database createDB(String, Char4, Char4, int, int, int) throws DlpException;
     public Pref createPref(Char4, int) throws DlpException, NoCreatorException;
     public Pref createPref(Char4, int, int) throws DlpException, NoCreatorException;
     public Pref createPref(Char4, int, int, boolean) throws DlpException, NoCreatorException;
     public void deleteDB(String) throws DlpException;
     public void deleteDB(String, int) throws DlpException;
     public synchronized int dlp_CleanUpDatabase(int) throws DlpException;
     public synchronized void dlp_CloseDB(int) throws DlpException;
     public synchronized int dlp_DeleteCategory(int, int) throws DlpException;
     public synchronized int dlp_DeleteRecord(int, boolean, RecordID) throws DlpException;
     public synchronized int dlp_DeleteResource(int, boolean, Char4, int) throws DlpException;
     public synchronized int dlp_MoveCategory(int, int, int) throws DlpException;
     public synchronized AppBlock dlp_ReadAppBlock(int, DatabaseImpl) throws DlpException;
     public synchronized Pref dlp_ReadAppPreference(Char4, int, boolean, DatabaseImpl) throws DlpException;
     public synchronized Record dlp_ReadNextModifiedRec(int, DatabaseImpl) throws DlpException;
     public synchronized Record dlp_ReadNextModifiedRecInCategory(int, int, DatabaseImpl) throws DlpException;
     public synchronized Record dlp_ReadNextRecInCategory(int, int, DatabaseImpl) throws DlpException;
     public synchronized Record dlp_ReadRecordByID(int, RecordID, DatabaseImpl) throws DlpException;
     public synchronized Record dlp_ReadRecordByIndex(int, int, DatabaseImpl) throws DlpException;
     public synchronized RecordID[] dlp_ReadRecordIDList(int, boolean, int, int) throws DlpException;
     public synchronized Resource dlp_ReadResourceByIndex(int, int, DatabaseImpl) throws DlpException;
     public synchronized Resource dlp_ReadResourceByType(int, Char4, int, DatabaseImpl) throws DlpException;
     public synchronized SortBlock dlp_ReadSortBlock(int, DatabaseImpl) throws DlpException;
     public synchronized int dlp_ResetDBIndex(int) throws DlpException;
     public synchronized int dlp_ResetSyncFlags(int) throws DlpException;
     public synchronized int dlp_WriteAppBlock(int, AppBlock) throws DlpException;
     public synchronized int dlp_WriteAppPreference(Pref) throws DlpException;
     public synchronized void dlp_WriteRecord(int, Record) throws DlpException;
     public synchronized int dlp_WriteResource(int, Resource) throws DlpException;
     public synchronized int dlp_WriteSortBlock(int, SortBlock) throws DlpException;
     public synchronized int dlp_getRecordCount(int) throws DlpException;
     public void endHotSync() throws DlpException, IOException;
     public synchronized void endHotSync(int) throws DlpException, IOException;
     public CardInfo getCardInfo(int) throws DlpException;
     public DBInfo getDBInfo(int, boolean, boolean, int) throws DlpException;
     public int getFeature(Char4, int) throws DlpException;
     public NetSyncInfo getNetSyncInfo() throws DlpException;
     public Pref getPref(Char4, int) throws DlpException;
     public Pref getPref(Char4, int, boolean) throws DlpException, NoCreatorException;
     public SysInfo getSysInfo() throws DlpException;
     public Date getTime() throws DlpException;
     public UserInfo getUserInfo() throws DlpException;
     public Database openDB(Char4, String, int, int) throws DlpException;
     public Database openDB(String) throws DlpException;
     public Database openDB(String, int) throws DlpException;
     public Database openDB(String, int, int) throws DlpException;
     public Database openStockDB(DatabaseImpl) throws DlpException;
     public synchronized int reopenDB(String, int, int) throws DlpException;
     public void resetPilot() throws DlpException;
     public void setNetSyncInfo(NetSyncInfo) throws DlpException;
     public void setPref(Pref) throws DlpException;
     public void switchMessage() throws DlpException;
}

A representation of a DLP (HotSync)-connection.

DLP is layered on top of a reliable stream and can initiate many operations on the Pilot, in the areas of Database operations and global information (system time, user ID, preferences).

From Developing Palm OS 2.0 Applications:

The Desktop Link Protocol (DLP) provides remote access to Palm OS data storage and other subsystems.

DLP facilitates efficient data synchronization between desktop (PC, Macintosh, etc.) and Palm OS applications, database backup, installation of code patches, extensions, applications, and other databases ...

See Also: Socket


  Cross Reference

Returned By:
Link.getDlp()





  Fields

· END_NORMAL

Summary  |  Top
   public static final int END_NORMAL

HotSync ended normally


· END_OUT_OF_MEMORY

Summary  |  Top
   public static final int END_OUT_OF_MEMORY

HotSync ended because of low memory on the Pilot


· END_USER_CANCELLED

Summary  |  Top
   public static final int END_USER_CANCELLED

HotSync ended because user cancelled the operation


· END_OTHER

Summary  |  Top
   public static final int END_OTHER

HotSync ended with an unspecified problem


  Methods

· openDB

Summary  |  Top

   public Database openDB(String name)  throws DlpException

Open a database by its name. Database will be opened R/W, exclusive. It will be looked for on card 0 (built-in).
Caution: It is impossible to keep more than one database open at the same time! This is a limitation of DLP and not of this framework. Use closeDB() to close databases.

Parameter Description
name the name of the database



· openDB

Summary  |  Top
   public Database openDB(String name, 
                          int mode)  throws DlpException

Open a database by its name. Database will be looked for on card 0 (built-in).
Caution: It is impossible to keep more than one database open at the same time! This is a limitation of DLP and not of this framework. Use closeDB() to close databases.

Parameter Description
name the name of the database
mode the mode in which the database will be opened. Use the Database.OPEN_*-constants.



· openDB

Summary  |  Top
   public Database openDB(String name, 
                          int mode, 
                          int card)  throws DlpException

Open a database by its name.
Caution: It is impossible to keep more than one database open at the same time! This is a limitation of DLP and not of this framework. Use closeDB() to close databases.

Parameter Description
name the name of the database
mode the mode in which the database will be opened. Use the Database.OPEN_*-constants.
card the card where the database is located. The built-in card is CardInfo.DEFAULTCARD.



· openDB

Summary  |  Top
   public Database openDB(Char4 creator, 
                          String name, 
                          int mode, 
                          int card)  throws DlpException

Open a database by its name, and with information about its creator. The creator ID will not be used to find the database, but to add more information to the resulting Database object.
Caution: It is impossible to keep more than one database open at the same time! This is a limitation of DLP and not of this framework. Use closeDB() to close databases.

Parameter Description
creator the creator ID of the database
name the name of the database
mode the mode in which the database will be opened. Use the Database.OPEN_*-constants.
card the card where the database is located. The built-in card is CardInfo.DEFAULTCARD.



· openStockDB

Summary  |  Top
   public Database openStockDB(DatabaseImpl dbimpl)  throws DlpException

Open a database with a known DatabaseImpl.
Caution: It is impossible to keep more than one database open at the same time! This is a limitation of DLP and not of this framework. Use closeDB() to close databases.

See Also: DatabaseImpl, DatabaseImpl, DatabaseImpl, DatabaseImpl, DatabaseImpl



· endHotSync

Summary  |  Top
   public void endHotSync()  throws DlpException, IOException

Finish the HotSync-process successfully. Invoking this method ends the life-cycle of the Dlp. It cannot be used afterwards.



· endHotSync

Summary  |  Top
   public synchronized void endHotSync(int status)  throws DlpException, IOException

Finish the HotSync-process with a specified status-code Invoking this method ends the life-cycle of the Dlp. It cannot be used afterwards.

Parameter Description
status the way in which the HotSync ended (use Dlp.END_*-constants).



· createDB

Summary  |  Top
   public Database createDB(String name, 
                            Char4 creator, 
                            Char4 type, 
                            int flags, 
                            int version)  throws DlpException


· createDB

Summary  |  Top
   public Database createDB(String name, 
                            Char4 creator, 
                            Char4 type, 
                            int flags, 
                            int version, 
                            int card)  throws DlpException


· resetPilot

Summary  |  Top
   public void resetPilot()  throws DlpException


· getCardInfo

Summary  |  Top
   public CardInfo getCardInfo(int card)  throws DlpException


· getTime

Summary  |  Top
   public Date getTime()  throws DlpException


· getUserInfo

Summary  |  Top
   public UserInfo getUserInfo()  throws DlpException


· getSysInfo

Summary  |  Top
   public SysInfo getSysInfo()  throws DlpException


· switchMessage

Summary  |  Top
   public void switchMessage()  throws DlpException

Make the Palm device's display message switch from "Identifying User" to "Synchronizing"



· getDBInfo

Summary  |  Top
   public DBInfo getDBInfo(int start, 
                           boolean RAM, 
                           boolean ROM, 
                           int card)  throws DlpException


· getFeature

Summary  |  Top
   public int getFeature(Char4 creator, 
                         int id)  throws DlpException


· getPref

Summary  |  Top
   public Pref getPref(Char4 creator, 
                       int id)  throws DlpException

Get a Pref object that is associated with a particular application. Do not invoke this method while there is a database from the same application open! This will lead to problems with Palm devices running Palm OS 1.0! Use the getPref()-method from the Database class instead.



· getPref

Summary  |  Top
   public Pref getPref(Char4 creator, 
                       int id, 
                       boolean backup)  throws DlpException, NoCreatorException

Get a Pref object that is associated with a particular application. Do not invoke this method while there is a database from the same application open! This will lead to problems with Palm devices running Palm OS 1.0! Use the getPref()-method from the Database class instead.



· setPref

Summary  |  Top
   public void setPref(Pref pref)  throws DlpException

Set a Pref object that is associated with a particular application. Do not invoke this method while there is a database from the same application open! This will lead to problems with Palm devices running Palm OS 1.0! Use the setPref()-method from the Database class instead.



· createPref

Summary  |  Top
   public Pref createPref(Char4 creator, 
                          int id)  throws DlpException, NoCreatorException

A factory method for a Pref object. The new Pref will be a specialization of com.syncbuilder.storage.Pref that matches the specified creator. The Pref's version will be set to 1. It's backup-flag will be set.

Parameter Description
creator the creator ID

Returns:
a Pref object.


· createPref

Summary  |  Top
   public Pref createPref(Char4 creator, 
                          int id, 
                          int version)  throws DlpException, NoCreatorException

A factory method for a Pref object. The new Pref will be a specialization of com.syncbuilder.storage.Pref that matches the specified creator and id. It's backup-flag will be set.

Returns:
a Pref object.


· createPref

Summary  |  Top
   public Pref createPref(Char4 creator, 
                          int id, 
                          int version, 
                          boolean backup)  throws DlpException, NoCreatorException


· getNetSyncInfo

Summary  |  Top
   public NetSyncInfo getNetSyncInfo()  throws DlpException


· setNetSyncInfo

Summary  |  Top
   public void setNetSyncInfo(NetSyncInfo info)  throws DlpException


· addSyncLogEntry

Summary  |  Top
   public void addSyncLogEntry(String message)  throws DlpException


· callApplication

Summary  |  Top
   public byte[] callApplication(Char4 creator, 
                                 int type, 
                                 int action, 
                                 byte[] data, 
                                 int[] retcode)  throws DlpException


· deleteDB

Summary  |  Top
   public void deleteDB(String dbname)  throws DlpException


· deleteDB

Summary  |  Top
   public void deleteDB(String dbname, 
                        int card)  throws DlpException


· dlp_CloseDB

Summary  |  Top
   public synchronized void dlp_CloseDB(int handle)  throws DlpException

The following methods are very low-level. You should use the high-level versions where possible.



· reopenDB

Summary  |  Top
   public synchronized int reopenDB(String name, 
                                    int mode, 
                                    int card)  throws DlpException

Open a database by its name. Do not construct a Database object, but only return the handle.



· dlp_getRecordCount

Summary  |  Top
   public synchronized int dlp_getRecordCount(int handle)  throws DlpException


· dlp_CleanUpDatabase

Summary  |  Top
   public synchronized int dlp_CleanUpDatabase(int handle)  throws DlpException


· dlp_MoveCategory

Summary  |  Top
   public synchronized int dlp_MoveCategory(int handle, 
                                            int from, 
                                            int to)  throws DlpException


· dlp_DeleteCategory

Summary  |  Top
   public synchronized int dlp_DeleteCategory(int handle, 
                                              int category)  throws DlpException


· dlp_ResetDBIndex

Summary  |  Top
   public synchronized int dlp_ResetDBIndex(int handle)  throws DlpException


· dlp_ReadRecordByIndex

Summary  |  Top
   public synchronized Record dlp_ReadRecordByIndex(int handle, 
                                                    int index, 
                                                    DatabaseImpl dbclass)  throws DlpException


· dlp_ReadRecordByID

Summary  |  Top
   public synchronized Record dlp_ReadRecordByID(int handle, 
                                                 RecordID id, 
                                                 DatabaseImpl dbClass)  throws DlpException


· dlp_WriteRecord

Summary  |  Top
   public synchronized void dlp_WriteRecord(int handle, 
                                            Record record)  throws DlpException


· dlp_ReadNextRecInCategory

Summary  |  Top
   public synchronized Record dlp_ReadNextRecInCategory(int handle, 
                                                        int category, 
                                                        DatabaseImpl dbClass)  throws DlpException


· dlp_ReadRecordIDList

Summary  |  Top
   public synchronized RecordID[] dlp_ReadRecordIDList(int handle, 
                                                       boolean sort, 
                                                       int start, 
                                                       int max)  throws DlpException


· dlp_DeleteRecord

Summary  |  Top
   public synchronized int dlp_DeleteRecord(int handle, 
                                            boolean all, 
                                            RecordID id)  throws DlpException


· dlp_ReadNextModifiedRec

Summary  |  Top
   public synchronized Record dlp_ReadNextModifiedRec(int handle, 
                                                      DatabaseImpl dbClass)  throws DlpException


· dlp_ReadNextModifiedRecInCategory

Summary  |  Top
   public synchronized Record dlp_ReadNextModifiedRecInCategory(int handle, 
                                                                int category, 
                                                                DatabaseImpl dbClass)  throws DlpException


· dlp_WriteResource

Summary  |  Top
   public synchronized int dlp_WriteResource(int handle, 
                                             Resource resource)  throws DlpException


· dlp_ReadResourceByType

Summary  |  Top
   public synchronized Resource dlp_ReadResourceByType(int handle, 
                                                       Char4 type, 
                                                       int id, 
                                                       DatabaseImpl dbClass)  throws DlpException


· dlp_ReadResourceByIndex

Summary  |  Top
   public synchronized Resource dlp_ReadResourceByIndex(int handle, 
                                                        int index, 
                                                        DatabaseImpl dbClass)  throws DlpException


· dlp_DeleteResource

Summary  |  Top
   public synchronized int dlp_DeleteResource(int handle, 
                                              boolean all, 
                                              Char4 type, 
                                              int id)  throws DlpException


· dlp_ReadAppPreference

Summary  |  Top
   public synchronized Pref dlp_ReadAppPreference(Char4 creator, 
                                                  int id, 
                                                  boolean backup, 
                                                  DatabaseImpl dbClass)  throws DlpException


· dlp_WriteAppPreference

Summary  |  Top
   public synchronized int dlp_WriteAppPreference(Pref pref)  throws DlpException


· dlp_ReadAppBlock

Summary  |  Top
   public synchronized AppBlock dlp_ReadAppBlock(int handle, 
                                                 DatabaseImpl dbClass)  throws DlpException


· dlp_ReadSortBlock

Summary  |  Top
   public synchronized SortBlock dlp_ReadSortBlock(int handle, 
                                                   DatabaseImpl dbClass)  throws DlpException


· dlp_WriteAppBlock

Summary  |  Top
   public synchronized int dlp_WriteAppBlock(int handle, 
                                             AppBlock appblock)  throws DlpException


· dlp_WriteSortBlock

Summary  |  Top
   public synchronized int dlp_WriteSortBlock(int handle, 
                                              SortBlock sortblock)  throws DlpException


· dlp_ResetSyncFlags

Summary  |  Top
   public synchronized int dlp_ResetSyncFlags(int handle)  throws DlpException


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7