# j_message.h

Go to the documentation of this file.

    00001 ///
    00002 /// \file       j_message.h
    00003 ///             JDWP message classes
    00004 ///
    00005
    00006 /*
    00007     Copyright (C) 2009, Nicolas VIVIEN
    00008
    00009     This program is free software; you can redistribute it and/or modify
    00010     it under the terms of the GNU General Public License as published by
    00011     the Free Software Foundation; either version 2 of the License, or
    00012     (at your option) any later version.
    00013
    00014     This program is distributed in the hope that it will be useful,
    00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00017
    00018     See the GNU General Public License in the COPYING file at the
    00019     root directory of this project for more details.
    00020 */
    00021
    00022 #ifndef __BARRYJDWP_MESSAGE_H__
    00023 #define __BARRYJDWP_MESSAGE_H__
    00024
    00025 #include "j_jdwp.h"
    00026
    00027 namespace Barry { namespace JDWP {
    00028
    00029 class JDWMessage
    00030 {
    00031 private:
    00032         int m_socket;
    00033
    00034         JDWP m_jdwp;
    00035
    00036         void RawSend(Barry::Data &send, int timeout = -1);
    00037         bool RawReceive(Barry::Data &receive, int timeout = -1);
    00038
    00039 protected:
    00040
    00041 public:
    00042         JDWMessage(int socket);
    00043         ~JDWMessage();
    00044
    00045         void Send(Barry::Data &send, int timeout = -1); // send only
    00046         void Send(Barry::Data &send, Barry::Data &receive, int timeout = -1); // send+recv
    00047         bool Receive(Barry::Data &receive, int timeout = -1);
    00048 };
    00049
    00050 }} // namespace Barry::JDWP
    00051
    00052 #endif
    00053