inet/zz_http_session.h

Go to the documentation of this file.
00001 /* libzzinet
00002  *
00003  * This program is distributed under the GNU General Public License, version 2.
00004  * A copy of this license is included with this source.
00005  *
00006  * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
00007 */
00008 
00009 #ifndef zz_http_session_h
00010 #define zz_http_session_h
00011 
00012 #include <config.h>
00013 #include <ne_ssl.h> 
00014 #include <ne_session.h>
00015 #include <ne_request.h>
00016 #include <ne_basic.h>
00017 #include <ne_uri.h>
00018 #include <ne_socket.h>
00019 #include <ne_utils.h> 
00020 
00021 #include <zz_log.h>
00022 
00023 typedef CzzString (*ZZ_PROMPT_FOR_PASSWORD)(void); 
00024 
00030 class ZZ_API CzzHttpSession
00031 {
00032 public:
00033 
00034         //* Construction
00035         CzzHttpSession( const char* proto, const char* host, int port, 
00036                                                             const char* proxy, int proxy_port );
00037         virtual ~CzzHttpSession();
00038 
00039         CzzString getHostName( void );
00040         ne_session* getHandle( void );
00041 
00042         virtual int onValidateCertificate( int fs, const ne_ssl_certificate *cert ); 
00043 
00044     void setClientCertificate( const char* path, ZZ_PROMPT_FOR_PASSWORD pwdfn );
00045     static CzzString promptForPassword( void );
00046 
00047 protected:
00048         static int validate( void *userdata, int fs, const ne_ssl_certificate *cert ); 
00049     
00050 private:
00051         ne_session* m_Handle;
00052         CzzString m_HostName;
00053         CzzLog m_Log;
00054 };
00055 
00056 #endif // zz_http_session_h

Generated on Thu Sep 21 21:45:42 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO