00001
00006 #ifndef __BGDNetServer_h__
00007 #define __BGDNetServer_h__
00008
00009 #include "BGDNetConfig.h"
00010
00011 #include <nwnamspc.h>
00012 #include "BGDNetShare.h"
00013 #include "BGDNetConnRef.h"
00014 #include "BGDNetCollection.h"
00015 #include "BGDNetVolume.h"
00016 #include "BGDNetException.h"
00017 #include "BGDNetString.h"
00018
00019 namespace BGDNet
00020 {
00021
00022 class Context;
00023
00024 #ifdef _MSC_VER
00025 # pragma warning(disable:4231)
00026 #endif
00027
00028 BGDNET_TEMPLATE(SharePtr<Volume>);
00029 BGDNET_TEMPLATE(Collection<SharePtr<Volume> >);
00030
00031 #ifdef _MSC_VER
00032 # pragma warning(default:4231)
00033 #endif
00034
00035 typedef Collection<SharePtr<Volume> > Volumes;
00036
00043 class BGDNET_API Server : public Share
00044 {
00045 public:
00046
00047 explicit Server( ConnRef ref )
00048 throw(Exception);
00054 explicit Server( const String& srvName )
00055 throw(Exception);
00061 void getVolumes( Volumes* pColl ) const
00062 throw(Exception);
00070 ConnRef connRef( void ) const;
00076 const String& name( void ) const;
00082 String objNameById( nuint32 objId, const Context& ctx ) const
00083 throw(Exception);
00091 nuint32 objIdByName( const char* objName, const Context& ctx ) const
00092 throw(Exception);
00100 private:
00101
00102 Server( const Server& );
00107 Server& operator =( const Server& );
00112 ConnRef m_connRef;
00117 String m_srvName;
00121 };
00122
00123
00124
00125
00126 #ifdef _MSC_VER
00127 # pragma warning(disable:4231)
00128 #endif
00129
00130 BGDNET_TEMPLATE(SharePtr<Server>);
00131 BGDNET_TEMPLATE(Collection<SharePtr<Server> >);
00132
00133 #ifdef _MSC_VER
00134 # pragma warning(default:4231)
00135 #endif
00136
00137
00138
00139
00146 class BGDNET_API Servers
00147 {
00148 public:
00149
00150 Servers( void )
00151 throw(Exception);
00156 int count( void ) const;
00162 Server* operator []( int n );
00169 const Server* operator []( int n ) const;
00176 private:
00177
00178 Collection<SharePtr<Server> > m_servers;
00182 };
00183
00184 }
00185
00186 #endif //__BGDNetServer_h__