AV library AvExit()
Programming guideline of WinDom

AvInit()

NAME

AvInit - Initialization of the AV protocol.

PROTOTYPAGE

int AvInit( char *name, int status, long idle)

PARAMETERS

name:
name of client (with an appl_find() format),

status:
actions supported by client : a bit field of values listed in the AV client states table,

idle:
time idle of the server,

return:
AES id of the AV server or error code:

-1
server not found,

-2
server doesn't not supporte AV protocol.

DESCRIPTION

This function initialize the AV session between the client and the AV server and waits for the answer of the server. Use the AvStatus() function to know the actions supported by the server. The AV server is identifiate by reading the environ variable AVSERVER. If this variable is not defined, AvInit() tries the following process: 'AVSERVER', 'THING', 'GEMINI' then the desktop application.

AvInit() declares to the server the actions supported by the client (our application). The AV client states table gives the diferents values possible. Among these values, the A_QUOTE value is very importante. It means that the client supported the quoted filename : when a filename containt a space character, the complete string is surronded by a quote character. For example, the string "The World" is quoted: "'The World'". Use the AvStrfmt() function to quoted or unquoted the strings.

VARIABLES

The app.avid containts the AV server AES id.

SEE ALSO]
AvExit(), AvStrfmt(), AvStatus(), AvServer().