Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_ProtocolBinaryBodyNotInterpreted.hpp

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_PROTOCOLBINARYBODYNOTINTERPRETED_H_
00021 #define _C_PROTOCOLBINARYBODYNOTINTERPRETED_H_
00022 #include "C_ProtocolBinary.hpp"
00023 
00024 #include "map_t.hpp"
00025 
00026 
00027 class C_ProtocolBinaryBodyNotInterpreted : public C_ProtocolBinary {
00028 
00029 public:
00030 
00031   C_ProtocolBinaryBodyNotInterpreted() ;
00032   
00033   virtual ~C_ProtocolBinaryBodyNotInterpreted();
00034 
00035 
00036   virtual C_MessageFrame*     create_new_message (void                *P_xml,
00037                                                   T_pInstanceDataList  P_list,
00038                                                   int                 *P_nb_value);
00039   
00040   virtual C_MessageFrame*     create_new_message(C_MessageFrame *P_msg) ;
00041 
00042 
00043   virtual int   decode_body   (unsigned char *P_buf, 
00044                                size_t         P_size,
00045                                T_pBodyValue   P_valDec,
00046                                int           *P_nbValDec,
00047                                int           *P_headerId);
00048 
00049   virtual C_ProtocolFrame::T_MsgError  encode_body (int            P_nbVal, 
00050                                                     T_pBodyValue   P_val,
00051                                                     unsigned char *P_buf, 
00052                                                     size_t        *P_size) ;
00053 
00054   virtual T_ManagementSessionId* get_manage_session_elt (int P_id);
00055   virtual int get_nb_management_session () ;
00056   virtual bool check_present_session (int P_msg_id,int P_id) ;
00057   virtual bool find_present_session (int P_msg_id,int P_id) ;
00058 
00059   virtual iostream_output& print_body  (iostream_output&  P_stream, 
00060                                         int          P_nb,
00061                                         T_pBodyValue P_val,
00062                                         int          P_level = 0) ;
00063 
00064   typedef struct _struct_header_body_size_pos {
00065     size_t m_position;
00066     size_t m_size;
00067   } T_HeaderBodyPositionSize, 
00068     *T_pHeaderBodyPositionSize;
00069 
00070   typedef map_t<int,T_HeaderBodyPositionSize> T_HeaderBodyPositionSizeMap, 
00071     *T_pHeaderBodyPositionSizeMap ;
00072 
00073   void get_field_position (T_pHeaderBodyPositionSize P_pos, int P_id) ;
00074 
00075 protected:
00076 
00077   bool                       **m_field_present_table         ;
00078 
00079   virtual int xml_interpretor(C_XmlData *P_def);
00080   virtual int analyze_body_from_xml (C_XmlData *P_def);
00081   virtual int get_header_body_values_from_xml (C_XmlData *P_def) ;
00082   virtual int get_header_values_from_xml (C_XmlData *P_def) ;
00083 
00084   virtual int analyze_sessions_id_from_xml (C_XmlData *P_def) ;
00085 
00086   T_pHeaderBodyPositionSizeMap     m_header_body_position_size_map ;
00087 
00088   T_pManagementSessionId           m_value_sessions_table      ;
00089   int                              m_value_sessions_table_size ;
00090 
00091 } ;
00092 
00093 #endif // _C_PROTOCOLBINARYBODYNOTINTERPRETED_H_
00094 
00095 
00096 
00097 

Generated on Wed Mar 7 14:44:53 2007 for Seagull by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002