All Packages This Package Class Hierarchy Class Search Index
Class com.syncbuilder.sync.Dlp
java.lang.Object
|
+----com.syncbuilder.sync.Dlp
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
- Returned By:
- Link.getDlp()
public static final int END_NORMAL
HotSync ended normally
public static final int END_OUT_OF_MEMORY
HotSync ended because of low memory on the Pilot
public static final int END_USER_CANCELLED
HotSync ended because user cancelled the operation
public static final int END_OTHER
HotSync ended with an unspecified problem
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 |
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. |
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. |
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. |
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
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.
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). |
public Database createDB(String name,
Char4 creator,
Char4 type,
int flags,
int version) throws DlpException
public Database createDB(String name,
Char4 creator,
Char4 type,
int flags,
int version,
int card) throws DlpException
public void resetPilot() throws DlpException
public CardInfo getCardInfo(int card) throws DlpException
public Date getTime() throws DlpException
public UserInfo getUserInfo() throws DlpException
public SysInfo getSysInfo() throws DlpException
public void switchMessage() throws DlpException
Make the Palm device's display message switch from
"Identifying User" to "Synchronizing"
public DBInfo getDBInfo(int start,
boolean RAM,
boolean ROM,
int card) throws DlpException
public int getFeature(Char4 creator,
int id) throws DlpException
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.
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.
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.
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.
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.
public Pref createPref(Char4 creator,
int id,
int version,
boolean backup) throws DlpException, NoCreatorException
public NetSyncInfo getNetSyncInfo() throws DlpException
public void setNetSyncInfo(NetSyncInfo info) throws DlpException
public void addSyncLogEntry(String message) throws DlpException
public byte[] callApplication(Char4 creator,
int type,
int action,
byte[] data,
int[] retcode) throws DlpException
public void deleteDB(String dbname) throws DlpException
public void deleteDB(String dbname,
int card) throws DlpException
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.
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.
public synchronized int dlp_getRecordCount(int handle) throws DlpException
public synchronized int dlp_CleanUpDatabase(int handle) throws DlpException
public synchronized int dlp_MoveCategory(int handle,
int from,
int to) throws DlpException
public synchronized int dlp_DeleteCategory(int handle,
int category) throws DlpException
public synchronized int dlp_ResetDBIndex(int handle) throws DlpException
public synchronized Record dlp_ReadRecordByIndex(int handle,
int index,
DatabaseImpl dbclass) throws DlpException
public synchronized Record dlp_ReadRecordByID(int handle,
RecordID id,
DatabaseImpl dbClass) throws DlpException
public synchronized void dlp_WriteRecord(int handle,
Record record) throws DlpException
public synchronized Record dlp_ReadNextRecInCategory(int handle,
int category,
DatabaseImpl dbClass) throws DlpException
public synchronized RecordID[] dlp_ReadRecordIDList(int handle,
boolean sort,
int start,
int max) throws DlpException
public synchronized int dlp_DeleteRecord(int handle,
boolean all,
RecordID id) throws DlpException
public synchronized Record dlp_ReadNextModifiedRec(int handle,
DatabaseImpl dbClass) throws DlpException
public synchronized Record dlp_ReadNextModifiedRecInCategory(int handle,
int category,
DatabaseImpl dbClass) throws DlpException
public synchronized int dlp_WriteResource(int handle,
Resource resource) throws DlpException
public synchronized Resource dlp_ReadResourceByType(int handle,
Char4 type,
int id,
DatabaseImpl dbClass) throws DlpException
public synchronized Resource dlp_ReadResourceByIndex(int handle,
int index,
DatabaseImpl dbClass) throws DlpException
public synchronized int dlp_DeleteResource(int handle,
boolean all,
Char4 type,
int id) throws DlpException
public synchronized Pref dlp_ReadAppPreference(Char4 creator,
int id,
boolean backup,
DatabaseImpl dbClass) throws DlpException
public synchronized int dlp_WriteAppPreference(Pref pref) throws DlpException
public synchronized AppBlock dlp_ReadAppBlock(int handle,
DatabaseImpl dbClass) throws DlpException
public synchronized SortBlock dlp_ReadSortBlock(int handle,
DatabaseImpl dbClass) throws DlpException
public synchronized int dlp_WriteAppBlock(int handle,
AppBlock appblock) throws DlpException
public synchronized int dlp_WriteSortBlock(int handle,
SortBlock sortblock) throws DlpException
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