Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetPing.h
Go to the documentation of this file.
1
6
7#ifndef __HDI_CORE_INTERNET_PING__
8#define __HDI_CORE_INTERNET_PING__
9
10#include <string>
11
12namespace 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
65 const std::string& domain_,
66 const Callback& success_,
67 const Callback& failure_
68 );
69
75 virtual ~InternetPing();
76
84 virtual bool asynchronous() const;
85
91 virtual void run();
92
100 virtual bool running() const;
101
112 virtual bool reached() const;
113
125 virtual double timing() const;
126
139 virtual std::string address() const;
140
151 virtual std::string error() const;
152
153
154 private:
158 void* __impl;
159
165 InternetPing();
166
173
179 InternetPing& operator=(const InternetPing&);
180 };
181 }
182}
183
184#endif
185// __HDI_CORE_INTERNET_PING__
Base class for templated __Callback class.
Definition hdicoreCallback.h:68
virtual bool running() const
Gets whether the ping request is currently running.
virtual bool reached() const
Gets whether the remote host was reached when pinged.
InternetPing(const std::string &domain_, const Callback &success_, const Callback &failure_)
Creates a synchronous (blocking) InternetPing object to perform a ping request.
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread)
virtual void run()
Starts the ping request.
virtual double timing() const
Gets how long it took to reach the remote host.
virtual std::string error() const
Gets an error description if the ping request failed.
virtual std::string address() const
Gets the IP address of the remote host for the domain given when the InternetPing object was construc...
virtual ~InternetPing()
Destructs an InternetPing object.
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.