otsdaq_utilities  v2_05_02_indev
ECLConnection.h
1 #ifndef __ECLCONNECTION_HPP_
2 #define __ECLCONNECTION_HPP_
3 
4 #include <curl/curl.h>
5 #include <iostream>
6 #include <string>
7 
8 #include <otsdaq-utilities/ECLWriter/ECL.hxx>
9 
18 {
19  public:
20  ECLConnection(std::string user, std::string password, std::string url);
21  ~ECLConnection(){};
22 
23  bool Post(ECLEntry_t& e);
24  bool Get(std::string, std::string&);
25  bool Search(std::string);
26 
27  static std::string EscapeECLString(std::string input = "");
28 
29  static Attachment_t MakeAttachmentImage(std::string const& imageFileName);
30 
31  static Attachment_t MakeAttachmentFile(std::string const& fileName);
32 
33  private:
34  std::string MakeSaltString();
35  static size_t WriteMemoryCallback(char*, size_t, size_t, std::string*);
36 
37  std::string _user;
38  std::string _pwd;
39  std::string _url;
40 };
41 
42 #endif
Definition: ECL.hxx:547