jSyncManager

org.jSyncManager.API.Protocol
Class JHotSync

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.JHotSync

public class JHotSync
extends java.lang.Object

JHotSync class. This class provides high-level access to HotSync function calls.

Version:
$Revision: 1.14 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: dingodave $ on $Date: 2003/06/18 05:32:15 $.

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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DLP_VERSION

static final DLPVersion DLP_VERSION
The DLP version to claim at sync time.
Constructor Detail

JHotSync

public JHotSync(CMP_DLP cmp_dlp)
Construct a new JHotSync object with the specified CMP_DLP object.
Parameters:
cmp_dlp - the CMP_DLP handler to use for I/O.

JHotSync

public JHotSync(SLPTransportInterface transport)
Construct a new JHotSync object using the provided transport object. This construct will create all of the necessary protocol objects, and connect them so they're ready for a synchronization session.
Parameters:
transport - the transport class to use for synchronization.
Method Detail

addSyncLogEntry

public void addSyncLogEntry(java.lang.String s)
                     throws DLPFunctionCallException,
                            NotConnectedException
Add an entry to the handhelds sync log.
Parameters:
s - the data to append to the handheld's synchronization log.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

cleanupDatabase

public void cleanupDatabase(byte dbID)
                     throws DLPFunctionCallException,
                            NotConnectedException
Cleans up the specified database. Calling this method calls the specified database to remove all records flagged as deleted, and to reset all modification flags.
Parameters:
dbID - the database identification handle.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

closeAllDatabases

public void closeAllDatabases()
                       throws DLPFunctionCallException,
                              NotConnectedException
Close all open databases.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

closeDatabase

public void closeDatabase(byte dbID)
                   throws DLPFunctionCallException,
                          NotConnectedException
Close the specified daatabase.
Parameters:
dbID - the database identification handle.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

connect

public void connect()
             throws NotConnectedException
Connect the protocol stack, and start listening for a synchronization request. Calls to this method block until a connection is established.
Throws:
NotConnectedException - if the connection is lost during processing.

createDatabase

public byte createDatabase(byte card,
                           int creator,
                           int type,
                           java.lang.String dbName,
                           char flags,
                           char version)
                    throws DLPFunctionCallException,
                           NotConnectedException
Creates a database with the specified parameters.
Parameters:
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.
Returns:
the database ID of the created database.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

createDatabase

public byte createDatabase(byte card,
                           java.lang.String creator,
                           java.lang.String type,
                           java.lang.String dbName,
                           char flags,
                           char version)
                    throws DLPFunctionCallException,
                           NotConnectedException
Creates a database with the specified parameters.
Parameters:
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.
Returns:
the database ID of the newly created database.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

deleteDatabase

public void deleteDatabase(byte card,
                           java.lang.String dbName)
                    throws DLPFunctionCallException,
                           NotConnectedException
Deletes the database with the specified properties.
Parameters:
card - the card number to delete the database from.
dbName - the name of the database.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

deleteRecord

public void deleteRecord(byte dbID,
                         byte flags,
                         int recordID)
                  throws DLPFunctionCallException,
                         NotConnectedException
Delete a record from the handheld.
Parameters:
dbID - the database identification handle.
flags - the record deletion flags.
recordID - the ID number for the record to delete.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

deleteResource

public void deleteResource(byte dbID,
                           byte flags,
                           int type,
                           char resourceID)
                    throws DLPFunctionCallException,
                           NotConnectedException
Delete the specified resource from the handheld.
Parameters:
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.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

disconnect

public void disconnect()
                throws NotConnectedException
Disconnects the protocol stack from the remote end.
Throws:
NotConnectedException - if we're not connected, or the connection is lost during processing.

disconnect

public void disconnect(char reasonCode)
                throws NotConnectedException
Disconnects the protocol stack for the supplied reason code.
Parameters:
reasonCode - the reason for the disconnect.
Throws:
NotConnectedException - if we're not connected, or the connection is lost during processing.

getApplicationBlock

public DLPBlock getApplicationBlock(byte dbID,
                                    char offset,
                                    char length)
                             throws DLPFunctionCallException,
                                    NotConnectedException
Retrieve the specified application block.
Parameters:
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.
Returns:
the block object for the requested application block.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getCmpDlpHandler

public CMP_DLP getCmpDlpHandler()
Retreives the CMP_DLP handler in use by the protocol stack.
Returns:
the CMP_DLP handler in use by the protocol stack.

getDatabaseList

public DLPDatabaseListGroup getDatabaseList(byte searchFlags,
                                            byte cardNumber,
                                            char startIndex)
                                     throws DLPFunctionCallException,
                                            NotConnectedException
Gets the list of information on the databases stored on the remote Palm Computing Platform device.
Parameters:
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.
Returns:
the DLPDatabaseListGroup object containing the read database information objects.
Throws:
DLPFunctionCallException - thrown if there is an error in processing the request.
NotConnectedException - thrown if the connection is lost while processing this command.
See Also:
DLPDatabaseListGroup, DLPDatabase

getOpenDatabaseInfo

public int getOpenDatabaseInfo(byte dbID)
                        throws DLPFunctionCallException,
                               NotConnectedException
Gets the number of records/resources in an open database.
Parameters:
dbID - the database identification handle.
Returns:
the number of records or resources in the specified database.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getPADPHandler

public PADP getPADPHandler()
Gets the PADP protocol in use by the active protocol stack.
Returns:
the PADP protocol in use by the active protocol stack.

getSLPHandler

public SLP getSLPHandler()
Gets the SLP protocol in use by the active protocol stack.
Returns:
the SLP protocol in use by the active protocol stack.

getSortBlock

public DLPBlock getSortBlock(byte dbID,
                             char offset,
                             char length)
                      throws DLPFunctionCallException,
                             NotConnectedException
Gets the sort block for the specified database.
Parameters:
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.
Returns:
the requested sort block.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getSpeed

public int getSpeed()
Retreives the speed of the synchronization. Note that this value will only be valid for serial based synchronizations.
Returns:
the speed of the serial connection.

getStorageInfo

public DLPStorageInfo getStorageInfo(byte card)
                              throws DLPFunctionCallException,
                                     NotConnectedException
Retreives the storage information for the specified card.
Parameters:
card - the card number to read the storage info from.
Returns:
the storage information for the specified card.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getSystemInfo

public DLPSystemInfo getSystemInfo()
                            throws DLPFunctionCallException,
                                   NotConnectedException
Retreives the handhelds system information.
Returns:
the handhelds system information.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getTime

public java.util.Calendar getTime()
                           throws DLPFunctionCallException,
                                  NotConnectedException
Retreives the date and time reported by the handheld.
Returns:
the date and time reported by the handheld.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

getUserInfo

public DLPUserInfo getUserInfo()
                        throws DLPFunctionCallException,
                               NotConnectedException
Retreives the user information for the handheld.
Returns:
the user information for the handheld.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

isConnected

public boolean isConnected()
Checks to see if the protocol stack is currently connected and active.
Returns:
true if the protocol stack is connected, false otherwise.

moveCategory

public void moveCategory(byte dbID,
                         byte from,
                         byte to)
                  throws DLPFunctionCallException,
                         NotConnectedException
Moves the specified category from one ID to another.
Parameters:
dbID - the database identification handle.
from - the category ID to move from.
to - the category ID to move to.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

openConduit

public void openConduit()
                 throws DLPFunctionCallException,
                        NotConnectedException
Informs the handheld that a conduit is about to be opened. Calling this function allows the handheld to update it display, and do a bit of cleanup.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

openDatabase

public byte openDatabase(byte card,
                         byte mode,
                         java.lang.String dbName)
                  throws DLPFunctionCallException,
                         NotConnectedException
Open the specified database using the specified I/O mode.
Parameters:
card - the card number holding the database to be opened.
mode - the I/O mode for the database.
dbName - the name of the database.
Returns:
the database ID handle for further database I/O.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readAppPreference

public DLPAppPreference readAppPreference(int creatorID,
                                          char prefID,
                                          char size,
                                          byte flags)
                                   throws DLPFunctionCallException,
                                          NotConnectedException
Reads an application preference from the handheld.
Parameters:
creatorID - the preference creator.
prefID - the preference ID.
size - the number of bytes to be read.
flags - the preference read flags.
Returns:
the requested preference data.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readNextModifiedRecord

public DLPRecord readNextModifiedRecord(byte dbID)
                                 throws DLPFunctionCallException,
                                        NotConnectedException
Read the next modified record from the specified database.
Parameters:
dbID - the database identification handle.
Returns:
the next modified record in the database.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readNextModifiedRecordInCategory

public DLPRecord readNextModifiedRecordInCategory(byte dbID,
                                                  byte category)
                                           throws DLPFunctionCallException,
                                                  NotConnectedException
Reads the next modified record in the specified category.
Parameters:
dbID - the database identification handle.
category - the category to read from.
Returns:
the next modified record in the specified category.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readNextRecordInCategory

public DLPRecord readNextRecordInCategory(byte dbID,
                                          byte category)
                                   throws DLPFunctionCallException,
                                          NotConnectedException
Reads the next record in the specified category.
Parameters:
dbID - the database identification handle.
category - the category to read from.
Returns:
the next record in the specified category.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readRecord

public DLPRecord readRecord(byte dbID,
                            char index,
                            char offset,
                            char length)
                     throws DLPFunctionCallException,
                            NotConnectedException
Read a record from the specified database.
Parameters:
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.
Returns:
the request record object.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readRecord

public DLPRecord readRecord(byte dbID,
                            int id,
                            char offset,
                            char length)
                     throws DLPFunctionCallException,
                            NotConnectedException
Read a record from the specified database.
Parameters:
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.
Returns:
the requested record object.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readRecordIDList

public int[] readRecordIDList(byte dbID,
                              byte flags,
                              char start,
                              char maxEntries)
                       throws DLPFunctionCallException,
                              NotConnectedException
Reads the list of record IDs from the specified database.
Parameters:
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.
Returns:
an int array containing all of the requested record ID numbers.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readResource

public DLPResource readResource(byte dbID,
                                char index,
                                char offset,
                                char length)
                         throws DLPFunctionCallException,
                                NotConnectedException
Read a resource from the specified database by index.
Parameters:
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.
Returns:
the requested resource.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

readResource

public DLPResource readResource(byte dbID,
                                int type,
                                char id,
                                char offset,
                                char length)
                         throws DLPFunctionCallException,
                                NotConnectedException
Read a resource from the specified database by resource ID.
Parameters:
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.
Returns:
the requested resource.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

resetRecordIndex

public void resetRecordIndex(byte dbID)
                      throws DLPFunctionCallException,
                             NotConnectedException
Reset the record index. This is used when calling one of the "readNext..." methods to reset the record index back to the beginning.
Parameters:
dbID - the database identification handle.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

resetSyncFlags

public void resetSyncFlags(byte dbID)
                    throws DLPFunctionCallException,
                           NotConnectedException
Reset the synchronization flags for the given database.
Parameters:
dbID - the database identification handle.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

resetSystem

public void resetSystem()
                 throws DLPFunctionCallException,
                        NotConnectedException
Request that the handheld reset itself at the end of synchronization.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

setTime

public void setTime(java.util.Calendar time)
             throws DLPFunctionCallException,
                    NotConnectedException
Sets the date and time on the handheld.
Parameters:
time - the date/time to set the handheld to.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

setTransport

public void setTransport(SLPTransportInterface t)
Set the transport for the protocol stack to use.
Parameters:
t - the transport for the protocol stack to use.

setUserInfo

public void setUserInfo(DLPUserInfo userInfo)
                 throws DLPFunctionCallException,
                        NotConnectedException
Set the user information for the handheld.
Parameters:
userInfo - the user information object to write to the handheld.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

startTickles

public void startTickles()
Start sending tickle packets.

stopTickles

public void stopTickles()
Stop sending tickle packets.

suspend

public void suspend()
             throws NotConnectedException
Put the protocol stack into suspended mode. Suspending the protocol stack causes its state to be reset to the beginning, and for it to start listening for the next synchronization request. This is more efficient then disconnecting the protocol stack and reconnecting it.
Throws:
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeApplicationBlock

public void writeApplicationBlock(byte dbID,
                                  DLPBlock appBlock)
                           throws DLPFunctionCallException,
                                  NotConnectedException
Write an application block to the specified database.
Parameters:
dbID - the database identification handle.
appBlock - the application block to be written.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeApplicationBlock

public void writeApplicationBlock(byte dbID,
                                  byte[] data)
                           throws DLPFunctionCallException,
                                  NotConnectedException
Write the specified application block to the specified database.
Parameters:
data - the application block to be written.
dbID - the database identification handle.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeAppPreference

public void writeAppPreference(int creatorID,
                               char prefID,
                               byte flags,
                               DLPAppPreference preference)
                        throws DLPFunctionCallException,
                               NotConnectedException
Write an application preference.
Parameters:
creatorID - the preference creator.
prefID - the preference ID.
flags - the preference flags.
preference - the application preference to be written.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeRecord

public int writeRecord(byte dbID,
                       byte flags,
                       int id,
                       byte attributes,
                       byte category,
                       byte[] data)
                throws DLPFunctionCallException,
                       NotConnectedException
Write a record to the specified database.
Parameters:
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.
Returns:
the records ID number.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeRecord

public int writeRecord(byte dbID,
                       byte flags,
                       DLPRecord record)
                throws DLPFunctionCallException,
                       NotConnectedException
Write a record to the specified database.
Parameters:
dbID - the database identification handle.
flags -  
record - the recond object to be written.
Returns:
the records ID number.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeResource

public void writeResource(byte dbID,
                          int type,
                          char id,
                          byte[] data)
                   throws DLPFunctionCallException,
                          NotConnectedException
Write a resource to the specified database
Parameters:
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.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeResource

public void writeResource(byte dbID,
                          DLPResource res)
                   throws DLPFunctionCallException,
                          NotConnectedException
Write a resource to the specified database
Parameters:
dbID - the database identification handle.
res - the resource data to be written.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeSortBlock

public void writeSortBlock(byte dbID,
                           DLPBlock sortBlock)
                    throws DLPFunctionCallException,
                           NotConnectedException
Writes a sort block to the specified database.
Parameters:
dbID - the database identification handle.
sortBlock - the block object to be written.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

writeSortBlock

public void writeSortBlock(byte dbID,
                           byte[] data)
                    throws DLPFunctionCallException,
                           NotConnectedException
Writes a sort block to the specified database.
Parameters:
dbID - the database identification handle.
data - the sort block to be written.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

processRPC

public byte[] processRPC(byte[] data)
                  throws DLPFunctionCallException,
                         NotConnectedException
Processen a Remote Procedure Call request.
Parameters:
data - the RPC request to transmit.
Returns:
the result of the RPC request.
Throws:
DLPFunctionCallException - thrown if a DLP error results from this request.
NotConnectedException - if we're not connected, or the connection is lost during processing.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.