Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetPOST.h
Go to the documentation of this file.
1
6
7#ifndef __HDI_CORE_INTERNET_POST__
8#define __HDI_CORE_INTERNET_POST__
9
10#include <string>
11
12#include "hdicoreTypes.h"
13
14namespace hdi
15{
16 namespace plat
17 {
18 class InternetPOST;
19 }
20
21 namespace core
22 {
23 class Callback;
24 class DictionaryPref;
25
30 {
31 public:
46 InternetPOST(const std::string& url_, const DictionaryPref& data_);
47
61 const std::string& url_,
62 const DictionaryPref& data_,
63 const Callback& success_,
64 const Callback& failure_
65 );
66
89 static InternetPOST* Async(const std::string& url_, const DictionaryPref& data_);
90
116 const std::string& url_,
117 const DictionaryPref& data_,
118 const Callback& success_,
119 const Callback& failure_
120 );
121
127 virtual ~InternetPOST();
128
136 virtual bool asynchronous() const;
137
143 virtual void run();
144
152 virtual bool running() const;
153
167 virtual std::string content() const;
168
179 virtual InternetError errorCode() const;
180
193 virtual int32_t platformErrorCode() const;
194
205 virtual std::string error() const;
206
207
208 private:
212 plat::InternetPOST* __impl;
213
219 InternetPOST();
220
227
233 InternetPOST& operator=(const InternetPOST&);
234 };
235 }
236}
237
238#endif
239// __HDI_CORE_INTERNET_POST__
Base class for templated __Callback class.
Definition hdicoreCallback.h:68
Acts as a dictionary-style container to store any other persistent data types, including arrays and d...
Definition hdicoreDictionaryPref.h:60
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread)
virtual void run()
Starts the POST request.
virtual InternetError errorCode() const
Gets a translated platform error code, if possible, that was received by the implementation.
virtual bool running() const
Gets whether the POST request is currently running.
static InternetPOST * Async(const std::string &url_, const DictionaryPref &data_, const Callback &success_, const Callback &failure_)
Creates an asynchronous (non-blocking) InternetPOST object to perform HTTP(S) POST requests.
static InternetPOST * Async(const std::string &url_, const DictionaryPref &data_)
Creates an asynchronous (non-blocking) InternetPOST object to perform HTTP(S) POST requests.
virtual int32_t platformErrorCode() const
Gets the raw platform error code that was received by the implementation.
virtual std::string error() const
Gets an error description if the POST request failed.
InternetPOST(const std::string &url_, const DictionaryPref &data_, const Callback &success_, const Callback &failure_)
Creates a synchronous (blocking) InternetPOST object to perform HTTP(S) POST requests.
InternetPOST(const std::string &url_, const DictionaryPref &data_)
Creates a synchronous (blocking) InternetPOST object to perform HTTP(S) POST requests,...
virtual ~InternetPOST()
Destructs an InternetPOST object.
virtual std::string content() const
Gets the content acquired via the POST request.
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