|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.syncbuilder.sync.Dlp
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 ...
Most method names have been taken from the original documentation as provided by Palm Computing, but some names have been changed to more closely resemble their true purpose.
Socket| Field Summary | |
static int |
DL_1_0
DL protocol version 1.0 |
static int |
DL_1_1
DL protocol version 1.1 |
static int |
DL_1_2
DL protocol version 1.2 |
static int |
END_INCOMPATIBLE_PRODUCTS
Synchronisation terminated because of incompatible versions of the DLP protocol on the Desktop and on the Palm device |
static int |
END_NORMAL
Synchronisation ended normally |
static int |
END_OTHER
Synchronisation ended with an unspecified problem |
static int |
END_OUT_OF_MEMORY
Synchronisation ended because of low memory on the Palm device |
static int |
END_USER_CANCELLED
Synchronisation ended because user cancelled the operation |
| Method Summary | |
void |
addSyncLogEntry(java.lang.String message)
|
DeviceDatabase |
createDB(DatabaseImpl dbimpl,
int flags,
int version)
Create a new database on the default card of the Palm device. |
DeviceDatabase |
createDB(DatabaseImpl dbimpl,
int flags,
int version,
int card)
Create a new database on the specified card of the Palm device. |
DeviceDatabase |
createDB(java.lang.String name,
Char4 creator,
Char4 type,
int flags,
int version)
Create a new database on the default card of the Palm device. |
DeviceDatabase |
createDB(java.lang.String name,
Char4 creator,
Char4 type,
int flags,
int version,
int card)
Create a new database on the specified card of the Palm device. |
Pref |
createPref(Char4 creator,
int id)
A factory method for a Pref object.
|
Pref |
createPref(Char4 creator,
int id,
int version)
A factory method for a Pref object.
|
Pref |
createPref(Char4 creator,
int id,
int version,
boolean backup)
|
void |
deleteDB(java.lang.String dbname)
|
void |
deleteDB(java.lang.String dbname,
int card)
|
void |
dlp_CleanUpDatabase(int handle)
|
void |
dlp_CloseDB(int handle)
CAUTION ****************** CAUTION ***************** CAUTION ***************** CAUTION *********** The following methods are very low-level. |
void |
dlp_DeleteRecord(int handle,
int flags,
int id)
Delete records from a database. |
void |
dlp_DeleteResource(int handle,
boolean all,
Char4 type,
int id)
|
DBInfo |
dlp_findDBByName(int card,
java.lang.String name)
|
DBInfo |
dlp_findDBByOpenHandle(int handle)
|
void |
dlp_MoveCategory(int handle,
int from,
int to)
|
AppBlock |
dlp_ReadAppBlock(int handle,
DatabaseImpl dbimpl)
|
Pref |
dlp_ReadAppPreference(Char4 creator,
int id,
boolean backup,
DatabaseImpl dbimpl)
|
Record |
dlp_ReadNextModifiedRec(int handle,
DatabaseImpl dbimpl)
|
Record |
dlp_ReadNextModifiedRecInCategory(int handle,
int category,
DatabaseImpl dbimpl)
|
Record |
dlp_ReadNextRecInCategory(int handle,
int category,
DatabaseImpl dbimpl)
|
int |
dlp_readOpenDBInfo(int handle)
|
Record |
dlp_ReadRecordByID(int handle,
RecordID id,
DatabaseImpl dbimpl)
|
Record |
dlp_ReadRecordByIndex(int handle,
int index,
DatabaseImpl dbimpl)
|
RecordID[] |
dlp_ReadRecordIDList(int handle,
boolean sort,
int start,
int max)
|
Resource |
dlp_ReadResourceByIndex(int handle,
int index,
DatabaseImpl dbimpl)
|
Resource |
dlp_ReadResourceByType(int handle,
Char4 type,
int id,
DatabaseImpl dbimpl)
|
SortBlock |
dlp_ReadSortBlock(int handle,
DatabaseImpl dbimpl)
|
void |
dlp_ResetRecordIndex(int handle)
Resets the "next record" index to the beginning |
void |
dlp_ResetSyncFlags(int handle)
|
void |
dlp_WriteAppBlock(int handle,
AppBlock appblock)
|
void |
dlp_WriteRecord(int handle,
Record record)
|
void |
dlp_WriteResource(int handle,
Resource resource)
|
void |
dlp_WriteSortBlock(int handle,
SortBlock sortblock)
|
void |
endHotSync()
Finish the HotSync-process successfully. |
void |
endHotSync(int status)
Finish the HotSync-process with a specified status-code Invoking this method ends the life-cycle of the Dlp. |
DBInfo |
getDBInfo(int index,
boolean RAM,
boolean ROM,
int card)
|
int |
getFeature(Char4 creator,
int number)
Get the feature with the specified Creator ID and number |
NetSyncInfo |
getNetSyncInfo()
|
Pref |
getPref(Char4 creator,
int id)
Get a Pref object that is associated with a particular application. |
Pref |
getPref(Char4 creator,
int id,
boolean backup)
Get a Pref object that is associated with a particular application. |
StorageInfo |
getStorageInfo()
|
SysInfo |
getSysInfo()
|
java.util.Date |
getTime()
|
UserInfo |
getUserInfo()
Get information about the HotSync user. |
int |
getVersion()
Get the protocol-version of the DL protocol. |
DeviceDatabase |
openDB(Char4 creator,
java.lang.String name,
int mode,
int card)
Open a database by its name, and with information about its creator. |
DeviceDatabase |
openDB(DatabaseImpl dbimpl)
Open a database with a known DatabaseImpl. |
DeviceDatabase |
openDB(DatabaseImpl dbimpl,
int mode)
Open a database with a known DatabaseImpl. |
DeviceDatabase |
openDB(DatabaseImpl dbimpl,
int mode,
int card)
Open a database with a known DatabaseImpl. |
DeviceDatabase |
openDB(java.lang.String name)
Open a database by its name. |
DeviceDatabase |
openDB(java.lang.String name,
int mode)
Open a database by its name. |
DeviceDatabase |
openDB(java.lang.String name,
int mode,
int card)
Open a database by its name. |
void |
processRPC(int trap,
Index a0,
Index d0,
RPCParam[] params)
Send an RPC for execution by the TouchDown RPC Executor (which is part of the Palm OS). |
int |
reopenDB(java.lang.String name,
int mode,
int card)
Open a database by its name. |
void |
resetDevice()
|
void |
setNetSyncInfo(NetSyncInfo info)
|
void |
setPref(Pref pref)
Set a Pref object that is associated with a particular application. |
void |
setTime(java.util.Date date)
|
void |
setUserInfo(UserInfo uinfo)
|
void |
switchMessage()
This method serves two purposes: Switch the message on the Palm device from 'Identifying User' to 'Synchronizing'. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int END_NORMAL
public static final int END_OUT_OF_MEMORY
public static final int END_USER_CANCELLED
public static final int END_OTHER
public static final int END_INCOMPATIBLE_PRODUCTS
public static final int DL_1_0
public static final int DL_1_1
public static final int DL_1_2
| Method Detail |
public DeviceDatabase openDB(java.lang.String name)
throws DlpException
DeviceDatabase.close() to close databases.name - the name of the database
public DeviceDatabase openDB(java.lang.String name,
int mode)
throws DlpException
DeviceDatabase.close() to close databases.name - the name of the databasemode - the mode in which the database will be opened. Use the Database.OPEN_*-constants.
public DeviceDatabase openDB(java.lang.String name,
int mode,
int card)
throws DlpException
DeviceDatabase.close() to close databases.name - the name of the databasemode - the mode in which the database will be opened. Use the Database.OPEN_*-constants.card - the memory card where the database is located. Current devices only support card #0 (CardInfo.DEFAULTCARD).
public DeviceDatabase openDB(Char4 creator,
java.lang.String name,
int mode,
int card)
throws DlpException
DeviceDatabase.close() to close databases.creator - the creator ID of the databasename - the name of the databasemode - the mode in which the database will be opened. Use the Database.OPEN_*-constants.card - the memory card where the database is located. Current devices only support card #0 (CardInfo.DEFAULTCARD).
public DeviceDatabase openDB(DatabaseImpl dbimpl)
throws DlpException
DeviceDatabase.close() to close databases.
public DeviceDatabase openDB(DatabaseImpl dbimpl,
int mode)
throws DlpException
DeviceDatabase.close() to close databases.
public DeviceDatabase openDB(DatabaseImpl dbimpl,
int mode,
int card)
throws DlpException
DeviceDatabase.close() to close databases.
public DeviceDatabase createDB(java.lang.String name,
Char4 creator,
Char4 type,
int flags,
int version)
throws DlpException
name - the name of the databasecreator - the Creator IDtype - the typeflags - version -
public DeviceDatabase createDB(java.lang.String name,
Char4 creator,
Char4 type,
int flags,
int version,
int card)
throws DlpException
name - the name of the databasecreator - the Creator IDtype - the typeflags - version - card - the memory card where the database is located. Current devices only support card #0 (CardInfo.DEFAULTCARD).
public DeviceDatabase createDB(DatabaseImpl dbimpl,
int flags,
int version)
throws DlpException
dbimpl - the DatabaseImpl to be used. This needs to have a known type!flags - version -
public DeviceDatabase createDB(DatabaseImpl dbimpl,
int flags,
int version,
int card)
throws DlpException
dbimpl - the DatabaseImpl to be used. This needs to have a known type!flags - version - card - the memory card where the database is located. Current devices only support card #0 (CardInfo.DEFAULTCARD).
public void deleteDB(java.lang.String dbname)
throws DlpException
public void deleteDB(java.lang.String dbname,
int card)
throws DlpException
public DBInfo getDBInfo(int index,
boolean RAM,
boolean ROM,
int card)
throws DlpException
public Pref getPref(Char4 creator,
int id)
throws DlpException
public Pref getPref(Char4 creator,
int id,
boolean backup)
throws DlpException,
NoCreatorException
null if the preference could not be found
public void setPref(Pref pref)
throws DlpException
public Pref createPref(Char4 creator,
int id)
throws DlpException,
NoCreatorException
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.creator - the creator ID - Pref object.
public Pref createPref(Char4 creator,
int id,
int version)
throws DlpException,
NoCreatorException
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.Pref object.
public Pref createPref(Char4 creator,
int id,
int version,
boolean backup)
throws DlpException,
NoCreatorException
public int getFeature(Char4 creator,
int number)
throws DlpException,
NoCreatorException
SystemFeature
public void endHotSync()
throws DlpException,
java.io.IOException
public void endHotSync(int status)
throws DlpException,
java.io.IOException
status - the way in which the HotSync ended (use Dlp.END_*-constants).
public void resetDevice()
throws DlpException
public StorageInfo getStorageInfo()
throws DlpException
public java.util.Date getTime()
throws DlpException
public void setTime(java.util.Date date)
throws DlpException
public UserInfo getUserInfo()
throws DlpException
null if no user-information has been established on the device, yet.
public void setUserInfo(UserInfo uinfo)
throws DlpException
public SysInfo getSysInfo()
throws DlpException
public void switchMessage()
throws CancelSyncException,
DlpException
public NetSyncInfo getNetSyncInfo()
throws DlpException
public void setNetSyncInfo(NetSyncInfo info)
throws DlpException
public void addSyncLogEntry(java.lang.String message)
throws DlpException
public void processRPC(int trap,
Index a0,
Index d0,
RPCParam[] params)
throws DlpException
public int getVersion()
public void dlp_CloseDB(int handle)
throws DlpException
public int reopenDB(java.lang.String name,
int mode,
int card)
throws DlpException
public int dlp_readOpenDBInfo(int handle)
throws DlpException
public void dlp_CleanUpDatabase(int handle)
throws DlpException
public void dlp_MoveCategory(int handle,
int from,
int to)
throws DlpException
public void dlp_ResetRecordIndex(int handle)
throws DlpException
public void dlp_ResetSyncFlags(int handle)
throws DlpException
public DBInfo dlp_findDBByOpenHandle(int handle)
throws DlpException
public DBInfo dlp_findDBByName(int card,
java.lang.String name)
throws DlpException
public Record dlp_ReadRecordByIndex(int handle,
int index,
DatabaseImpl dbimpl)
throws DlpException
public Record dlp_ReadRecordByID(int handle,
RecordID id,
DatabaseImpl dbimpl)
throws DlpException
public void dlp_WriteRecord(int handle,
Record record)
throws DlpException
public Record dlp_ReadNextRecInCategory(int handle,
int category,
DatabaseImpl dbimpl)
throws DlpException
public RecordID[] dlp_ReadRecordIDList(int handle,
boolean sort,
int start,
int max)
throws DlpException
public void dlp_DeleteRecord(int handle,
int flags,
int id)
throws DlpException
handle - DB handleflags - 0x00 - delete rec with specified id, 0x80 - delete ALL recs, 0x40 - delete all recs with category idid - record id, or category id (when flag is 0x40). Ignored when flag is 0x80.
public Record dlp_ReadNextModifiedRec(int handle,
DatabaseImpl dbimpl)
throws DlpException
public Record dlp_ReadNextModifiedRecInCategory(int handle,
int category,
DatabaseImpl dbimpl)
throws DlpException
public void dlp_WriteResource(int handle,
Resource resource)
throws DlpException
public Resource dlp_ReadResourceByType(int handle,
Char4 type,
int id,
DatabaseImpl dbimpl)
throws DlpException
public Resource dlp_ReadResourceByIndex(int handle,
int index,
DatabaseImpl dbimpl)
throws DlpException
public void dlp_DeleteResource(int handle,
boolean all,
Char4 type,
int id)
throws DlpException
public Pref dlp_ReadAppPreference(Char4 creator,
int id,
boolean backup,
DatabaseImpl dbimpl)
throws DlpException
public AppBlock dlp_ReadAppBlock(int handle,
DatabaseImpl dbimpl)
throws DlpException
public SortBlock dlp_ReadSortBlock(int handle,
DatabaseImpl dbimpl)
throws DlpException
public void dlp_WriteAppBlock(int handle,
AppBlock appblock)
throws DlpException
public void dlp_WriteSortBlock(int handle,
SortBlock sortblock)
throws DlpException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||