Ardour  8.12
soundcloud_upload.h
Go to the documentation of this file.
1 /* soundcloud_upload.h ******************************************************
2 
3  Adapted for Ardour by Ben Loftis, March 2012
4 
5 *****************************************************************************/
6 
7 #ifndef __ardour_soundcloud_upload_h__
8 #define __ardour_soundcloud_upload_h__
9 
10 #include <string>
11 #include <stdio.h>
12 #include <cstring>
13 #include <string>
14 #include <sstream>
15 #include <vector>
16 
17 #include "curl/curl.h"
18 #include "ardour/session_handle.h"
19 #include "ardour/export_handler.h"
20 #include "pbd/signals.h"
21 
22 //--- struct to store XML file
23 struct MemoryStruct {
24  char *memory;
25  size_t size;
26 };
27 
28 
30 {
31 public:
34 
35  std::string Get_Auth_Token(std::string username, std::string password);
36  std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller);
37  static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
38 
39 
40 private:
41 
43 
44  CURL *curl_handle;
45  CURLM *multi_handle;
46  char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
47 
48  std::string title;
50 
51 };
52 
53 #endif /* __ardour_soundcloud_upload_h__ */
std::string Upload(std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller)
ARDOUR::ExportHandler * caller
static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow)
std::string Get_Auth_Token(std::string username, std::string password)
char errorBuffer[CURL_ERROR_SIZE]