00001
00006 #ifndef __BGDNetConnection_h__
00007 #define __BGDNetConnection_h__
00008
00009 #include "BGDNetConfig.h"
00010
00011 #include <nwclxcon.h>
00012 #include "BGDNetConnRef.h"
00013 #include "BGDNetException.h"
00014
00015 namespace BGDNet
00016 {
00017
00039 class BGDNET_API Connection
00040 {
00041 public:
00042
00043 Connection( ConnRef ref, bool licenseFlag = true )
00044 throw(Exception);
00052 Connection( const char* srvName, bool licenseFlag = true )
00053 throw(Exception);
00061 void open( ConnRef ref, bool licenseFlag = true )
00062 throw(Exception);
00069 void open( const char* srvName, bool licenseFlag = true )
00070 throw(Exception);
00077 void close( void );
00082 ConnRef ref( void ) const
00083 throw(Exception);
00088 operator NWCONN_HANDLE( void ) const;
00093 ~Connection( void );
00099 private:
00100
00101 Connection( const Connection& );
00106 Connection& operator =( const Connection& );
00111 static const NWCONN_HANDLE s_invalidHandle;
00116 NWCONN_HANDLE m_connHandle;
00120 };
00121
00122 }
00123
00124 #endif //__BGDNetConnection_h__