|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Protocol.JHotSync
JHotSync class. This class provides high-level access to HotSync function calls.
Field Summary | |
---|---|
(package private) static DLPVersion |
DLP_VERSION
The DLP version to claim at sync time. |
Constructor Summary | |
---|---|
JHotSync(CMP_DLP cmp_dlp)
Construct a new JHotSync object with the specified CMP_DLP object. |
|
JHotSync(SLPTransportInterface transport)
Construct a new JHotSync object using the provided transport object. |
Method Summary | |
---|---|
void |
addSyncLogEntry(java.lang.String s)
Add an entry to the handhelds sync log. |
void |
cleanupDatabase(byte dbID)
Cleans up the specified database. |
void |
closeAllDatabases()
Close all open databases. |
void |
closeDatabase(byte dbID)
Close the specified daatabase. |
void |
connect()
Connect the protocol stack, and start listening for a synchronization request. |
byte |
createDatabase(byte card,
int creator,
int type,
java.lang.String dbName,
char flags,
char version)
Creates a database with the specified parameters. |
byte |
createDatabase(byte card,
java.lang.String creator,
java.lang.String type,
java.lang.String dbName,
char flags,
char version)
Creates a database with the specified parameters. |
void |
deleteDatabase(byte card,
java.lang.String dbName)
Deletes the database with the specified properties. |
void |
deleteRecord(byte dbID,
byte flags,
int recordID)
Delete a record from the handheld. |
void |
deleteResource(byte dbID,
byte flags,
int type,
char resourceID)
Delete the specified resource from the handheld. |
void |
disconnect()
Disconnects the protocol stack from the remote end. |
void |
disconnect(char reasonCode)
Disconnects the protocol stack for the supplied reason code. |
DLPBlock |
getApplicationBlock(byte dbID,
char offset,
char length)
Retrieve the specified application block. |
CMP_DLP |
getCmpDlpHandler()
Retreives the CMP_DLP handler in use by the protocol stack. |
DLPDatabaseListGroup |
getDatabaseList(byte searchFlags,
byte cardNumber,
char startIndex)
Gets the list of information on the databases stored on the remote Palm Computing Platform device. |
int |
getOpenDatabaseInfo(byte dbID)
Gets the number of records/resources in an open database. |
PADP |
getPADPHandler()
Gets the PADP protocol in use by the active protocol stack. |
SLP |
getSLPHandler()
Gets the SLP protocol in use by the active protocol stack. |
DLPBlock |
getSortBlock(byte dbID,
char offset,
char length)
Gets the sort block for the specified database. |
int |
getSpeed()
Retreives the speed of the synchronization. |
DLPStorageInfo |
getStorageInfo(byte card)
Retreives the storage information for the specified card. |
DLPSystemInfo |
getSystemInfo()
Retreives the handhelds system information. |
java.util.Calendar |
getTime()
Retreives the date and time reported by the handheld. |
DLPUserInfo |
getUserInfo()
Retreives the user information for the handheld. |
boolean |
isConnected()
Checks to see if the protocol stack is currently connected and active. |
void |
moveCategory(byte dbID,
byte from,
byte to)
Moves the specified category from one ID to another. |
void |
openConduit()
Informs the handheld that a conduit is about to be opened. |
byte |
openDatabase(byte card,
byte mode,
java.lang.String dbName)
Open the specified database using the specified I/O mode. |
byte[] |
processRPC(byte[] data)
Processen a Remote Procedure Call request. |
DLPAppPreference |
readAppPreference(int creatorID,
char prefID,
char size,
byte flags)
Reads an application preference from the handheld. |
DLPRecord |
readNextModifiedRecord(byte dbID)
Read the next modified record from the specified database. |
DLPRecord |
readNextModifiedRecordInCategory(byte dbID,
byte category)
Reads the next modified record in the specified category. |
DLPRecord |
readNextRecordInCategory(byte dbID,
byte category)
Reads the next record in the specified category. |
DLPRecord |
readRecord(byte dbID,
char index,
char offset,
char length)
Read a record from the specified database. |
DLPRecord |
readRecord(byte dbID,
int id,
char offset,
char length)
Read a record from the specified database. |
int[] |
readRecordIDList(byte dbID,
byte flags,
char start,
char maxEntries)
Reads the list of record IDs from the specified database. |
DLPResource |
readResource(byte dbID,
char index,
char offset,
char length)
Read a resource from the specified database by index. |
DLPResource |
readResource(byte dbID,
int type,
char id,
char offset,
char length)
Read a resource from the specified database by resource ID. |
void |
resetRecordIndex(byte dbID)
Reset the record index. |
void |
resetSyncFlags(byte dbID)
Reset the synchronization flags for the given database. |
void |
resetSystem()
Request that the handheld reset itself at the end of synchronization. |
void |
setTime(java.util.Calendar time)
Sets the date and time on the handheld. |
void |
setTransport(SLPTransportInterface t)
Set the transport for the protocol stack to use. |
void |
setUserInfo(DLPUserInfo userInfo)
Set the user information for the handheld. |
void |
startTickles()
Start sending tickle packets. |
void |
stopTickles()
Stop sending tickle packets. |
void |
suspend()
Put the protocol stack into suspended mode. |
void |
writeApplicationBlock(byte dbID,
byte[] data)
Write the specified application block to the specified database. |
void |
writeApplicationBlock(byte dbID,
DLPBlock appBlock)
Write an application block to the specified database. |
void |
writeAppPreference(int creatorID,
char prefID,
byte flags,
DLPAppPreference preference)
Write an application preference. |
int |
writeRecord(byte dbID,
byte flags,
DLPRecord record)
Write a record to the specified database. |
int |
writeRecord(byte dbID,
byte flags,
int id,
byte attributes,
byte category,
byte[] data)
Write a record to the specified database. |
void |
writeResource(byte dbID,
DLPResource res)
Write a resource to the specified database |
void |
writeResource(byte dbID,
int type,
char id,
byte[] data)
Write a resource to the specified database |
void |
writeSortBlock(byte dbID,
byte[] data)
Writes a sort block to the specified database. |
void |
writeSortBlock(byte dbID,
DLPBlock sortBlock)
Writes a sort block to the specified database. |
Methods inherited from class java.lang.Object |
---|
|
Field Detail |
static final DLPVersion DLP_VERSION
Constructor Detail |
public JHotSync(CMP_DLP cmp_dlp)
cmp_dlp
- the CMP_DLP handler to use for I/O.public JHotSync(SLPTransportInterface transport)
transport
- the transport class to use for synchronization.Method Detail |
public void addSyncLogEntry(java.lang.String s) throws DLPFunctionCallException, NotConnectedException
s
- the data to append to the handheld's synchronization log.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void cleanupDatabase(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void closeAllDatabases() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void closeDatabase(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void connect() throws NotConnectedException
NotConnectedException
- if the connection is lost during processing.public byte createDatabase(byte card, int creator, int type, java.lang.String dbName, char flags, char version) throws DLPFunctionCallException, NotConnectedException
card
- the card number to create the database on.creator
- the creator ID for this database.type
- the database type.dbName
- the name of the database.flags
- the flags to use in database creation.version
- the databases version.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public byte createDatabase(byte card, java.lang.String creator, java.lang.String type, java.lang.String dbName, char flags, char version) throws DLPFunctionCallException, NotConnectedException
card
- the card number to create the database on.creator
- the database creator.type
- the databases type.dbName
- the name of the database.flags
- the flags to use during database creation.version
- the database version.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void deleteDatabase(byte card, java.lang.String dbName) throws DLPFunctionCallException, NotConnectedException
card
- the card number to delete the database from.dbName
- the name of the database.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void deleteRecord(byte dbID, byte flags, int recordID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.flags
- the record deletion flags.recordID
- the ID number for the record to delete.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void deleteResource(byte dbID, byte flags, int type, char resourceID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.flags
- the resource deletion flags.type
- the type information for the resource to delete.resourceID
- the resource ID to delete.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void disconnect() throws NotConnectedException
NotConnectedException
- if we're not connected, or the connection is lost during processing.public void disconnect(char reasonCode) throws NotConnectedException
reasonCode
- the reason for the disconnect.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPBlock getApplicationBlock(byte dbID, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public CMP_DLP getCmpDlpHandler()
public DLPDatabaseListGroup getDatabaseList(byte searchFlags, byte cardNumber, char startIndex) throws DLPFunctionCallException, NotConnectedException
searchFlags
- the search flags to use for reading the database info (ie: DLPDatabase.RAM_BASED and DLPDatabase.ROM_BASED)cardNumber
- the card number to read database information objects from.startIndex
- the start index for reading database information objects.DLPFunctionCallException
- thrown if there is an error in processing the request.NotConnectedException
- thrown if the connection is lost while processing this command.DLPDatabaseListGroup
,
DLPDatabase
public int getOpenDatabaseInfo(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public PADP getPADPHandler()
public SLP getSLPHandler()
public DLPBlock getSortBlock(byte dbID, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public int getSpeed()
public DLPStorageInfo getStorageInfo(byte card) throws DLPFunctionCallException, NotConnectedException
card
- the card number to read the storage info from.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPSystemInfo getSystemInfo() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public java.util.Calendar getTime() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPUserInfo getUserInfo() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public boolean isConnected()
public void moveCategory(byte dbID, byte from, byte to) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.from
- the category ID to move from.to
- the category ID to move to.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void openConduit() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public byte openDatabase(byte card, byte mode, java.lang.String dbName) throws DLPFunctionCallException, NotConnectedException
card
- the card number holding the database to be opened.mode
- the I/O mode for the database.dbName
- the name of the database.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPAppPreference readAppPreference(int creatorID, char prefID, char size, byte flags) throws DLPFunctionCallException, NotConnectedException
creatorID
- the preference creator.prefID
- the preference ID.size
- the number of bytes to be read.flags
- the preference read flags.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPRecord readNextModifiedRecord(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPRecord readNextModifiedRecordInCategory(byte dbID, byte category) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.category
- the category to read from.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPRecord readNextRecordInCategory(byte dbID, byte category) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.category
- the category to read from.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPRecord readRecord(byte dbID, char index, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.index
- the record index to be read.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPRecord readRecord(byte dbID, int id, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.id
- the ID number for the record to be read.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public int[] readRecordIDList(byte dbID, byte flags, char start, char maxEntries) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.flags
- the read flags to be used.start
- the first entry to start reading from.maxEntries
- the maximum number of entries to return.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPResource readResource(byte dbID, char index, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.index
- the record index to be read.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public DLPResource readResource(byte dbID, int type, char id, char offset, char length) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.type
- the resource type information.id
- the ID number for the record to be read.offset
- the offset into the data to start reading from.length
- the number of bytes to read, or 0xFFFF to read to the end.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void resetRecordIndex(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void resetSyncFlags(byte dbID) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void resetSystem() throws DLPFunctionCallException, NotConnectedException
DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void setTime(java.util.Calendar time) throws DLPFunctionCallException, NotConnectedException
time
- the date/time to set the handheld to.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void setTransport(SLPTransportInterface t)
t
- the transport for the protocol stack to use.public void setUserInfo(DLPUserInfo userInfo) throws DLPFunctionCallException, NotConnectedException
userInfo
- the user information object to write to the handheld.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void startTickles()
public void stopTickles()
public void suspend() throws NotConnectedException
NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeApplicationBlock(byte dbID, DLPBlock appBlock) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.appBlock
- the application block to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeApplicationBlock(byte dbID, byte[] data) throws DLPFunctionCallException, NotConnectedException
data
- the application block to be written.dbID
- the database identification handle.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeAppPreference(int creatorID, char prefID, byte flags, DLPAppPreference preference) throws DLPFunctionCallException, NotConnectedException
creatorID
- the preference creator.prefID
- the preference ID.flags
- the preference flags.preference
- the application preference to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public int writeRecord(byte dbID, byte flags, int id, byte attributes, byte category, byte[] data) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.flags
- the record write flags.id
- the ID number for the record to be written.attributes
- the record attributes.category
- the category to read from.data
- the record data to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public int writeRecord(byte dbID, byte flags, DLPRecord record) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.flags
- record
- the recond object to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeResource(byte dbID, int type, char id, byte[] data) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.type
- the resource type.id
- the ID number for the resource to be written.data
- the resource data to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeResource(byte dbID, DLPResource res) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.res
- the resource data to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeSortBlock(byte dbID, DLPBlock sortBlock) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.sortBlock
- the block object to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public void writeSortBlock(byte dbID, byte[] data) throws DLPFunctionCallException, NotConnectedException
dbID
- the database identification handle.data
- the sort block to be written.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.public byte[] processRPC(byte[] data) throws DLPFunctionCallException, NotConnectedException
data
- the RPC request to transmit.DLPFunctionCallException
- thrown if a DLP error results from this request.NotConnectedException
- if we're not connected, or the connection is lost during processing.
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |