NOTE:  When used for IR communication, the exchange manager uses the OBEX IrDA protocol. The only level of OBEX supported currently is for the Put operation. The Palm III can act as both a client and a server.
ExgRegisterData
) and specifies what data types and file extensions it can accept.
ExgSocketType
data type. This exchange socket structure defines information about the connection and the type of data to be exchanged. When you are sending data, you must supply this structure with the appropriate information filled in. When you are receiving, this structure gives you information about the connection and the incoming data. (Note that the use of the term "socket" in the exchange manager API is not related to the term "socket" as used in sockets communication programming.)
NOTE:  The current implementation of the IR library does not send data type information, but it may do so in the future. It is recommended that you write information for the data type field of the socket, but do not expect to receive type information. Instead, use a filename including the extension to identify content. When registering, register for a file extension.
sysAppLaunchCmdExgAskUser
, when it has determined that incoming data is destined for a particular application (based on which application has registered to receive data of that type). This launch code lets the application tell the exchange manager whether or not to display a dialog asking the user if they want to accept the data. If the application chooses not to handle this launch command, the default course of action is that the exchange manager displays a dialog asking the user if they want to accept the incoming data. In most cases, applications won't need to handle this launch code, since the default action is the preferred alternative.
ExgDoDialog
directly. See that function's description in the Palm OS SDK Reference for more information.
result
field in the parameter block to the appropriate value. If it wants to allow the exchange manager to display a dialog, it should leave the result
field set to exgAskDialog
(the default value). To disable display of the dialog and to automatically accept the incoming data (as if the user had pressed OK in the dialog), set the result
field to exgAskOk
. To disable display of the dialog and to automatically reject the incoming data (as if the user had pressed Cancel in the dialog), set the result
field to exgAskCancel
. In the later case, the data is discarded and no further action is taken by the exchange manager.
exgAskOk
, or the dialog is displayed and the user presses the OK button, then the exchange manager sends the application the next launch code, sysAppLaunchCmdExgReceiveData
, so that it can actually receive the data. This launch code notifies the application that it should receive the data.
ExgAccept
, ExgReceive, and ExgDisconnect to receive the data and store it or do whatever it needs to with the data.
ExgSocketPtr
data type. It is a pointer to the ExgSocketType
structure corresponding to the exchange manager connection via which the data is arriving. You will need to pass this pointer to the ExgAccept
function to begin receiving the data. Note that in the socket structure, the length
field may not be accurate, so in your receive loop you should be flexible in handling more or less data than length
specifies.
PilotMain
routine, you must set up the goToCreator
and goToParams
fields in the socket structure. Set in the goToCreator
field the creator ID of the application that should be launched to view the received data (normally the same application that received the data). If no application should be launched, then set this to NULL. Set in the goToParams
structure information that identifies the record to go to when the application is launched. It is recommended that you use a unique ID to identify the record, rather than the record index, since indexes might change. You can put unique ID information into the goToParams.matchCustom
field.
goToCreator
field of the socket structure with the sysAppLaunchCmdGoto
launch code. This allows the user to view the received item.
http://www.IrDA.org.
IrOpen
) currently limits bandwidth to 57600 bps by default, but you can specify a connection speed of up to 115200 bps if desired.
SysLibFind
, as in this example:
err = SysLibFind(irLibName, &refNum);
refNum
parameter. This parameter is passed to most of the other functions in the IR library.
Exchange Manager Functions | |
---|---|
ExgAccept | ExgPut |
ExgDBRead | ExgReceive |
ExgDBWrite | ExgRegisterData |
ExgDisconnect | ExgSend |
ExgDoDialog |
  |   |