jSyncManager

org.jSyncManager.API.Protocol
Class DLP_Packet

java.lang.Object
  extended byorg.jSyncManager.API.Protocol.DLP_Packet
All Implemented Interfaces:
java.io.Serializable

public class DLP_Packet
extends java.lang.Object
implements java.io.Serializable

DLPPacket class. This class provides the class representation of a DLP packet.

Version:
$Revision: 3.11 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2004/08/10 23:27:10 $.
See Also:
Serialized Form

Field Summary
static byte ADD_SYNC_LOG_ENTRY
          DLP function code to add an entry to the handheld sync log.
static byte CALL_APPLICATION
          DLP function code to call a handheld application.
static byte CLEANUP_DATABASE
          DLP function code for cleaning up a database.
static byte CLOSE_DATABASE
          DLP function code for closing a database.
static byte CREATE_DATABASE
          DLP function code for creating a database.
static byte DELETE_DATABASE
          DLP function code for deleting a database.
static byte DELETE_RECORD
          DLP function code for deleting a record to a database.
static byte DELETE_RESOURCE
          DLP function code for deleting a resource from a database.
static byte DLP_FIRST_ARG_ID
          The ID number for the first argument in any DLP packet containing arguments.
static byte DO_LOOPBACK_TEST
          DLP function code to initiate a loopback connection test.
static byte END_OF_SYNC
          DLP function code to end a synchronization operation.
static char ERR_ALREADY_EXISTS
          An error code signifying that an element being created already exists (9).
static char ERR_ARG_MISSING
          An error code signifying that an argument was missing from a request (20).
static char ERR_BAD_WRAPPER
          An error code signifying that a bad wrapper was detected (19).
static char ERR_CANCEL_SYNC
          An error code signifying that the synchronization has been cancelled by the user on the handheld end of the sync (18).
static char ERR_DATABASE_OPEN
          An error code signifying that a database is already open (7).
static char ERR_EXPANSION_CALL_NOT_IMPLEMENTED
          An error code to signify that the specified call isn't implemented.
static char ERR_EXPANSION_CARD_BAD_SECTOR
          An error code to signify that the card has a bad sector.
static char ERR_EXPANSION_CARD_NOT_PRESENT
          An error code to signify that a card is not present.
static char ERR_EXPANSION_CARD_READ_ONLY
          An error code to signify that the card is read only.
static char ERR_EXPANSION_EMPTY_ENUMERATION
          An error code to signify that the resulting enumeration is empty.
static char ERR_EXPANSION_INCOMPATIBLE_API_VERSION
          An error code to signify that an incompatible API version was encountered.
static char ERR_EXPANSION_INSUFFICIENT_POWER
          An error code to signify that there is not enough power to fulfill the requested operation.
static char ERR_EXPANSION_INVALID_SLOT_REFERENCE_NUMBER
          An error code to signify that an invalid slot reference number was passed.
static char ERR_EXPANSION_NO_SECTOR_IO
          An error code to signify that the card doesn't support read/write.
static char ERR_EXPANSION_NOT_OPEN
          An error code to signify that the slot driver library hasn't been opened.
static char ERR_EXPANSION_PROTECTED_SECTOR
          An error code to signify that the specified sector is protected.
static char ERR_EXPANSION_SLOT_DEALLOCATED
          An error code to signify that a slot reference number has been deallocated.
static char ERR_EXPANSION_STILL_OPEN
          An error code to signify that the slot driver library is still open.
static char ERR_EXPANSION_UNSUPPORTED_OPERATION
          An error code to signify that the specified operation is not supported.
static char ERR_ILLEGAL_REQUEST
          An error code signifying that an illegal request was made (2).
static char ERR_INSUFFICIENT_SPACE
          An error code signifying that there is insufficient space to process the request (16).
static char ERR_INVALID_ARG_SIZE
          An error code signifying that an invalid argument size was detected (21).
static char ERR_INVALID_PARAMETER
          An error code signifying that an invalid parameter was passed (4).
static char ERR_LIMIT_EXCEEDED
          An error code signifying that a limit has been exceeded (17).
static char ERR_MEMORY_ERROR
          An error code signifying that a memory error has occurred on the handheld (3).
static char ERR_NONE
          An error code signifying that no error has occured (0).
static char ERR_NONE_OPEN
          An error code signifying that no databases are open (6).
static char ERR_NOT_FOUND
          An error code signifying that the requested item could not be found (5).
static char ERR_NOT_SUPPORTED
          An error code signifying that a request is not supported (13).
static char ERR_READ_ONLY
          An error code signifying that a write attempt was made to a read-only piece of data (15).
static char ERR_RECORD_BUSY
          An error code signifying that the requested record is busy (12).
static char ERR_RECORD_DELETED
          An error code signifying that a requested record has been deleted (11).
static char ERR_ROM_BASED
          An error code signifying that the database to be written to is ROM based, and thus isn't writable (14).
static char ERR_SYSTEM_ERROR
          An error code signifying that the handheld encountered a system error (1).
static char ERR_TOO_MANY_OPEN_DBS
          An error code signifying that too many databases are already open (8).
static char ERR_UNABLE_TO_OPEN
          An error code signifying that the handheld was unable to open a database (10).
static char ERR_VFS_BAD_DATA
          An error code to signify that bad data was passed into a function.
static char ERR_VFS_BAD_FILE_REFERENCE
          An error code to signify that a bad file reference was passed.
static char ERR_VFS_BAD_NAME
          An error code to signify that an invalid name was passed.
static char ERR_VFS_BAD_VOLUME_REFERENCE
          An error code to signify that a bad volume reference was passed.
static char ERR_VFS_BUFFER_OVERFLOW
          An error code to reflect a buffer overflow.
static char ERR_VFS_CALL_NOT_IMPLEMENTED
          An error code to signify that the specified call is not implemented.
static char ERR_VFS_DIRECTORY_NOT_EMPTY
          An error code to signify that the speciffied directory is not empty.
static char ERR_VFS_DIRECTORY_NOT_FOUND
          An error code to signify that the specified directory was not found.
static char ERR_VFS_END_OF_FILE
          An error code to signify that the file pointer is at end-of-file (EOF).
static char ERR_VFS_FILE_ALREADY_EXISTS
          An error code to signify that a file of the specified name already exists.
static char ERR_VFS_FILE_GENERIC
          An error code to signify a generic VFS file error.
static char ERR_VFS_FILE_NOT_FOUND
          An error code to signify that the specified file was not found.
static char ERR_VFS_FILE_STILL_OPEN
          An error code to signify that a file to be deleted was still open.
static char ERR_VFS_IS_NOT_A_FILE
          An error code to signify that the data secified is a directory in a non-directory function.
static char ERR_VFS_NAME_SHORTENED
          An error code to signify that a name was automatically shortened to fit into the filesystems standard.
static char ERR_VFS_NO_FILE_SYSTEM
          An error code to signify that no filesystem supports the requested operation.
static char ERR_VFS_NOT_A_DIRECTORY
          An error code to signify that the data specified a non-directory entry in a directory function.
static char ERR_VFS_PERMISSION_DENIED
          An error code to signify that a file is read-only.
static char ERR_VFS_VOLUME_FULL
          An error code to signify that the specified volume is full.
static char ERR_VFS_VOLUME_STILL_MOUNTED
          An error code to signify that the specified volume if still mounted.
static byte EXPANSION_CARD_INFO
          DLP function code to get the expansion card info.
static byte EXPANSION_CARD_PRESENT
          DLP function code to test if an expansion card is present.
static char EXPANSION_ERROR_CLASS
          The base error class for all Expansion manager errors.
static byte EXPANSION_SLOT_ENUMERATE
          DLP function code to enumerate the expansion slots.
static byte EXPANSION_SLOT_MEDIA_TYPE
          DLP function code to check the expansion media type.
static byte FIND_DB
          DLP function code to find a database.
static byte GET_TIME
          DLP function code for reading the time on the handheld
 byte hostSocket
          The socket being used by the host system for data I/O.
static byte MOVE_CATEGORY
          DLP function code to move a category from one ID to another.
static byte OPEN_CONDUIT
          DLP function code to open a conduit.
static byte OPEN_DATABASE
          DLP function code for opening a database.
static byte PROCESS_RPC
          DLP function code to process a Remote Procedure Call request.
static byte READ_APP_BLOCK
          DLP function code for reading an open databases application block.
static byte READ_APP_PREFERENCE
          DLP function code to read an application preference.
static byte READ_DATABASE_LIST
          DLP function code for reading the database list.
static byte READ_FEATURE
          DLP function code to read a feature from the handheld.
static byte READ_NET_SYNC_INFO
          DLP function code to read the network HotSync information.
static byte READ_NEXT_MOD_REC
          DLP function code for reading the next modified record from a database.
static byte READ_NEXT_MOD_REC_IN_CAT
          DLP function code to read the next modified record in a category.
static byte READ_NEXT_REC_IN_CAT
          DLP function code to read the next category in a record.
static byte READ_OPEN_DB_INFO
          DLP function code to read the information on an open database.
static byte READ_REC_ID_LIST
          DLP function code to read a databases record ID list.
static byte READ_RECORD
          DLP function code for reading a record from a database.
static byte READ_RECORD_STREAM
          DLP function code to read a record as a stream.
static byte READ_RESOURCE
          DLP function code for reading a resource from a database.
static byte READ_RESOURCE_STREAM
          DLP function code to read a resource as a stream.
static byte READ_SORT_BLOCK
          DLP function code for reading a sort databases application block.
static byte READ_STORAGE_INFO
          DLP function code for reading the storage information.
static byte READ_SYSTEM_INFO
          DLP function code for reading the system information.
static byte READ_USER_INFO
          DLP function code for reading the user information.
static byte RESET_RECORD_INDEX
          DLP function code to reset the record index for all "get next" calls.
static byte RESET_SYNC_FLAGS
          DLP function code to reset all the synchronization flags.
static byte RESET_SYSTEM
          DLP function code to force a handheld soft reset after the synchronization.
 byte serverSocket
          The socket being used by the server (the handheld) for data I/O.
static byte SET_DB_INFO
          DLP function code to set the database information.
static byte SET_TIME
          DLP function code for setting the time on the handheld
static byte VFS_CUSTOM_CONTROL
          DLP function code to make a custom control call.
static byte VFS_DIR_CREATE
          DLP function code to create a directory.
static byte VFS_DIR_ENTRY_ENUMERATE
          DLP function code the enumerate a directory entry.
static char VFS_ERROR_CLASS
          The base error class for all VFS errors.
static byte VFS_EXPORT_DB_TO_FILE
          FLP function code to export a database to a file.
static byte VFS_FILE_CLOSE
          DLP function code to close a file.
static byte VFS_FILE_CREATE
          DLP function code to create a file.
static byte VFS_FILE_DELETE
          DLP function code to delete a file.
static byte VFS_FILE_EOF
          DLP function code to test end-of-file.
static byte VFS_FILE_GET_ATTRS
          DLP function code to get the file attributes.
static byte VFS_FILE_GET_DATES
          DLP function code to get the file dates.
static byte VFS_FILE_OPEN
          DLP function code to open a file.
static byte VFS_FILE_READ
          DLP function code to read a file.
static byte VFS_FILE_RENAME
          DLP function code to rename a file.
static byte VFS_FILE_RESIZE
          DLP function code to resize a file.
static byte VFS_FILE_SEEK
          DLP function code to seek a file.
static byte VFS_FILE_SET_ATTRS
          DLP function code to set the file attributes.
static byte VFS_FILE_SET_DATES
          DLP function code to set the file dates.
static byte VFS_FILE_SIZE
          DLP function code to get the file size.
static byte VFS_FILE_TELL
          DLP function code to get a files current offset position.
static byte VFS_FILE_WRITE
          DLP function code to write a file.
static byte VFS_GET_DEFAULT_DIR
          DLP function code to get the default directory.
static byte VFS_GET_FILE
          DLP function code to get a file.
static byte VFS_IMPORT_DB_FROM_FILE
          DLP function code to import a database from a file.
static byte VFS_PUT_FILE
          DLP function code to put a file.
static byte VFS_VOLUME_ENUMERATE
          DLP function code to enumerate volumes.
static byte VFS_VOLUME_FORMAT
          DLP function code to format a volume.
static byte VFS_VOLUME_GET_LABEL
          DLP function code to get a volumes label.
static byte VFS_VOLUME_INFO
          DLP function code to get a volumes info.
static byte VFS_VOLUME_SET_LABEL
          DLP function code to set a volumes label.
static byte VFS_VOLUME_SIZE
          DLP function code to get a volumes size.
static byte WRITE_APP_BLOCK
          DLP function code for writing an open databases application block.
static byte WRITE_APP_PREFERENCE
          DLP function code to write an application preference.
static byte WRITE_NET_SYNC_INFO
          DLP function code to write the network HotSync information.
static byte WRITE_RECORD
          DLP function code for writing a record to a database.
static byte WRITE_RECORD_STREAM
          DLP function code to write a record as a stream.
static byte WRITE_RESOURCE
          DLP function code for writing a resource from a database.
static byte WRITE_RESOURCE_STREAM
          DLP function code to write a resource as a stream.
static byte WRITE_SORT_BLOCK
          DLP function code for writing a sort databases application block.
static byte WRITE_USER_INFO
          DLP function code for writing the user information.
 
Constructor Summary
(package private) DLP_Packet(byte funcID, byte[][] args)
          Creates a new DLP Request Packet using the specified values.
(package private) DLP_Packet(byte funcID, byte[][] args, int argID)
          Creates a new DLP Request Packet using the specified values.
(package private) DLP_Packet(byte funcID, char error, byte[][] args)
          Creates a new DLP Response Packet using the specified settings.
 
Method Summary
(package private) static DLP_Packet bytes2Packet(byte[] pkt)
          Converts a byte array into a DLP packet object.
(package private)  int getArgCount()
          Returns the number of arguments in this DLP Packet.
(package private)  char getErrorCode()
          Retreives the error code associated with this packet.
(package private)  byte getFunctionID()
          Retreives the function ID for this DLP packet.
(package private)  boolean getPacketType()
          Returns a boolean representing the packet type of this DLP packet.
(package private)  byte[] packet2Bytes()
          Converts this packet to a byte array suitable for transmission.
(package private)  byte[] readArgument(int i)
          Returns the data in the specified argument.
 java.lang.String toString()
          Converts this packet into a human readable hex dump, suitable for tracing and debugging protocol issues.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ_USER_INFO

public static final byte READ_USER_INFO
DLP function code for reading the user information.

See Also:
Constant Field Values

WRITE_USER_INFO

public static final byte WRITE_USER_INFO
DLP function code for writing the user information.

See Also:
Constant Field Values

READ_SYSTEM_INFO

public static final byte READ_SYSTEM_INFO
DLP function code for reading the system information.

See Also:
Constant Field Values

GET_TIME

public static final byte GET_TIME
DLP function code for reading the time on the handheld

See Also:
Constant Field Values

SET_TIME

public static final byte SET_TIME
DLP function code for setting the time on the handheld

See Also:
Constant Field Values

READ_STORAGE_INFO

public static final byte READ_STORAGE_INFO
DLP function code for reading the storage information.

See Also:
Constant Field Values

READ_DATABASE_LIST

public static final byte READ_DATABASE_LIST
DLP function code for reading the database list.

See Also:
Constant Field Values

OPEN_DATABASE

public static final byte OPEN_DATABASE
DLP function code for opening a database.

See Also:
Constant Field Values

CREATE_DATABASE

public static final byte CREATE_DATABASE
DLP function code for creating a database.

See Also:
Constant Field Values

CLOSE_DATABASE

public static final byte CLOSE_DATABASE
DLP function code for closing a database.

See Also:
Constant Field Values

DELETE_DATABASE

public static final byte DELETE_DATABASE
DLP function code for deleting a database.

See Also:
Constant Field Values

READ_APP_BLOCK

public static final byte READ_APP_BLOCK
DLP function code for reading an open databases application block.

See Also:
Constant Field Values

WRITE_APP_BLOCK

public static final byte WRITE_APP_BLOCK
DLP function code for writing an open databases application block.

See Also:
Constant Field Values

READ_SORT_BLOCK

public static final byte READ_SORT_BLOCK
DLP function code for reading a sort databases application block.

See Also:
Constant Field Values

WRITE_SORT_BLOCK

public static final byte WRITE_SORT_BLOCK
DLP function code for writing a sort databases application block.

See Also:
Constant Field Values

READ_NEXT_MOD_REC

public static final byte READ_NEXT_MOD_REC
DLP function code for reading the next modified record from a database.

See Also:
Constant Field Values

READ_RECORD

public static final byte READ_RECORD
DLP function code for reading a record from a database.

See Also:
Constant Field Values

WRITE_RECORD

public static final byte WRITE_RECORD
DLP function code for writing a record to a database.

See Also:
Constant Field Values

DELETE_RECORD

public static final byte DELETE_RECORD
DLP function code for deleting a record to a database.

See Also:
Constant Field Values

READ_RESOURCE

public static final byte READ_RESOURCE
DLP function code for reading a resource from a database.

See Also:
Constant Field Values

WRITE_RESOURCE

public static final byte WRITE_RESOURCE
DLP function code for writing a resource from a database.

See Also:
Constant Field Values

DELETE_RESOURCE

public static final byte DELETE_RESOURCE
DLP function code for deleting a resource from a database.

See Also:
Constant Field Values

CLEANUP_DATABASE

public static final byte CLEANUP_DATABASE
DLP function code for cleaning up a database. "Cleaning up" involves removing all records that were flagged as deleted, and resetting all modified flags in the database.

See Also:
Constant Field Values

RESET_SYNC_FLAGS

public static final byte RESET_SYNC_FLAGS
DLP function code to reset all the synchronization flags.

See Also:
Constant Field Values

CALL_APPLICATION

public static final byte CALL_APPLICATION
DLP function code to call a handheld application. This method isn't implemented by the jSyncManager, as it is no longer in use after PalmOS v2.0. It is presented here for the sake of completeness.

See Also:
Constant Field Values

RESET_SYSTEM

public static final byte RESET_SYSTEM
DLP function code to force a handheld soft reset after the synchronization.

See Also:
Constant Field Values

ADD_SYNC_LOG_ENTRY

public static final byte ADD_SYNC_LOG_ENTRY
DLP function code to add an entry to the handheld sync log.

See Also:
Constant Field Values

READ_OPEN_DB_INFO

public static final byte READ_OPEN_DB_INFO
DLP function code to read the information on an open database.

See Also:
Constant Field Values

MOVE_CATEGORY

public static final byte MOVE_CATEGORY
DLP function code to move a category from one ID to another.

See Also:
Constant Field Values

PROCESS_RPC

public static final byte PROCESS_RPC
DLP function code to process a Remote Procedure Call request.

See Also:
Constant Field Values

OPEN_CONDUIT

public static final byte OPEN_CONDUIT
DLP function code to open a conduit. Calling this DLP function allows the Palm to update its display when a Conduit is initialized for synchronization.

See Also:
Constant Field Values

END_OF_SYNC

public static final byte END_OF_SYNC
DLP function code to end a synchronization operation.

See Also:
Constant Field Values

RESET_RECORD_INDEX

public static final byte RESET_RECORD_INDEX
DLP function code to reset the record index for all "get next" calls.

See Also:
Constant Field Values

READ_REC_ID_LIST

public static final byte READ_REC_ID_LIST
DLP function code to read a databases record ID list.

See Also:
Constant Field Values

READ_NEXT_REC_IN_CAT

public static final byte READ_NEXT_REC_IN_CAT
DLP function code to read the next category in a record.

See Also:
Constant Field Values

READ_NEXT_MOD_REC_IN_CAT

public static final byte READ_NEXT_MOD_REC_IN_CAT
DLP function code to read the next modified record in a category.

See Also:
Constant Field Values

READ_APP_PREFERENCE

public static final byte READ_APP_PREFERENCE
DLP function code to read an application preference.

See Also:
Constant Field Values

WRITE_APP_PREFERENCE

public static final byte WRITE_APP_PREFERENCE
DLP function code to write an application preference.

See Also:
Constant Field Values

READ_NET_SYNC_INFO

public static final byte READ_NET_SYNC_INFO
DLP function code to read the network HotSync information.

See Also:
Constant Field Values

WRITE_NET_SYNC_INFO

public static final byte WRITE_NET_SYNC_INFO
DLP function code to write the network HotSync information.

See Also:
Constant Field Values

READ_FEATURE

public static final byte READ_FEATURE
DLP function code to read a feature from the handheld.

See Also:
Constant Field Values

FIND_DB

public static final byte FIND_DB
DLP function code to find a database.

See Also:
Constant Field Values

SET_DB_INFO

public static final byte SET_DB_INFO
DLP function code to set the database information.

See Also:
Constant Field Values

DO_LOOPBACK_TEST

public static final byte DO_LOOPBACK_TEST
DLP function code to initiate a loopback connection test.

See Also:
Constant Field Values

EXPANSION_SLOT_ENUMERATE

public static final byte EXPANSION_SLOT_ENUMERATE
DLP function code to enumerate the expansion slots.

See Also:
Constant Field Values

EXPANSION_CARD_PRESENT

public static final byte EXPANSION_CARD_PRESENT
DLP function code to test if an expansion card is present.

See Also:
Constant Field Values

EXPANSION_CARD_INFO

public static final byte EXPANSION_CARD_INFO
DLP function code to get the expansion card info.

See Also:
Constant Field Values

VFS_CUSTOM_CONTROL

public static final byte VFS_CUSTOM_CONTROL
DLP function code to make a custom control call.

See Also:
Constant Field Values

VFS_GET_DEFAULT_DIR

public static final byte VFS_GET_DEFAULT_DIR
DLP function code to get the default directory.

See Also:
Constant Field Values

VFS_IMPORT_DB_FROM_FILE

public static final byte VFS_IMPORT_DB_FROM_FILE
DLP function code to import a database from a file.

See Also:
Constant Field Values

VFS_EXPORT_DB_TO_FILE

public static final byte VFS_EXPORT_DB_TO_FILE
FLP function code to export a database to a file.

See Also:
Constant Field Values

VFS_FILE_CREATE

public static final byte VFS_FILE_CREATE
DLP function code to create a file.

See Also:
Constant Field Values

VFS_FILE_OPEN

public static final byte VFS_FILE_OPEN
DLP function code to open a file.

See Also:
Constant Field Values

VFS_FILE_CLOSE

public static final byte VFS_FILE_CLOSE
DLP function code to close a file.

See Also:
Constant Field Values

VFS_FILE_WRITE

public static final byte VFS_FILE_WRITE
DLP function code to write a file.

See Also:
Constant Field Values

VFS_FILE_READ

public static final byte VFS_FILE_READ
DLP function code to read a file.

See Also:
Constant Field Values

VFS_FILE_DELETE

public static final byte VFS_FILE_DELETE
DLP function code to delete a file.

See Also:
Constant Field Values

VFS_FILE_RENAME

public static final byte VFS_FILE_RENAME
DLP function code to rename a file.

See Also:
Constant Field Values

VFS_FILE_EOF

public static final byte VFS_FILE_EOF
DLP function code to test end-of-file.

See Also:
Constant Field Values

VFS_FILE_TELL

public static final byte VFS_FILE_TELL
DLP function code to get a files current offset position.

See Also:
Constant Field Values

VFS_FILE_GET_ATTRS

public static final byte VFS_FILE_GET_ATTRS
DLP function code to get the file attributes.

See Also:
Constant Field Values

VFS_FILE_SET_ATTRS

public static final byte VFS_FILE_SET_ATTRS
DLP function code to set the file attributes.

See Also:
Constant Field Values

VFS_FILE_GET_DATES

public static final byte VFS_FILE_GET_DATES
DLP function code to get the file dates.

See Also:
Constant Field Values

VFS_FILE_SET_DATES

public static final byte VFS_FILE_SET_DATES
DLP function code to set the file dates.

See Also:
Constant Field Values

VFS_DIR_CREATE

public static final byte VFS_DIR_CREATE
DLP function code to create a directory.

See Also:
Constant Field Values

VFS_DIR_ENTRY_ENUMERATE

public static final byte VFS_DIR_ENTRY_ENUMERATE
DLP function code the enumerate a directory entry.

See Also:
Constant Field Values

VFS_GET_FILE

public static final byte VFS_GET_FILE
DLP function code to get a file.

See Also:
Constant Field Values

VFS_PUT_FILE

public static final byte VFS_PUT_FILE
DLP function code to put a file.

See Also:
Constant Field Values

VFS_VOLUME_FORMAT

public static final byte VFS_VOLUME_FORMAT
DLP function code to format a volume.

See Also:
Constant Field Values

VFS_VOLUME_ENUMERATE

public static final byte VFS_VOLUME_ENUMERATE
DLP function code to enumerate volumes.

See Also:
Constant Field Values

VFS_VOLUME_INFO

public static final byte VFS_VOLUME_INFO
DLP function code to get a volumes info.

See Also:
Constant Field Values

VFS_VOLUME_GET_LABEL

public static final byte VFS_VOLUME_GET_LABEL
DLP function code to get a volumes label.

See Also:
Constant Field Values

VFS_VOLUME_SET_LABEL

public static final byte VFS_VOLUME_SET_LABEL
DLP function code to set a volumes label.

See Also:
Constant Field Values

VFS_VOLUME_SIZE

public static final byte VFS_VOLUME_SIZE
DLP function code to get a volumes size.

See Also:
Constant Field Values

VFS_FILE_SEEK

public static final byte VFS_FILE_SEEK
DLP function code to seek a file.

See Also:
Constant Field Values

VFS_FILE_RESIZE

public static final byte VFS_FILE_RESIZE
DLP function code to resize a file.

See Also:
Constant Field Values

VFS_FILE_SIZE

public static final byte VFS_FILE_SIZE
DLP function code to get the file size.

See Also:
Constant Field Values

EXPANSION_SLOT_MEDIA_TYPE

public static final byte EXPANSION_SLOT_MEDIA_TYPE
DLP function code to check the expansion media type.

See Also:
Constant Field Values

WRITE_RESOURCE_STREAM

public static final byte WRITE_RESOURCE_STREAM
DLP function code to write a resource as a stream.

See Also:
Constant Field Values

WRITE_RECORD_STREAM

public static final byte WRITE_RECORD_STREAM
DLP function code to write a record as a stream.

See Also:
Constant Field Values

READ_RESOURCE_STREAM

public static final byte READ_RESOURCE_STREAM
DLP function code to read a resource as a stream.

See Also:
Constant Field Values

READ_RECORD_STREAM

public static final byte READ_RECORD_STREAM
DLP function code to read a record as a stream.

See Also:
Constant Field Values

ERR_NONE

public static final char ERR_NONE
An error code signifying that no error has occured (0).

See Also:
Constant Field Values

ERR_SYSTEM_ERROR

public static final char ERR_SYSTEM_ERROR
An error code signifying that the handheld encountered a system error (1).

See Also:
Constant Field Values

ERR_ILLEGAL_REQUEST

public static final char ERR_ILLEGAL_REQUEST
An error code signifying that an illegal request was made (2).

See Also:
Constant Field Values

ERR_MEMORY_ERROR

public static final char ERR_MEMORY_ERROR
An error code signifying that a memory error has occurred on the handheld (3).

See Also:
Constant Field Values

ERR_INVALID_PARAMETER

public static final char ERR_INVALID_PARAMETER
An error code signifying that an invalid parameter was passed (4).

See Also:
Constant Field Values

ERR_NOT_FOUND

public static final char ERR_NOT_FOUND
An error code signifying that the requested item could not be found (5).

See Also:
Constant Field Values

ERR_NONE_OPEN

public static final char ERR_NONE_OPEN
An error code signifying that no databases are open (6).

See Also:
Constant Field Values

ERR_DATABASE_OPEN

public static final char ERR_DATABASE_OPEN
An error code signifying that a database is already open (7).

See Also:
Constant Field Values

ERR_TOO_MANY_OPEN_DBS

public static final char ERR_TOO_MANY_OPEN_DBS
An error code signifying that too many databases are already open (8).

See Also:
Constant Field Values

ERR_ALREADY_EXISTS

public static final char ERR_ALREADY_EXISTS
An error code signifying that an element being created already exists (9).

See Also:
Constant Field Values

ERR_UNABLE_TO_OPEN

public static final char ERR_UNABLE_TO_OPEN
An error code signifying that the handheld was unable to open a database (10).

See Also:
Constant Field Values

ERR_RECORD_DELETED

public static final char ERR_RECORD_DELETED
An error code signifying that a requested record has been deleted (11).

See Also:
Constant Field Values

ERR_RECORD_BUSY

public static final char ERR_RECORD_BUSY
An error code signifying that the requested record is busy (12).

See Also:
Constant Field Values

ERR_NOT_SUPPORTED

public static final char ERR_NOT_SUPPORTED
An error code signifying that a request is not supported (13).

See Also:
Constant Field Values

ERR_ROM_BASED

public static final char ERR_ROM_BASED
An error code signifying that the database to be written to is ROM based, and thus isn't writable (14).

See Also:
Constant Field Values

ERR_READ_ONLY

public static final char ERR_READ_ONLY
An error code signifying that a write attempt was made to a read-only piece of data (15).

See Also:
Constant Field Values

ERR_INSUFFICIENT_SPACE

public static final char ERR_INSUFFICIENT_SPACE
An error code signifying that there is insufficient space to process the request (16).

See Also:
Constant Field Values

ERR_LIMIT_EXCEEDED

public static final char ERR_LIMIT_EXCEEDED
An error code signifying that a limit has been exceeded (17).

See Also:
Constant Field Values

ERR_CANCEL_SYNC

public static final char ERR_CANCEL_SYNC
An error code signifying that the synchronization has been cancelled by the user on the handheld end of the sync (18).

See Also:
Constant Field Values

ERR_BAD_WRAPPER

public static final char ERR_BAD_WRAPPER
An error code signifying that a bad wrapper was detected (19).

See Also:
Constant Field Values

ERR_ARG_MISSING

public static final char ERR_ARG_MISSING
An error code signifying that an argument was missing from a request (20).

See Also:
Constant Field Values

ERR_INVALID_ARG_SIZE

public static final char ERR_INVALID_ARG_SIZE
An error code signifying that an invalid argument size was detected (21).

See Also:
Constant Field Values

EXPANSION_ERROR_CLASS

public static final char EXPANSION_ERROR_CLASS
The base error class for all Expansion manager errors.

See Also:
Constant Field Values

ERR_EXPANSION_UNSUPPORTED_OPERATION

public static final char ERR_EXPANSION_UNSUPPORTED_OPERATION
An error code to signify that the specified operation is not supported.

See Also:
Constant Field Values

ERR_EXPANSION_INSUFFICIENT_POWER

public static final char ERR_EXPANSION_INSUFFICIENT_POWER
An error code to signify that there is not enough power to fulfill the requested operation.

See Also:
Constant Field Values

ERR_EXPANSION_CARD_NOT_PRESENT

public static final char ERR_EXPANSION_CARD_NOT_PRESENT
An error code to signify that a card is not present.

See Also:
Constant Field Values

ERR_EXPANSION_INVALID_SLOT_REFERENCE_NUMBER

public static final char ERR_EXPANSION_INVALID_SLOT_REFERENCE_NUMBER
An error code to signify that an invalid slot reference number was passed.

See Also:
Constant Field Values

ERR_EXPANSION_SLOT_DEALLOCATED

public static final char ERR_EXPANSION_SLOT_DEALLOCATED
An error code to signify that a slot reference number has been deallocated.

See Also:
Constant Field Values

ERR_EXPANSION_NO_SECTOR_IO

public static final char ERR_EXPANSION_NO_SECTOR_IO
An error code to signify that the card doesn't support read/write.

See Also:
Constant Field Values

ERR_EXPANSION_CARD_READ_ONLY

public static final char ERR_EXPANSION_CARD_READ_ONLY
An error code to signify that the card is read only.

See Also:
Constant Field Values

ERR_EXPANSION_CARD_BAD_SECTOR

public static final char ERR_EXPANSION_CARD_BAD_SECTOR
An error code to signify that the card has a bad sector.

See Also:
Constant Field Values

ERR_EXPANSION_PROTECTED_SECTOR

public static final char ERR_EXPANSION_PROTECTED_SECTOR
An error code to signify that the specified sector is protected.

See Also:
Constant Field Values

ERR_EXPANSION_NOT_OPEN

public static final char ERR_EXPANSION_NOT_OPEN
An error code to signify that the slot driver library hasn't been opened.

See Also:
Constant Field Values

ERR_EXPANSION_STILL_OPEN

public static final char ERR_EXPANSION_STILL_OPEN
An error code to signify that the slot driver library is still open.

See Also:
Constant Field Values

ERR_EXPANSION_CALL_NOT_IMPLEMENTED

public static final char ERR_EXPANSION_CALL_NOT_IMPLEMENTED
An error code to signify that the specified call isn't implemented.

See Also:
Constant Field Values

ERR_EXPANSION_EMPTY_ENUMERATION

public static final char ERR_EXPANSION_EMPTY_ENUMERATION
An error code to signify that the resulting enumeration is empty.

See Also:
Constant Field Values

ERR_EXPANSION_INCOMPATIBLE_API_VERSION

public static final char ERR_EXPANSION_INCOMPATIBLE_API_VERSION
An error code to signify that an incompatible API version was encountered.

See Also:
Constant Field Values

VFS_ERROR_CLASS

public static final char VFS_ERROR_CLASS
The base error class for all VFS errors.

See Also:
Constant Field Values

ERR_VFS_BUFFER_OVERFLOW

public static final char ERR_VFS_BUFFER_OVERFLOW
An error code to reflect a buffer overflow. The jSyncManager doesn't use this error code, as we don't accept buffers for our function inputs. This error code is here for the sake of completeness.

See Also:
Constant Field Values

ERR_VFS_FILE_GENERIC

public static final char ERR_VFS_FILE_GENERIC
An error code to signify a generic VFS file error.

See Also:
Constant Field Values

ERR_VFS_BAD_FILE_REFERENCE

public static final char ERR_VFS_BAD_FILE_REFERENCE
An error code to signify that a bad file reference was passed.

See Also:
Constant Field Values

ERR_VFS_FILE_STILL_OPEN

public static final char ERR_VFS_FILE_STILL_OPEN
An error code to signify that a file to be deleted was still open.

See Also:
Constant Field Values

ERR_VFS_PERMISSION_DENIED

public static final char ERR_VFS_PERMISSION_DENIED
An error code to signify that a file is read-only.

See Also:
Constant Field Values

ERR_VFS_FILE_ALREADY_EXISTS

public static final char ERR_VFS_FILE_ALREADY_EXISTS
An error code to signify that a file of the specified name already exists.

See Also:
Constant Field Values

ERR_VFS_END_OF_FILE

public static final char ERR_VFS_END_OF_FILE
An error code to signify that the file pointer is at end-of-file (EOF).

See Also:
Constant Field Values

ERR_VFS_FILE_NOT_FOUND

public static final char ERR_VFS_FILE_NOT_FOUND
An error code to signify that the specified file was not found.

See Also:
Constant Field Values

ERR_VFS_BAD_VOLUME_REFERENCE

public static final char ERR_VFS_BAD_VOLUME_REFERENCE
An error code to signify that a bad volume reference was passed.

See Also:
Constant Field Values

ERR_VFS_VOLUME_STILL_MOUNTED

public static final char ERR_VFS_VOLUME_STILL_MOUNTED
An error code to signify that the specified volume if still mounted. This exception is thrown by the VFS_FORMAT_VOLUME DLP function.

See Also:
Constant Field Values

ERR_VFS_NO_FILE_SYSTEM

public static final char ERR_VFS_NO_FILE_SYSTEM
An error code to signify that no filesystem supports the requested operation.

See Also:
Constant Field Values

ERR_VFS_BAD_DATA

public static final char ERR_VFS_BAD_DATA
An error code to signify that bad data was passed into a function.

See Also:
Constant Field Values

ERR_VFS_DIRECTORY_NOT_EMPTY

public static final char ERR_VFS_DIRECTORY_NOT_EMPTY
An error code to signify that the speciffied directory is not empty.

See Also:
Constant Field Values

ERR_VFS_BAD_NAME

public static final char ERR_VFS_BAD_NAME
An error code to signify that an invalid name was passed.

See Also:
Constant Field Values

ERR_VFS_VOLUME_FULL

public static final char ERR_VFS_VOLUME_FULL
An error code to signify that the specified volume is full.

See Also:
Constant Field Values

ERR_VFS_CALL_NOT_IMPLEMENTED

public static final char ERR_VFS_CALL_NOT_IMPLEMENTED
An error code to signify that the specified call is not implemented.

See Also:
Constant Field Values

ERR_VFS_NOT_A_DIRECTORY

public static final char ERR_VFS_NOT_A_DIRECTORY
An error code to signify that the data specified a non-directory entry in a directory function.

See Also:
Constant Field Values

ERR_VFS_IS_NOT_A_FILE

public static final char ERR_VFS_IS_NOT_A_FILE
An error code to signify that the data secified is a directory in a non-directory function.

See Also:
Constant Field Values

ERR_VFS_DIRECTORY_NOT_FOUND

public static final char ERR_VFS_DIRECTORY_NOT_FOUND
An error code to signify that the specified directory was not found.

See Also:
Constant Field Values

ERR_VFS_NAME_SHORTENED

public static final char ERR_VFS_NAME_SHORTENED
An error code to signify that a name was automatically shortened to fit into the filesystems standard.

See Also:
Constant Field Values

DLP_FIRST_ARG_ID

public static final byte DLP_FIRST_ARG_ID
The ID number for the first argument in any DLP packet containing arguments.

See Also:
Constant Field Values

hostSocket

public byte hostSocket
The socket being used by the host system for data I/O. This is typically set to 3, the Desktop Socket.


serverSocket

public byte serverSocket
The socket being used by the server (the handheld) for data I/O. This is typically set to 3, the Desktop Socket.

Constructor Detail

DLP_Packet

DLP_Packet(byte funcID,
           char error,
           byte[][] args)
Creates a new DLP Response Packet using the specified settings.

Parameters:
funcID - the function ID for this request packet.
error - the error code to be associated with this response packet.
args - a 2-dimensional byte array containing the arguments for this packet.

DLP_Packet

DLP_Packet(byte funcID,
           byte[][] args)
Creates a new DLP Request Packet using the specified values.

Parameters:
funcID - the function ID for this request packet.
args - a 2-dimensional byte array containing the arguments for this packet.

DLP_Packet

DLP_Packet(byte funcID,
           byte[][] args,
           int argID)
Creates a new DLP Request Packet using the specified values.

Parameters:
funcID - the function ID for this request packet.
args - a 2-dimensional byte array containing the arguments for this packet.
argID - the ID value for the first argument in the set.
Method Detail

bytes2Packet

static DLP_Packet bytes2Packet(byte[] pkt)
Converts a byte array into a DLP packet object.

Parameters:
pkt - the byte array representing the packet.
Returns:
the DLP_Packet object for the input byte array.

getArgCount

int getArgCount()
Returns the number of arguments in this DLP Packet.

Returns:
the number of arguments in this DLP Packet.

getErrorCode

char getErrorCode()
Retreives the error code associated with this packet. Only response packets have an error code. If this object represents any other packet type, it will return 0 for NO ERROR.

Returns:
the error code associated with this packet.

getFunctionID

byte getFunctionID()
Retreives the function ID for this DLP packet.

Returns:
the function ID for this DLP packet.

getPacketType

boolean getPacketType()
Returns a boolean representing the packet type of this DLP packet.

Returns:
true if this packet is a Request Packet, false otherwise.

packet2Bytes

byte[] packet2Bytes()
Converts this packet to a byte array suitable for transmission.

Returns:
a byte array representing this packet.

readArgument

byte[] readArgument(int i)
Returns the data in the specified argument.

Parameters:
i - the index of the argument to read the data from.
Returns:
the byte array containing data in the specified argument.

toString

public java.lang.String toString()
Converts this packet into a human readable hex dump, suitable for tracing and debugging protocol issues.


jSyncManager

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