Defines | |
#define | mt_AvStrfmt(a, b, c) AvStrfmt(b,c) |
see AvStrfmt() | |
Functions | |
int | mt_AvInit (APPvar *app, char *name, int status, long idle) |
Initialize the AV protocol. | |
void | mt_AvExit (APPvar *app) |
close an AV session opened with AvInit() | |
INT16 * | mt_AvStatus (APPvar *app) |
returns features supported by AV server. | |
char * | mt_AvServer (APPvar *app) |
returns the name of the AV server | |
int | mt_AvWaitfor (APPvar *app, int, INT16 *, long) |
Wait for a given message. | |
char * | AvStrfmt (int mode, char *src) |
Quote or unquote filenames (utility for VA-protocol, Drag 'n drop, . |
|
see AvStrfmt()
|
|
Quote or unquote filenames (utility for VA-protocol, Drag 'n drop, . ..)
QUOTING: if "src" contains at least one space character " ", quotes will be add at the begin and at the end of the string. ex: [filename\0] --> [filename\0] (no changed) ex: [filename with spaces\0] --> ['filename with spaces'\0] UNQUOTING: the returned string will contain the filenames without quotes. The NULL character is used to separate filenames. 2 successives NULL-char are used to end the list ex: [filename1 'file name 2' filename3] --> [filename1\0file name 2\0filename3\0\0] |
|
close an AV session opened with AvInit()
|
|
Initialize the AV protocol.
To identifiate the AV server, mt_AvInit() uses the environ variable AVSERVER. If this variable is not defined, AvInit() tries the following processes: 'AVSERVER', 'THING', 'GEMINI' then the desktop application. mt_AvInit() declares to the server the actions supported by the client (our application). The AV client states table displayed below gives the differents possible value. Among these values, the A_QUOTE value is very important. It means that the client supportes quoted filename : when a filename contains a space character, the complete string is surrounded by a quote character. For example, the string "The World" is quoted: "'The World'". Use mt_AvStrfmt() function to quote or unquote the strings. On return, mt_AvInit() returns the AV server AES pid (or negative error) and app->avid contains this pid.
|
|
returns the name of the AV server
|
|
returns features supported by AV server.
|
|
Wait for a given message.
Importante remark : AvWaitfor() does not make use of EvntWindom(), just evnt_multi(). Example : // ask to server to launch an application and wait the answer int exec_prog( char *prg, char *cmd) { ApplWrite( app.avid, AV_STARTPROG, prg, cmd, 0); return AvWaitfor( VA_PROGSTARTED, evnt.buf, 1000); } |