Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreInternetPing.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_INTERNET_PING__
8 #define __HDI_CORE_INTERNET_PING__
9 
10 #include <string>
11 
12 namespace hdi
13 {
14  namespace core
15  {
16  class Callback;
17 
24  {
25  public:
39  const std::string& domain_,
40  const Callback& success_,
41  const Callback& failure_
42  );
43 
63  static InternetPing* Async(
64  const std::string& domain_,
65  const Callback& success_,
66  const Callback& failure_
67  );
68 
74  virtual ~InternetPing();
75 
83  virtual bool asynchronous() const;
84 
90  virtual void run();
91 
99  virtual bool running() const;
100 
111  virtual bool reached() const;
112 
124  virtual double timing() const;
125 
138  virtual std::string address() const;
139 
150  virtual std::string error() const;
151 
152 
153  private:
157  void* __impl;
158 
164  InternetPing();
165 
171  InternetPing(const InternetPing&);
172 
178  InternetPing& operator=(const InternetPing&);
179  };
180  }
181 }
182 
183 #endif
184 // __HDI_CORE_INTERNET_PING__
virtual std::string address() const
Gets the IP address of the remote host for the domain given when the InternetPing object was construc...
virtual std::string error() const
Gets an error description if the ping request failed.
virtual ~InternetPing()
Destructs an InternetPing object.
virtual bool reached() const
Gets whether the remote host was reached when pinged.
virtual void run()
Starts the ping request.
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
Allows for the creation of simple ICMP ping clients to check the availability of a remote host...
Definition: hdicoreInternetPing.h:23
virtual double timing() const
Gets how long it took to reach the remote host.
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread) ...
Definition: hdicoreaiArray.h:12
virtual bool running() const
Gets whether the ping request is currently running.
static InternetPing * Async(const std::string &domain_, const Callback &success_, const Callback &failure_)
Creates an asynchronous (non-blocking) InternetPing object to perform a ICMP ping request...