|
| ODDLSite (const char *the_host, float timeout_sec=0) |
|
| ~ODDLSite () |
|
uiString | errMsg () const |
|
BufferString | fullURL (const char *) 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...
|
|
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...
|
|
const char * | host () const |
|
bool | isOK () const |
|
DataBuffer * | obtainResultBuf () |
| the returned databuf becomes yours More...
|
|
void | setSubDir (const char *s) |
|
void | setTimeOut (float, bool storeinsettings) |
|
const char * | subDir () const |
|
float | timeout () const |
|
| CallBacker () |
|
| CallBacker (const CallBacker &) |
|
virtual | ~CallBacker () |
|
bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
|
bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
|
void | detachAllNotifiers () const |
| Call from the destructor of your inherited object. More...
|
|
void | detachCB (const NotifierAccess &, const CallBack &) const |
|
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
|
virtual bool | isCapsule () const |
|
bool | isNotifierAttached (const NotifierAccess *) const |
| Only for debugging purposes, don't use. More...
|
|
void | stopReceivingNotifications () const |
|
virtual CallBacker * | trueCaller () |
|
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 .
<>