Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_TransOCTcap32.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_TRANSOCTCAP32_
00021 #define _C_TRANSOCTCAP32_
00022 
00023 #include "C_Transport.hpp"
00024 #include "C_TcapStack.hpp"
00025 
00026 #include "C_TCAPCnxInfo.hpp"
00027 
00028 
00029 class C_TransOCTcap32 : public C_Transport {
00030 
00031 public:
00032   C_TransOCTcap32() ;
00033   ~C_TransOCTcap32() ;
00034 
00035   int init (char* P_buf, 
00036             T_logFunction P_logError, 
00037             T_logFunction P_logInfo )  ;
00038 
00039   int config (T_pConfigValueList P_config_param_list) ;
00040   int close ()  ;
00041 
00042   int open (int              P_channel_id,
00043             char*            P_buf, 
00044             T_pOpenStatus    P_status,
00045             C_ProtocolFrame *P_protocol)  ;
00046 
00047   int close (int P_id)  ;
00048 
00049   int pre_select (int                   P_n, 
00050                   fd_set               *P_readfds,  
00051                   fd_set               *P_writefds,
00052                   fd_set               *P_exceptfds, 
00053                   struct timeval       *P_timeout, 
00054                   int                  *P_cnx, 
00055                   size_t                P_nb)  ;
00056 
00057 
00058   int             post_select     (int                  P_n, 
00059                                    fd_set              *P_readfds,  
00060                                    fd_set              *P_writefds,
00061                                    fd_set              *P_exceptfds, 
00062                                    T_pC_TransportEvent  P_eventTable,
00063                                    size_t              *P_nb)  ;
00064   
00065   bool            get_message(int P_id, T_pReceiveMsgContext P_ctxt)  ;
00066   int             send_message(int P_id, C_MessageFrame *P_msg)  ;
00067 
00068   T_SelectDef     select_definition () ;
00069 
00070 
00071 protected:
00072 private:
00073 
00074   typedef enum _flavour_t {
00075     E_FLAVOUR_ITU,
00076     E_FLAVOUR_ANSI,
00077     E_FLAVOUR_UNKNOWN
00078   } T_FlavourKey, *T_pFlavourKey ;
00079 
00080   T_FlavourKey  m_flavour ;
00081   char         *m_library_name ;
00082 
00083   C_TcapStack  *m_stack ;
00084   int           m_cnx_id ;
00085 
00086 
00087   // T_CnxInfoMap  m_cnx_info_map  ;
00088 
00089   T_logFunction m_log_error, m_log_info ;
00090 
00091 
00092   int          analyze_init_string (char *P_buf);
00093   bool         analyze_open_string (char *P_buf, T_pCnxInfo P_cnx_info) ;
00094   
00095   char*        find_value(char *P_buf, char *P_field);
00096   
00097   T_FlavourKey analyze_flavour(char *P_name);
00098   int          find_library(char *P_name, char *P_path, char *P_lib);
00099   
00100   int          determine_lib (char *P_name);
00101   char*        verify_path (char * P_libPath, char * P_libName) ;
00102 
00103 
00104 
00105 
00106 } ;
00107 
00108 extern "C" T_pTransport create_ctransoctcap_instance () ;
00109 extern "C" void         delete_ctransoctcap_instance (T_ppTransport) ;
00110 
00111 
00112 #endif
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 

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