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