Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetPOST.h
Go to the documentation of this file.
1
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
88 static InternetPOST* Async(const std::string& url_, const DictionaryPref& data_);
89
114 const std::string& url_,
115 const DictionaryPref& data_,
116 const Callback& success_,
117 const Callback& failure_
118 );
119
125 virtual ~InternetPOST();
126
134 virtual bool asynchronous() const;
135
141 virtual void run();
142
150 virtual bool running() const;
151
165 virtual std::string content() const;
166
177 virtual InternetError errorCode() const;
178
191 virtual int32_t platformErrorCode() const;
192
203 virtual std::string error() const;
204
205
206 private:
210 plat::InternetPOST* __impl;
211
217 InternetPOST();
218
225
231 InternetPOST& operator=(const InternetPOST&);
232 };
233 }
234}
235
236#endif
237// __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
Allows for the creation of simple HTTP(S) POST clients to post to, and acquire data from,...
Definition: hdicoreInternetPOST.h:30
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:922