1 /*sfdb_freesound_mootcher.h****************************************************************************
3 Adapted for Ardour by Ben Loftis, March 2008
5 Mootcher Online Access to thefreesoundproject website
6 http://freesound.iua.upf.edu/
9 mail for questions/remarks: mootcher@twistedlemon.nl
10 or go to the freesound website forum
12 *****************************************************************************/
24 #include "curl/curl.h"
28 #define ___VERSION___ 1.3
30 //--- struct to store XML file
36 //--- for download process viewing
45 Mootcher(const char *saveLocation
);
48 int doLogin(std::string login
, std::string password
);
49 std::string
getFile(std::string ID
);
50 std::string
searchText(std::string word
);
57 const char* changeWorkingDir(const char *saveLocation
);
59 std::string
getXmlFile(std::string ID
, int &length
);
60 void GetXml(std::string ID
, struct MemoryStruct
&xml_page
);
61 std::string
changeExtension(std::string filename
);
63 void toLog(std::string input
);
65 void setcUrlOptions();
67 static size_t WriteMemoryCallback(void *ptr
, size_t size
, size_t nmemb
, void *data
);
68 static int progress_callback(void *clientp
, double dltotal
, double dlnow
, double ultotal
, double ulnow
);
71 char errorBuffer
[CURL_ERROR_SIZE
]; // storage for cUrl error message
73 int connection
; // is 0 if no connection
74 char message
[128]; // storage for messages that are send to the logfile
77 std::string xmlLocation
;