00001 /*
00002 * This program is free software; you can redistribute it and/or modify
00003 * it under the terms of the GNU General Public License as published by
00004 * the Free Software Foundation; either version 2 of the License, or
00005 * (at your option) any later version.
00006 *
00007 * This program is distributed in the hope that it will be useful,
00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00010 * GNU General Public License for more details.
00011 *
00012 * You should have received a copy of the GNU General Public License
00013 * along with this program; if not, write to the Free Software
00014 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00015 *
00016 * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017 *
00018 */
00019
00020 #ifndef _C_PROTOCOLBINARYFRAME_H
00021 #define _C_PROTOCOLBINARYFRAME_H
00022
00023 // Protocol Binary Frame Definition Class
00024
00025 #include "C_ProtocolFrame.hpp"
00026
00027 class C_ProtocolBinaryFrame : public C_ProtocolFrame {
00028
00029 public:
00030 // typedef enum _msg_error_code {
00031 // E_MSG_OK = 0,
00032 // E_MSG_ERROR_DECODING,
00033 // E_MSG_ERROR_DECODING_SIZE_LESS,
00034 // E_MSG_ERROR_ENCODING
00035 // } T_MsgError, *T_pMsgError ;
00036
00037
00038 C_ProtocolBinaryFrame() { m_type = E_PROTOCOL_BINARY; } ;
00039 virtual ~C_ProtocolBinaryFrame() {} ;
00040
00041 virtual C_MessageFrame *decode_message (unsigned char *P_buffer,
00042 size_t *P_size,
00043 T_pMsgError P_error) = 0 ;
00044
00045 virtual T_MsgError encode_message (C_MessageFrame *P_msg,
00046 unsigned char *P_buffer,
00047 size_t *P_buffer_size) = 0 ;
00048
00049 virtual void log_buffer (char *P_header,
00050 unsigned char *P_buffer,
00051 size_t P_buffer_size) = 0 ;
00052
00053
00054 protected:
00055
00056 private:
00057
00058 } ;
00059
00060 typedef C_ProtocolBinaryFrame *T_pC_ProtocolBinaryFrame ;
00061
00062 #endif // _C_PROTOCOLBINARYFRAME_H
1.2.14 written by Dimitri van Heesch,
© 1997-2002