![]() Tech Notes |
DAPI Specification - Windows Client |
The main communication method to the client will be using Dynamic Data Exchange or DDE. This is the same method that we use to interface with Netscape and Internet Explorer so it has proven track record and is very powerful. Developers will not need a library or header files to use this method. We can add functionality without breaking previously developed applications. Also, DDE is supported by multiple programming languages. Register Each developer application will need a name to identify itself to DDE. For example, Netscape uses " When a developer application runs, it must register itself to the client by sending it a WorldsApi_Register DDE message with its DDE identifier name. WorldsAway will maintain a list of applications that have registered with it. This list will have a maximum of 25 entries and will not store duplicate names. The list will be purged when WorldsAway exits. Case is also not sensitive, so " The syntax of the register command is as follows: Service:
Topic:
Item:
Data String:AppName Where AppName is the DDE name of developer application - must be null terminated Transaction Type:
Sends:(one of the following codes via a
Description:This call tells WorldsAway to start sending the application AppName all API messages. The maximum length of AppName is 50 characters. If AppName is greater than 50 characters, it will truncate the name at 50 characters. The maximum number of applications that can be registered at one time is 25. All register requests after that will be denied. Case is not sensitive for AppName. Thus, " UnregisterWhen a developer application exits, it must unregister itself from WorldsAway by sending it a The syntax of the unregister command is as follows: Service:
Topic:
Item:
Data String:AppName AppName is the DDE name of developer application - must be null terminated Transaction Type:
Sends:one of the following codes via a
Description:This call tells WorldsAway to stop sending API messages. The maximum length of AppName is 50 characters. If AppName is greater than 50 characters, it will truncate the name at 50 characters. SendOnce an application has registered, it can start sending and receiving data. To send a data stream, it must use the The syntax of the send command is as follows: Service:
Topic:
Item:
Data String:AppName<FF> AvatarName [<LF>AvatarName [<LF>AvatarName]...]<FF> DataLength<FF> Data Where:
Transaction Type:
Sends:one of the following codes via a
Note: Result codes marked by asterisk (*) are only returned if a single target avatar was specified in the Send request. If multiple avatars or the entire region are specified, result 0 will be returned, even if results codes 1, 3, 5 or 7 apply to any or all of the target avatars individually. Secondary Actions:Sends a Description:This call sends a data stream to the specified avatar or avatars, or to everyone in the region is no avatar is specified. The maximum length of AppName is 50 characters. If AppName is greater than 50 characters, it will truncate the name at 50 characters. The maximum length of AvatarName is 255 characters. If AvatarName is greater than 255 characters, it will truncate the name(s) at 255 characters. If more than one avatar name is specified in AvatarName, each name must be separated by the linefeed character which is 10 in decimal and The maximum amount of data that can be sent is decimal 4000 bytes. If DataLength is greater than 4000, it will truncate the data at 4000 bytes. The arguments in the argument string must be separated by formfeed characters which is 12 in decimal and Note that if AvatarName contains multiple avatars, result codes 1, 3, 5 and 7 will not be returned even if all the avatars meet the description of the error. Thus the command will always return 0 for multiple avatars unless errors 2, 4, 6, 10, 14, 15, 16 or 17 occur. To get codes 1, 3, 5 and 7, a developer application should send separate commands to each avatar. ACK (acknowledge)When an application makes any WorldsApi command except for the The syntax of the acknowledge message is as follows: Service:
Topic:
Item:
Data String:
Where: Result is one of the following result codes
Transaction Type:
Description:This message is sent from WorldsAway to the developer application when it receives any WorldsApi command except for the In order for an developer application to receive an ACK message, it must send the AppName parameter correctly for all commands. Otherwise, WorldsAway will not know which application to send the result codes to. ReceiveWhen a message is sent using the The syntax of the receive message is as follows: Service:
Topic:
Item:
Data String:AvatarName<FF> DataLength<FF> Data Where:
Transaction Type:
Description:This is the message that WorldsAway sends when it receives a message from a Developer applications must be set up to listen for this message and process it when it arrives. The maximum length of AvatarName is 31 characters. The maximum length DataLength is 4000 bytes. The arguments in the argument string will be separated by the formfeed character which is 12 in decimal and0x0c in hex. There will be no blanks before or after the formfeed characters unless they are part of the argument.
CommunicateThe The syntax of the communicate command is as follows: Service:
Topic:
Item:
Data String:AppName<FF> Mode<FF> AvatarName<FF> Text Where:
Transaction Type:
Sends:one of the following codes via a
Description:This call sends the specified Text as a speak or think message depending on if the client is currently in speak or think mode. The maximum length of AvatarName is 31 characters. If AvatarName is greater than 31 characters, it will truncate the name at 31 characters. The maximum length of Text is 255 characters. If Text is greater than 255 characters, it will be truncated at 255 characters.The arguments in the argument string must be separated by formfeed characters which is 12 in decimal and GetAllTextThe Note that this is the only command that uses the The syntax of the get all text command is as follows: Service:
Topic:
Item:AppName AppName is the DDE name of developer application - must be null terminated Transaction Type:XTYP_REQUEST
Returns:Text from speech window (via a Sends:one of the following codes via a
Description:This call retrieves the entire contents of the speech window. The return text will be null terminated so a string length function such as |