00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef PEEKABOT_CLIENT_PEEKABOT_CLIENT_HH_INCLUDED
00012 #define PEEKABOT_CLIENT_PEEKABOT_CLIENT_HH_INCLUDED
00013
00014
00015 #include <stdexcept>
00016 #include <string>
00017 #include <boost/shared_ptr.hpp>
00018 #include <boost/function.hpp>
00019
00020 #include "../Visibility.hh"
00021 #include "DelayedDispatch.hh"
00022 #include "OperationResult.hh"
00023 #include "Recording.hh"
00024
00025
00026 namespace peekabot
00027 {
00028 class Action;
00029
00030 namespace client
00031 {
00032 class ClientImpl;
00033 class PeekabotProxyBase;
00034
00038 class PEEKABOT_API PeekabotClient
00039 {
00040 friend class PeekabotProxyBase;
00041
00042 public:
00043 PeekabotClient();
00044
00051 PeekabotClient(const PeekabotClient &client);
00052
00053 virtual ~PeekabotClient();
00054
00057
00084 void connect(const std::string &hostname, unsigned int port = 5050);
00085
00096 void disconnect();
00097
00104 void flush();
00105
00120 void sync();
00121
00132 void start_recording(const std::string &filename);
00133
00141 void stop_recording();
00142
00146
00150 void client_version(int &major, int &minor, int &rev) const;
00151
00155 const std::string &client_version_str() const;
00156
00161 bool is_connected() const;
00162
00168 bool is_recording() const;
00169
00185 DelayedDispatch noop();
00186
00209 void begin_bundle();
00210
00217 DelayedDispatch end_bundle();
00218
00223 bool is_bundling() const;
00224
00225 Recording open_recording(const std::string &filename);
00226
00239 DelayedDispatch upload_file(const std::string &filename);
00240
00245 DelayedDispatch remove_file(const std::string &filename);
00246
00248
00249 private:
00250 PEEKABOT_HIDDEN PeekabotClient(boost::shared_ptr<ClientImpl> impl);
00251
00252 PEEKABOT_HIDDEN boost::shared_ptr<ClientImpl> get_impl();
00253
00254 PEEKABOT_HIDDEN const boost::shared_ptr<ClientImpl> get_impl() const;
00255
00256 private:
00260 boost::shared_ptr<ClientImpl> m_impl;
00261 };
00262 }
00263 }
00264
00265
00266 #endif // PEEKABOT_CLIENT_PEEKABOT_CLIENT_HH_INCLUDED