17#ifndef MS_HTTP_CLIENT_SEARCH_HPP
18#define MS_HTTP_CLIENT_SEARCH_HPP
23namespace matrix_science
31 class ms_http_client_session;
59 SS_SEARCH_CONTROL_ERROR
118 std::string
sessionId()
const {
return getSessionID(); }
121 std::string getSessionID()
const;
124 std::string getSearchTaskID()
const;
132 std::string searchTaskId()
const {
return getSearchTaskID(); }
135 bool getStatus(SearchStatusCode & returnCode,
int & statusValue);
139 bool getStatus(
int & returnCodeAsInt,
int & statusValue);
142 bool getResultsFileName(std::string & returnFileName);
145 bool getStage(std::string & stage,
int & step);
147 bool getStatus(
int & OUTPUT,
int & OUTPUT);
148 bool getResultsFileName(std::string & OUTPUT);
149 bool getStage(std::string & OUTPUT,
int & OUTPUT);
159 bool getResultsFilename(std::string & returnFilename) {
return getResultsFileName(returnFilename); }
162 bool downloadResultsFile(std::string filename, ms_http_helper_progress & progress, DownloadOption options = DO_WITH_IONS);
165 bool downloadResultsFileMSR(std::string filename, ms_http_helper_progress & progress, DownloadOption options = DO_WITH_IONS);
168 bool downloadDaemonResultsFile(std::string filename, ms_http_helper_progress & progress);
171 bool downloadPercolatorFile(std::string filename, ms_http_helper_progress & progress);
174 bool downloadXmlResultsFile(std::string filename, ms_http_helper_progress & progress,
int reportTop = RT_auto);
177 bool uploadDistillerXmlResultsFile(std::string filename, UploadResponseCode & responseCode, std::string & responseText);
179 bool uploadDistillerXmlResultsFile(std::string filename, UploadResponseCode & OUTPUT, std::string & OUTPUT);
183 ms_http_client_search(ms_http_client_session & session, std::string searchTaskId,
const std::string & actionString);
185 ms_http_client_session * session_;
186 std::string searchTaskId_;
187 std::string actionString_;
188 ms_http_helper_handles postRequestHandles_;
190 friend class ms_http_client_session;
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
Used for submitting searches to a Mascot server and retrieving search results using HTTP(S).
Definition: ms_http_client_search.hpp:44
ReportTopSpecialValues
Definitions for special 'report top' values when requesting results in XML format.
Definition: ms_http_client_search.hpp:93
UploadResponseCode
Definitions for the various responses possible when uploading data to Mascot.
Definition: ms_http_client_search.hpp:67
@ UR_SUCCESS
The upload completed successfully.
Definition: ms_http_client_search.hpp:68
@ UR_FILE_ALREADY_EXISTS
The upload failed because the file already exists.
Definition: ms_http_client_search.hpp:73
@ UR_INVALID_TASKID
The upload failed due to not having a task identifier.
Definition: ms_http_client_search.hpp:70
@ UR_NO_RESULT_FILE
The upload failed due to the result file not existing.
Definition: ms_http_client_search.hpp:72
@ UR_NO_RESULT_FILENAME
The upload failed due to not having a result file name.
Definition: ms_http_client_search.hpp:71
@ UR_ACCESS_DENIED
The upload was not permitted by Mascot Security.
Definition: ms_http_client_search.hpp:69
std::string sessionId() const
Get the associated session ID.
Definition: ms_http_client_search.hpp:118
SearchStatusCode
Definitions for the various states possible when querying about a running Mascot search.
Definition: ms_http_client_search.hpp:52
@ SS_QUEUED
The search has been submitted, but it has been queued by the server.
Definition: ms_http_client_search.hpp:55
@ SS_UNKNOWN
The search task ID was not recognised as a recent Mascot task.
Definition: ms_http_client_search.hpp:53
@ SS_COMPLETE
The search has completed.
Definition: ms_http_client_search.hpp:57
@ SS_ERROR
An error occurred when running the search. The Mascot error number is available from the getStatus ca...
Definition: ms_http_client_search.hpp:58
@ SS_ASSIGNED
The search task has been assigned but no search has been submitted.
Definition: ms_http_client_search.hpp:54
@ SS_RUNNING
The search has started. The approximate percentage that has been completed is available.
Definition: ms_http_client_search.hpp:56
DownloadOption
Definitions for downloading results.
Definition: ms_http_client_search.hpp:82
This gives access to a Mascot session so searches may be submitted.
Definition: ms_http_client_session.hpp:48