Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetGET.h
Go to the documentation of this file.
1
6
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
74 static InternetGET* Async(const std::string& url_);
75
96 static InternetGET* Async(const std::string& url_, const Callback& success_, const Callback& failure_);
97
103 virtual ~InternetGET();
104
112 virtual bool asynchronous() const;
113
119 virtual void run();
120
128 virtual bool running() const;
129
143 virtual std::string content() const;
144
155 virtual InternetError errorCode() const;
156
169 virtual int32_t platformErrorCode() const;
170
181 virtual std::string error() const;
182
183
184 private:
188 plat::InternetGET* __impl;
189
195 InternetGET();
196
202 InternetGET(const InternetGET&);
203
209 InternetGET& operator=(const InternetGET&);
210 };
211 }
212}
213
214#endif
215// __HDI_CORE_INTERNET_GET__
Base class for templated __Callback class.
Definition hdicoreCallback.h:68
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:955