Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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 namespace hdi
13 {
14  namespace plugin
15  {
16  class InternetGET;
17  }
18 
19  namespace core
20  {
21  class Callback;
22 
27  {
28  public:
42  const std::string& url_,
43  const Callback& success_,
44  const Callback& failure_
45  );
46 
65  static InternetGET* Async(
66  const std::string& url_,
67  const Callback& success_,
68  const Callback& failure_
69  );
70 
76  virtual ~InternetGET();
77 
85  virtual bool asynchronous() const;
86 
92  virtual void run();
93 
101  virtual bool running() const;
102 
116  virtual std::string content() const;
117 
128  virtual std::string error() const;
129 
130 
131  private:
135  plugin::InternetGET* __impl;
136 
142  InternetGET();
143 
149  InternetGET(const InternetGET&);
150 
156  InternetGET& operator=(const InternetGET&);
157  };
158  }
159 }
160 
161 #endif
162 // __HDI_CORE_INTERNET_GET__
virtual bool running() const
Gets whether the GET request is currently running.
Allows for the creation of simple HTTP(S) GET clients to acquire data from a given URL...
Definition: hdicoreInternetGET.h:26
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread) ...
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
virtual void run()
Starts the GET request.
virtual std::string error() const
Gets an error description if the GET request failed.
Definition: hdicoreaiArray.h:12
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 std::string content() const
Gets the content acquired via the GET request.
virtual ~InternetGET()
Destructs an InternetGET object.