|
| ODDLSite (const char *the_host, float timeout_sec=0) |
|
| ~ODDLSite () |
|
bool | isOK () const |
|
const char * | host () const |
|
const char * | subDir () const |
|
void | setSubDir (const char *s) |
|
float | timeout () const |
|
void | setTimeOut (float, bool storeinsettings) |
|
uiString | errMsg () const |
|
bool | getFile (const char *fnm, const char *outfnm=0, TaskRunner *tr=0, const char *nicename=0) |
| Without a file name, get the DataBuffer. More...
|
|
DataBuffer * | obtainResultBuf () |
| the returned databuf becomes yours More...
|
|
bool | getFiles (const BufferStringSet &fnms, const char *outputdir, TaskRunner &) |
|
od_int64 | getFileSize (const char *relfilenm) |
|
bool | haveErrMsg () const |
| if haveErrMsg(), then failure - otherwise user stop More...
|
|
BufferString | fullURL (const char *) const |
|
| CallBacker () |
|
| CallBacker (const CallBacker &) |
|
virtual | ~CallBacker () |
|
bool | attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false) |
|
bool | attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) |
|
void | detachCB (NotifierAccess &, const CallBack &) |
|
void | detachCB (NotifierAccess *notif, const CallBack &cb) |
|
bool | isNotifierAttached (NotifierAccess *) const |
| Only for debugging purposes, don't use. More...
|
|
Access to an http site to get the contents of files.
The URL defaults to opendtect.org. The subdir is going to be the current work directory on the site. You can change it at any time (unlike the host).
There are two main services: get one file, or get a bunch of files. To get one file, you request it. Set some kind of status bar, because it won't return until either an error occurs (e.g. a timeout is exceeded), or the file is there. This is meant for small files and minimum hassle.
If you need bigger files and/or you want users to be able to interrupt, then you need the version with the TaskRunner.
You can ask for a plain file on a local disk; pass 'DIR=the_file_name'. Then, no HTTP connection is made. If the site needs secure access, pass the full URL (i.e. https://xx.yy). At the time I'm making this comment, it is not implemented. For normal HTTP access, you can pass the host name or http://hostname .