Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetGET.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_INTERNET_GET__
8#define __HDI_CORE_INTERNET_GET__
9
10#include <string>
11
12#include "hdicoreTypes.h"
13
14namespace hdi
15{
16 namespace plat
17 {
18 class InternetGET;
19 }
20
21 namespace core
22 {
23 class Callback;
24
29 {
30 public:
42 InternetGET(const std::string& url_);
43
53 InternetGET(const std::string& url_, const Callback& success_, const Callback& failure_);
54
73 static InternetGET* Async(const std::string& url_);
74
94 static InternetGET* Async(const std::string& url_, const Callback& success_, const Callback& failure_);
95
101 virtual ~InternetGET();
102
110 virtual bool asynchronous() const;
111
117 virtual void run();
118
126 virtual bool running() const;
127
141 virtual std::string content() const;
142
153 virtual InternetError errorCode() const;
154
167 virtual int32_t platformErrorCode() const;
168
179 virtual std::string error() const;
180
181
182 private:
186 plat::InternetGET* __impl;
187
193 InternetGET();
194
200 InternetGET(const InternetGET&);
201
207 InternetGET& operator=(const InternetGET&);
208 };
209 }
210}
211
212#endif
213// __HDI_CORE_INTERNET_GET__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Allows for the creation of simple HTTP(S) GET clients to acquire data from a given URL.
Definition: hdicoreInternetGET.h:29
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread)
virtual std::string error() const
Gets an error description if the GET request failed.
static InternetGET * Async(const std::string &url_, const Callback &success_, const Callback &failure_)
Creates an asynchronous (non-blocking) InternetGET object to perform HTTP(S) GET requests.
virtual int32_t platformErrorCode() const
Gets the raw platform error code that was received by the implementation.
virtual void run()
Starts the GET request.
virtual bool running() const
Gets whether the GET request is currently running.
virtual std::string content() const
Gets the content acquired via the GET request.
virtual ~InternetGET()
Destructs an InternetGET object.
virtual InternetError errorCode() const
Gets a translated platform error code, if possible, that was received by the implementation.
static InternetGET * Async(const std::string &url_)
Creates an asynchronous (non-blocking) InternetGET object to perform HTTP(S) GET requests,...
InternetGET(const std::string &url_, const Callback &success_, const Callback &failure_)
Creates a synchronous (blocking) InternetGET object to perform HTTP(S) GET requests.
InternetGET(const std::string &url_)
Creates a synchronous (blocking) InternetGET object to perform HTTP(S) GET requests,...
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
InternetError
Describes common HTTP error codes between platforms, for convenience.
Definition: hdicoreTypes.h:922