You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
953B

  1. #ifndef __testcurl__
  2. #define __testcurl__
  3. /**
  4. @file
  5. Subclass of testcurlGUI, which is generated by wxFormBuilder.
  6. */
  7. #include "testcurlGUI.h"
  8. #include <wx/msgdlg.h>
  9. #include <curl/curl.h>
  10. #include <string.h>
  11. #include <stdlib.h>
  12. #ifdef __WXGTK__
  13. #define slash "/"
  14. #define _C(string) (const char*) string.c_str()
  15. #elif defined( __WXMSW__ )
  16. #define slash "\\"
  17. #define _C(string) (const char*) string.c_str()
  18. #endif
  19. typedef struct _CurlData {
  20. char *content;
  21. size_t size;
  22. } CurlData;
  23. //// end generated include
  24. /** Implementing testcurlGUI */
  25. class testcurl : public testcurlGUI
  26. {
  27. protected:
  28. // Handlers for testcurlGUI events.
  29. void OnGo( wxCommandEvent& event );
  30. CURL* curlhandle;
  31. CurlData curldata;
  32. public:
  33. /** Constructor */
  34. testcurl( wxWindow* parent );
  35. ~testcurl();
  36. //// end generated class members
  37. };
  38. static size_t WriteDataCallback(void *contents, size_t size, size_t nmemb, void *userp);
  39. #endif // __testcurl__