17#ifndef MS_HTTP_CLIENT_SESSION_HPP
18#define MS_HTTP_CLIENT_SESSION_HPP
24namespace matrix_science
32 class ms_http_client_search;
62 SHOW_SEQUENCE = 0x0008,
63 SHOW_REFERENCE = 0x0010,
86 std::string getSessionID()
const;
87 std::string sessionId()
const {
return getSessionID(); }
90 bool getIsPermitted(ms_security_tasks::TASKID taskType,
bool & returnIsPermitted);
92 bool getIsPermitted(ms_security_tasks::TASKID taskType,
bool & OUTPUT);
98 ms_http_client_search & returnTask,
99 const std::string & httpHeader,
100 const std::string & prologue,
101 const std::string & filename,
102 const std::string & epilogue,
103 ms_http_helper_progress & progress,
107 ms_http_client_search & returnTask,
108 const std::wstring & httpHeader,
109 const std::wstring & prologue,
110 const std::wstring & filename,
111 const std::wstring & epilogue,
112 ms_http_helper_progress & progress,
113 bool batch =
false) {
114 return submitSearchWide(returnTask, httpHeader, prologue, filename, epilogue, progress, batch);
119 bool getSequenceFile(
120 const std::string & database,
121 const std::vector<std::string> & accessionNames,
122 const std::vector<int> & accessionFrames,
123 const std::string & filename,
124 const SequenceShowOptions options = SHOW_ALL
131 bool getIsXmlUploadedList(
const std::vector<std::string> & taskIds, std::vector<int> & xmlUploaded);
136 enum SessionSecurityType {
144 ms_http_client_session(
145 ms_http_helper connection,
146 std::string sessionId,
147 SessionSecurityType security,
148 const std::string & username =
"",
149 const std::string & password =
"");
153 ms_http_client_search & returnTask);
156 bool httpGetString(
const std::string & action, std::string & result);
157 bool httpGetResponseUsingSessionId(
const std::string & action, ms_http_helper_response & response);
158 bool httpGetFileUsingSessionId(
159 const std::string & action,
160 const std::string & filename,
161 ms_http_helper_progress & progress,
162 ms_http_helper::FileMode fileMode = ms_http_helper::FM_binary);
163 bool httpPostFileAppendingSessionId(
164 const std::string & action,
165 const std::string & httpHeader,
166 const std::string & prologue,
167 const std::string & filename,
168 const std::string & epilogue,
169 ms_http_helper_handles & handles,
170 ms_http_helper_progress & progress);
173 bool submitSearchWide(
174 ms_http_client_search & returnTask,
175 const std::wstring & httpHeader,
176 const std::wstring & prologue,
177 const std::wstring & filename,
178 const std::wstring & epilogue,
179 ms_http_helper_progress & progress,
183 ms_http_helper connection_;
184 std::string sessionId_;
186 SessionSecurityType security_;
187 std::string username_;
188 std::string password_;
192 friend class ms_http_client;
193 friend class ms_http_client_search;
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
This gives access to a Mascot session so searches may be submitted.
Definition: ms_http_client_session.hpp:48
SequenceShowOptions
Information to include in a request for sequence data.
Definition: ms_http_client_session.hpp:58
The class provides HTTP, FTP and FILE protocol access to a server.
Definition: ms_http_helper.hpp:57