|
GLG Toolkit, C / C++ API Library
Version 4.6
|
This callback may be used to provide custom handling of fetching data from URLs. More...
This callback may be used to provide custom handling of fetching data from URLs.
Typedefs | |
| typedef char *(* | GlgGetURLCallback) (char *request, void *reserved) |
| A custom callback used to fetch data from URLs, installed via GlgSetGetURLCallback. More... | |
| typedef char*(* GlgGetURLCallback) (char *request, void *reserved) |
A custom callback used to fetch data from URLs, installed via GlgSetGetURLCallback.
URLs may be used to load drawing files from remote servers, as well as to use map server installed at a remote web server.
| request | URL string to fetch data from, or NULL if the callback is invoked to delete the last fetched temporary file. |
| reserved | This parameter is reserved for future implementations. |
A custom callback implementation on Linux should delete a temporary file containing the previously fetched URL when it is invoked to fetch the next URL. When GlgTerminate is invoked, the callback will be invoked with NULL request to clean up the last used temporary file.
A default GlgGetURLCB callback is provided as a part of the GLG API library and is activated by default for the GLG editors on all platforms, as well as for the GLG C API runtime on Windows. GlgSetGetURLCallback may be used activate the default callback for the GLG C API runtime on Linux:
GlgSetGetURLCallback( GlgGetURLCB );
To use the default callback on Linux, the GLG_WGET_PATH environment variable should be set and contain the path to the wget command that will be used for fetching URLs.