1 #ifndef odnetworkaccess_h 2 #define odnetworkaccess_h 15 #include "networkmod.h" 23 class QNetworkAccessManager;
52 const
char* remotefname,
53 const
char* ftype,const
IOPar& postvars,
68 const
char* username=0,
69 const
char* password=0);
77 {
return "Use Authentication";}
79 {
return "Http Proxy Host"; }
81 {
return "Http Proxy Port"; }
83 {
return "Http Proxy User Name"; }
85 {
return "Http Proxy Password"; }
87 {
return "Http Crypt Proxy Password"; }
115 bool writeDataToFile(
const char* buffer,
int size);
116 bool writeDataToBuffer(
const char* buffer,
int size);
169 virtual bool setFromUser() = 0;
171 static void setNetworkUserQuery(NetworkUserQuery*);
172 static NetworkUserQuery* getNetworkUserQuery();
bool ping(const char *url, uiString &msg)
bool downloadFile(const char *url, const char *outpath, uiString &errmsg, TaskRunner *taskr=0)
#define mExpClass(module)
Definition: commondefs.h:160
uiString msg_
Definition: odnetworkaccess.h:162
DataBuffer * databuffer_
Definition: odnetworkaccess.h:122
BufferStringSet saveaspaths_
Definition: odnetworkaccess.h:120
const char * sKeyUseAuthentication()
Definition: odnetworkaccess.h:76
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
const char * sKeyCryptProxyPassword()
Definition: odnetworkaccess.h:86
od_int64 nrdone_
Definition: odnetworkaccess.h:160
const char * sKeyProxyHost()
Definition: odnetworkaccess.h:78
Definition: jobcommunic.h:24
Definition: odnetworkaccess.h:166
>Provides file or data upload facility
Definition: odnetworkaccess.h:135
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
QByteArray * data_
Definition: odnetworkaccess.h:156
#define mGlobal(module)
Definition: commondefs.h:163
bool downloadFiles(BufferStringSet &urls, const char *outpath, uiString &errmsg, TaskRunner *taskr=0)
#define od_int64
Definition: plftypes.h:36
const char * sKeyProxyPort()
Definition: odnetworkaccess.h:80
void setHttpProxyFromIOPar(const IOPar &)
void setHttpProxyFromSettings()
>Provides file download facility
Definition: odnetworkaccess.h:92
od_int64 totalnr_
Definition: odnetworkaccess.h:161
Definition: uistring.h:89
Set of BufferString objects.
Definition: bufstringset.h:28
bool init_
Definition: odnetworkaccess.h:152
QEventLoop * qeventloop_
Definition: odnetworkaccess.h:157
bool downloadToBuffer(const char *url, DataBuffer *db, uiString &errmsg, TaskRunner *taskr=0)
const char * sKeyProxyUserName()
Definition: odnetworkaccess.h:82
uiString msg_
Definition: odnetworkaccess.h:130
static NetworkUserQuery * inst_
Definition: odnetworkaccess.h:175
ODNetworkReply * odnr_
Definition: odnetworkaccess.h:126
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
od_ostream * osd_
Definition: odnetworkaccess.h:123
Definition: odnetworkreply.h:24
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
QEventLoop * qeventloop_
Definition: odnetworkaccess.h:125
void setHttpProxy(const char *hostname, int port, bool auth=false, const char *username=0, const char *password=0)
const char * sKeyUseProxy()
Definition: odnetworkaccess.h:75
BufferStringSet urls_
Definition: odnetworkaccess.h:119
Raw data array with memory management.
Definition: databuf.h:22
const char * sKeyProxyPassword()
Definition: odnetworkaccess.h:84
od_int64 nrdone_
Definition: odnetworkaccess.h:128
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool initneeded_
Definition: odnetworkaccess.h:118
bool uploadQuery(const char *url, const IOPar &querypars, uiString &errmsg, TaskRunner *taskr=0, uiString *returnedmessage=0)
BufferString url_
Definition: odnetworkaccess.h:153
bool getProxySettingsFromUser()
int nrfilesdownloaded_
Definition: odnetworkaccess.h:121
bool getRemoteFileSize(const char *url, od_int64 &size, uiString &errmsg)
od_int64 totalnr_
Definition: odnetworkaccess.h:129
bool uploadFile(const char *url, const char *localfname, const char *remotefname, const char *ftype, const IOPar &postvars, uiString &errmsg, TaskRunner *taskr=0, uiString *returnedmessage=0)
BufferString header_
Definition: odnetworkaccess.h:154
ODNetworkReply * odnr_
Definition: odnetworkaccess.h:158
QNetworkAccessManager & ODNA()