Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
8 
9 #include <string>
10 #include <stdio.h>
11 #include <cstring>
12 #include <string>
13 #include <sstream>
14 #include <vector>
15 
16 #include "curl/curl.h"
17 #include "ardour/session_handle.h"
18 #include "ardour/export_handler.h"
19 #include "pbd/signals.h"
20 
21 //--- struct to store XML file
22 struct MemoryStruct {
23  char *memory;
24  size_t size;
25 };
26 
27 
29 {
30 public:
33 
34  std::string Get_Auth_Token(std::string username, std::string password);
35  std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller);
36  static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
37 
38 
39 private:
40 
42 
43  CURL *curl_handle;
44  CURLM *multi_handle;
45  char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
46 
47  std::string title;
49 
50 };
51 
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]