j_jdwp.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __BARRYJDWP_JDWP_H__
00023 #define __BARRYJDWP_JDWP_H__
00024
00025 #include "error.h"
00026
00027 namespace Barry {
00028
00029
00030 class Data;
00031
00032 namespace JDWP {
00033
00034
00035
00036
00037
00038 class Error : public Barry::Error
00039 {
00040 int m_errcode;
00041
00042 public:
00043 Error(const std::string &str);
00044 Error(int errcode, const std::string &str);
00045
00046
00047 int errcode() const { return m_errcode; }
00048 };
00049
00050 class Timeout : public Error
00051 {
00052 public:
00053 Timeout(const std::string &str) : Error(str) {}
00054 Timeout(int errcode, const std::string &str)
00055 : Error(errcode, str) {}
00056 };
00057
00058
00059
00060
00061
00062 class JDWP
00063 {
00064 private:
00065 int m_lasterror;
00066
00067 protected:
00068
00069 public:
00070 JDWP();
00071 ~JDWP();
00072
00073 bool Read(int socket, Barry::Data &data, int timeout = -1);
00074 bool Write(int socket, const Barry::Data &data, int timeout = -1);
00075 bool Write(int socket, const void *data, size_t size, int timeout = -1);
00076 };
00077
00078 }}
00079
00080 #endif
00081