| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jSyncManager.API.Protocol.JHotSyncpublic class JHotSyncextends java.lang.ObjectConstructor Summary | |
| |
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
byte |
|
byte |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
byte[] |
|
DirectoryEntryEnumeration |
|
VolumeReference[] |
|
void |
|
DLPFindDBResponse |
|
DLPFindDBResponse |
|
DLPFindDBResponse |
|
void |
|
DLPBlock |
|
CMP_DLP |
|
DLPDatabaseListGroup |
|
DLPExpansionCardInfo |
|
int |
|
PADP |
|
SLP |
|
SlotReference[] |
|
int |
|
DLPBlock |
|
int |
|
DLPStorageInfo |
|
DLPSystemInfo |
|
Calendar |
|
DLPUserInfo |
|
String |
|
long |
|
int |
|
VolumeInfo |
|
String |
|
VolumeSize |
|
ImportDBFromVFSFileResponse |
|
boolean |
|
boolean |
|
boolean |
|
char[] |
|
void |
|
void |
|
byte |
|
FileReference |
|
byte[] |
|
RPCPacket |
|
int |
|
int |
|
DLPAppPreference |
|
int |
|
DLPNetSyncInfo |
|
DLPRecord |
|
DLPRecord |
|
DLPRecord |
|
DLPRecord |
|
DLPRecord |
|
int[] |
|
DLPResource |
|
DLPResource |
|
byte[] |
|
int |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
int |
|
int |
|
void |
|
void |
|
void |
|
void |
|
int |
|
int |
|
int |
|
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.
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.
public void addSyncLogEntry(String s)
throws DLPFunctionCallException,
NotConnectedExceptionAdd 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.
public void cleanupDatabase(byte dbID)
throws DLPFunctionCallException,
NotConnectedExceptionCleans 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.
public void closeAllDatabases()
throws DLPFunctionCallException,
NotConnectedExceptionClose 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.
public void closeDatabase(byte dbID)
throws DLPFunctionCallException,
NotConnectedExceptionClose 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.
public void closeVFSFile(FileReference file) throws DLPFunctionCallException, NotConnectedException
Closes the specified file reference on a VFS volume.
- Parameters:
file- the file reference of the file to close.
- Throws:
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 NotConnectedExceptionConnect 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.
public byte createDatabase(byte card,
String creator,
String type,
String dbName,
char flags,
char version)
throws DLPFunctionCallException,
NotConnectedExceptionCreates 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.
public byte createDatabase(byte card,
int creator,
int type,
String dbName,
char flags,
char version)
throws DLPFunctionCallException,
NotConnectedExceptionCreates 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.
public void createVFSDirectory(VolumeReference volRef, String pathname) throws DLPFunctionCallException, NotConnectedException
Creates the specified directory on the specified VFS volume.
- Parameters:
volRef- the volume reference number of the volume to create the directory onto.pathname- a String containing the directory's path.
- Throws:
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 createVFSFile(VolumeReference volRef, String filename) throws DLPFunctionCallException, NotConnectedException
Creates a file on the specified VFS volume.
- Parameters:
volRef- the volume reference number of the volume to query.filename- a String containing the files path and filename.
- Throws:
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,
String dbName)
throws DLPFunctionCallException,
NotConnectedExceptionDeletes 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.
public void deleteRecord(byte dbID,
byte flags,
int recordID)
throws DLPFunctionCallException,
NotConnectedExceptionDelete 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.
public void deleteResource(byte dbID,
byte flags,
int type,
char resourceID)
throws DLPFunctionCallException,
NotConnectedExceptionDelete 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.
public void deleteVFSFile(VolumeReference volRef, String filename) throws DLPFunctionCallException, NotConnectedException
Deletes the specified file from a VFS filesystem.
- Parameters:
volRef- the volume reference number of the volume to delete from.filename- a String containing the files path and filename.
- Throws:
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 NotConnectedExceptionDisconnects the protocol stack from the remote end.
- Throws:
NotConnectedException- if we're not connected, or the connection is lost during processing.
public void disconnect(char reasonCode)
throws NotConnectedExceptionDisconnects 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.
public byte[] doLoopbackTest(byte[] data)
throws DLPFunctionCallException,
NotConnectedExceptionRuns a loopback test with the device.
- Parameters:
data- the data to transmit.
- Returns:
- the data that was received back form 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.
public DirectoryEntryEnumeration enumerateDirectory(FileReference file, int iterator) throws DLPFunctionCallException, NotConnectedException
Retrieves an enumeration of the entries in the specified directory.
- Parameters:
file- the file reference of the directory to enumerate.iterator- the directory entry iterator (pass 0 to start the enumeration).
- Returns:
- the enumeration of the directory entries.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public VolumeReference[] enumerateVFSVolumes() throws DLPFunctionCallException, NotConnectedException
Enumerates all the VFS volumes available on the system.
- Returns:
- an array containing all of the available VFS volumes on the handheld device.
- Throws:
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 exportDatabaseToVFSFile(VolumeReference volRef, char cardNum, int dbID, String filename) throws DLPFunctionCallException, NotConnectedException
Exports a handheld database to a file on a VFS filesystem. Calling this method will take a handheld database, and will then save it to a VFS filesystem as a PRC or PDB file.
- Parameters:
volRef- the volume reference number of the volume to query.cardNum- the card number the database resides on.dbID- the databases ID number.filename- a String containing the files path and filename.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public DLPFindDBResponse findDatabaseByCreator(byte flags, byte searchFlags, int type, int creator) throws DLPFunctionCallException, NotConnectedException
Finds a database based on its creator information.
- Parameters:
flags- the search flags to use.searchFlags- the search flags to use.type- the type information for the database to find.creator- the creator ID of the database to find.
- Returns:
- the handhelds search results 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.
public DLPFindDBResponse findDatabaseByName(byte flags, byte cardNumber, String dbName) throws DLPFunctionCallException, NotConnectedException
Finds the specified database by name.
- Parameters:
flags- the search flags to use.cardNumber- the card number to search on.dbName- the name of the database to find.
- Returns:
- the handhelds search results 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.
public DLPFindDBResponse findDatabaseByOpenHandle(byte flags, byte dbID) throws DLPFunctionCallException, NotConnectedException
Finds information on a database using its open database handle.
- Parameters:
flags- the search flags to use.dbID- the open database handle to query.
- Returns:
- the handhelds search results 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.
public void formatVFSVolume(char filesystemRefNum,
byte flags,
MountParameters mountParams)
throws DLPFunctionCallException,
NotConnectedExceptionFormats the specified VFS volume.
- Parameters:
filesystemRefNum- the filesystem reference number to use to do the formatting.flags- the filesystem-specifiec format flags.mountParams- the filesystem-specific mounting parameters.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.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
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.
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.
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
public DLPExpansionCardInfo getExpansionCardInfo(SlotReference slotRef) throws DLPFunctionCallException, NotConnectedException
Reads the expansion card information for the given slot ID.
- Parameters:
slotRef- the expansion slot reference to test.
- Returns:
- the expansion card information for the given slot ID.
- Throws:
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 getOpenDatabaseInfo(byte dbID)
throws DLPFunctionCallException,
NotConnectedExceptionGets 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.
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.
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.
public SlotReference[] getSlotEnumeration() throws DLPFunctionCallException, NotConnectedException
Retrieves a list of the slot reference numbers available on the device. To discover how many slots are available on the device, query the length of the array calls to this method return.
- Returns:
- a list of the slot reference numbers available on the device.
- Throws:
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 getSlotMediaType(SlotReference slotRef) throws DLPFunctionCallException, NotConnectedException
Retrieves the media type for the given slot identifier.
- Parameters:
slotRef- the slot reference to query.
- Returns:
- the slot reference ID.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
- See Also:
SlotReference
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.
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.
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.
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.
public Calendar getTime()
throws DLPFunctionCallException,
NotConnectedExceptionRetreives 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.
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.
public String getVFSDefaultDirectory(VolumeReference volRef, String fileType) throws DLPFunctionCallException, NotConnectedException
Retrieves the VFS Default Directory.
- Parameters:
volRef- the volume reference number of the volume to query.fileType- a String containing the file type information.
- Returns:
- the default directory for the specified volume and filetype.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public long getVFSFileDate(FileReference file, char dateType) throws DLPFunctionCallException, NotConnectedException
Retrieves a file date for the specified file. This method can return three possible file dates: the creation date, modified date, and last accessed date. To specify which to return, use one of the date constants in the FileReference class.
- Parameters:
file- the file reference of the file to query.dateType- the date type to return.
- Returns:
- a long containing the requested date.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
- See Also:
FileReference
public int getVFSFileSize(FileReference file) throws DLPFunctionCallException, NotConnectedException
Retrieves the size of the specified file.
- Parameters:
file- the file reference of the file to query.
- Returns:
- an integer containing the requested file size.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public VolumeInfo getVFSVolumeInfo(VolumeReference volRef) throws DLPFunctionCallException, NotConnectedException
Retrieves the volume information for the specified volume.
- Parameters:
volRef- the volume reference to query.
- Returns:
- the VolumeInfo object for this volume.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public String getVFSVolumeLabel(VolumeReference volRef) throws DLPFunctionCallException, NotConnectedException
Retrieves the VFS Volume label.
- Parameters:
volRef- the volume reference number of the volume to query.
- Returns:
- the volume label for the specified VFS volume.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public VolumeSize getVFSVolumeSize(VolumeReference volRef) throws DLPFunctionCallException, NotConnectedException
Retrieves the volume size information for the specified volume.
- Parameters:
volRef- the volume reference to query.
- Returns:
- the VolumeSize object for this volume.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public ImportDBFromVFSFileResponse importDatabaseFromVFSFile(VolumeReference volRef, String filename) throws DLPFunctionCallException, NotConnectedException
Imports a handheld database from a file on a VFS filesystem. Calling this method will take a PRC or PDB file on a VFS volume, and will install it as a handheld database.
- Parameters:
volRef- the volume reference number of the volume to query.filename- a String containing the files path and filename.
- Returns:
- the ImportDBFromVFSFileResponse object containing the operations results.
- Throws:
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()
Checks to see if the protocol stack is currently connected and active.
- Returns:
- true if the protocol stack is connected, false otherwise.
public boolean isExpansionCardPresent(SlotReference slotRef) throws DLPFunctionCallException, NotConnectedException
Tests to see whether a card is present in the specified expansion slot.
- Parameters:
slotRef- the expansion slot reference to test.
- Returns:
- true if a card is present, false otherwise.
- Throws:
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 isVFSFileAtEOF(FileReference file) throws DLPFunctionCallException, NotConnectedException
Determines wether or not the given file reference's pointer is at the End Of File (EOF).
- Parameters:
file- the file reference of the file to query.
- Returns:
- true if we're at the end-of-file, false otherwise.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public char[] makeVFSCustomControlRequest(int fsCreator,
int apiCreator,
char apiSelector,
char[] buffer)
throws DLPFunctionCallException,
NotConnectedExceptionVFS File custom control method. Calls to this method will make the corresponding custom control calls to the handhelds VFS Manager filesystem API.
- Parameters:
fsCreator- the fsCreator value.apiCreator- the apiCreator value.apiSelector- the API Selectorbuffer- the data to transmit with this request.
- Returns:
- an array of char containing the returned 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.
public void moveCategory(byte dbID,
byte from,
byte to)
throws DLPFunctionCallException,
NotConnectedExceptionMoves 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.
public void openConduit()
throws DLPFunctionCallException,
NotConnectedExceptionInforms 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.
public byte openDatabase(byte card,
byte mode,
String dbName)
throws DLPFunctionCallException,
NotConnectedExceptionOpen 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.
public FileReference openVFSFile(VolumeReference volRef, char openMode, String pathString) throws DLPFunctionCallException, NotConnectedException
Opens a VFS file. See the FileReference class for a set of static members that can be passed in for the openMode parameter.
- Parameters:
volRef- the volume reference to open the file from.openMode- the open mode flags for the file.pathString- the path and filename of the file to open.
- Returns:
- the file reference to the opened file.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
- See Also:
FileReference
public byte[] processRPC(byte[] data)
throws DLPFunctionCallException,
NotConnectedExceptionProcess 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.
public RPCPacket processRPC(RPCPacket pkt) throws DLPFunctionCallException, NotConnectedException
Process a Remote Procedure Call request.
- Parameters:
pkt- the RPC Packet object 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.
public int queryVFSFileAttributes(FileReference file) throws DLPFunctionCallException, NotConnectedException
Retrieves the file attributes for the specified file.
- Parameters:
file- the file reference of the file to query.
- Returns:
- an integer containing the files attributes bitmap.
- Throws:
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 queryVFSFilePosition(FileReference file) throws DLPFunctionCallException, NotConnectedException
Retrieves the location of the file pointer in the specified VFS file.
- Parameters:
file- the file reference of the file to query.
- Returns:
- an integer containing the value for the specified files current I/O position pointer.
- Throws:
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
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.
public int readFeature(int creator,
char featureNum)
throws DLPFunctionCallException,
NotConnectedExceptionReads a Feature from the handheld.
- Parameters:
creator- an integer containing the creator ID of the feature to be read.featureNum- the feature number to read.
- Returns:
- the feature information requested.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
public DLPNetSyncInfo readNetSyncInfo() throws DLPFunctionCallException, NotConnectedException
Reads the network synchronization information from the handheld.
- Returns:
- the DLPNetSyncInfo object for the synchronizing device.
- Throws:
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
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.
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.
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.
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.
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.
public int[] readRecordIDList(byte dbID,
byte flags,
char start,
char maxEntries)
throws DLPFunctionCallException,
NotConnectedExceptionReads 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.
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.
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.
public byte[] readVFSFile(FileReference file, int numBytes) throws DLPFunctionCallException, NotConnectedException
Reads the specified number of bytes from a VFS file.
- Parameters:
file- the file reference to read from.numBytes- the number of bytes to be read.
- Returns:
- an array of bytes containing the read 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.
public int readVFSFileToStream(FileReference file, int numBytes, OutputStream out) throws DLPFunctionCallException, NotConnectedException
Reads the specified number of bytes from a VFS file, and outputs it to a stream. This method is less memory intensive than readVFSFile for large files.
- Parameters:
file- the file reference to read from.numBytes- the number of bytes to be read.out- the OutputStream object to write the data to.
- Returns:
- the number of bytes written to the stream.
- Throws:
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 renameVFSFile(VolumeReference volRef, String oldFilename, String newFilename) throws DLPFunctionCallException, NotConnectedException
Renames the specified VFS file to the newly specified name.
- Parameters:
volRef- the volume reference number of the volume to delete from.oldFilename- a String containing the name of the file to be renamed.newFilename- a String containing the new name for the file.
- Throws:
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,
NotConnectedExceptionReset 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.
public void resetSyncFlags(byte dbID)
throws DLPFunctionCallException,
NotConnectedExceptionReset 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.
public void resetSystem()
throws DLPFunctionCallException,
NotConnectedExceptionRequest 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.
public void resizeVFSFile(FileReference file, int newSize) throws DLPFunctionCallException, NotConnectedException
Resizes the specified file to the specified new size in bytes.
- Parameters:
file- the file reference of the file to resize.newSize- the new size of the file.
- Throws:
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 seekVFSFile(FileReference file, char origin, int offset) throws DLPFunctionCallException, NotConnectedException
Seeks to the specified position in the specified VFS file.
- Parameters:
file- the file reference to seek in.origin- the location to seek from.offset- the offset to seek to (may be negative).
- Throws:
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 setDatabaseInfo(byte dbID,
char clearFlags,
char setFlags,
char dbVersion,
DLP_Date creationDate,
DLP_Date modifiedDate,
DLP_Date backupDate,
int dbTypeID,
int dbCreator,
String dbName)
throws DLPFunctionCallException,
NotConnectedExceptionSets the specified information for a database.
- Parameters:
dbID- the database ID handle of the database to modify.clearFlags- a set of flags to denote which fields should be cleared.setFlags- a set of flags to denote which flags should be set.dbVersion- the new database version.creationDate- the new creation date for the database.modifiedDate- the new modification date for the database.backupDate- the new backup date for the database.dbTypeID- the databases new type ID.dbCreator- the new creator for the database.dbName- the new name for 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.
public void setTime(Calendar time)
throws DLPFunctionCallException,
NotConnectedExceptionSets 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.
public void setTransport(SLPTransportInterface t)
Set the transport for the protocol stack to use.
- Parameters:
t- the transport for the protocol stack to use.
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.
public void setVFSFileAttributes(FileReference file, int attributes) throws DLPFunctionCallException, NotConnectedException
Sets the atttributes for the specified file
- Parameters:
file- the file reference of the file to set the attributes for.attributes- the new file attributes bitmap.
- Throws:
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 setVFSFileDate(FileReference file, char dateType, long newValue) throws DLPFunctionCallException, NotConnectedException
Sets the specified date for the specified file. This method can set three possible file dates: the creation date, modified date, and last accessed date. To specify which to set, use one of the date constants in the FileReference class.
- Parameters:
file- the file reference of the file to query.dateType- the date type to be set.newValue- the new value for the specified date.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.
- See Also:
FileReference
public void setVFSVolumeLabel(VolumeReference volRef, String newLabel) throws DLPFunctionCallException, NotConnectedException
Sets the volume label for the specified VFS Volume.
- Parameters:
volRef- the volume reference number of the volume to query.newLabel- the new label to use on the specified volume.
- Throws:
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()
Start sending tickle packets.
public void stopTickles()
Stop sending tickle packets.
public void suspend()
throws NotConnectedExceptionPut 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.
public void writeAppPreference(int creatorID,
char prefID,
byte flags,
DLPAppPreference preference)
throws DLPFunctionCallException,
NotConnectedExceptionWrite 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.
public void writeApplicationBlock(byte dbID,
data[] )
throws DLPFunctionCallException,
NotConnectedExceptionWrite the specified application block to the specified 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.
public void writeApplicationBlock(byte dbID,
DLPBlock appBlock)
throws DLPFunctionCallException,
NotConnectedExceptionWrite 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.
public void writeNetSyncInfo(DLPNetSyncInfo netSyncInfo) throws DLPFunctionCallException, NotConnectedException
Writes the network synchronization information to the handheld.
- Parameters:
netSyncInfo- the DLPNetSyncInfo object to write.
- Throws:
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,
data[] )
throws DLPFunctionCallException,
NotConnectedExceptionWrite 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.
- 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.
public int writeRecord(byte dbID,
byte flags,
DLPRecord record)
throws DLPFunctionCallException,
NotConnectedExceptionWrite 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.
public void writeResource(byte dbID,
int type,
char id,
data[] )
throws DLPFunctionCallException,
NotConnectedExceptionWrite 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.
- Throws:
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,
NotConnectedExceptionWrite 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.
public void writeSortBlock(byte dbID,
data[] )
throws DLPFunctionCallException,
NotConnectedExceptionWrites a sort block to the specified 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.
public void writeSortBlock(byte dbID,
DLPBlock sortBlock)
throws DLPFunctionCallException,
NotConnectedExceptionWrites 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.
public int writeVFSFile(FileReference file, byte[] data) throws DLPFunctionCallException, NotConnectedException
Write the specified data to a VFS file.
- Parameters:
file- the file reference to write to.data- the data to be written.
- Returns:
- the response from the handheld write proccess.
- Throws:
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 writeVFSFile(FileReference file, byte[] data, int dataLen) throws DLPFunctionCallException, NotConnectedException
Write the specified data of specified length to a VFS file.
- Parameters:
file- the file reference to write to.data- the data to be written.dataLen- the number of bytes in the buffer to be written.
- Returns:
- the response from the handheld write proccess.
- Throws:
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 writeVFSFileFromStream(FileReference file, InputStream stream, int length) throws DLPFunctionCallException, NotConnectedException
Write the specified data stream to a VFS file.
- Parameters:
file- the file reference to write to.stream- the data stream to be written from.length- the number of bytes to be written.
- Returns:
- the response from the handheld write proccess.
- Throws:
DLPFunctionCallException- thrown if a DLP error results from this request.NotConnectedException- if we're not connected, or the connection is lost during processing.