~mandel/ubuntu-download-manager/expose-logger

« back to all changes in this revision

Viewing changes to src/downloads/test-daemon/testing_file_download.cpp

  • Committer: Manuel de la Peña
  • Date: 2014-06-18 11:10:18 UTC
  • Revision ID: manuel.delapena@canonical.com-20140618111018-t5po3fkp254dakg3
Added support to set the headers of a single file download.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
}
131
131
 
132
132
void
 
133
TestingFileDownload::setHeaders(StringMap headers) {
 
134
    if (calledFromDBus() && _returnErrors) {
 
135
        sendErrorReply(QDBusError::InvalidMember,
 
136
        "setThrottle");
 
137
    }
 
138
    _down->setHeaders(headers);
 
139
}
 
140
 
 
141
StringMap
 
142
TestingFileDownload::headers() {
 
143
    if (calledFromDBus() && _returnErrors) {
 
144
        sendErrorReply(QDBusError::InvalidMember,
 
145
        "setThrottle");
 
146
    }
 
147
    return _down->headers();
 
148
}
 
149
 
 
150
void
133
151
TestingFileDownload::allowGSMDownload(bool allowed) {
134
152
    if (calledFromDBus() && _returnErrors) {
135
153
        sendErrorReply(QDBusError::InvalidMember,