1 // ServerConnectionProvider.h 2 3 #ifndef NET_FS_SERVER_CONNECTON_PROVIDER_H 4 #define NET_FS_SERVER_CONNECTON_PROVIDER_H 5 6 #include <fsproto.h> 7 8 #include <Referenceable.h> 9 10 #include "Locker.h" 11 12 class ExtendedServerInfo; 13 class ServerConnection; 14 class VolumeManager; 15 16 class ServerConnectionProvider : public BReferenceable { 17 public: 18 ServerConnectionProvider( 19 VolumeManager* volumeManager, 20 ExtendedServerInfo* serverInfo, 21 vnode_id connectionBrokenTarget); 22 ~ServerConnectionProvider(); 23 24 status_t Init(); 25 26 status_t GetServerConnection( 27 ServerConnection** serverConnection); 28 ServerConnection* GetExistingServerConnection(); 29 30 void CloseServerConnection(); 31 32 private: 33 Locker fLock; 34 VolumeManager* fVolumeManager; 35 ExtendedServerInfo* fServerInfo; 36 ServerConnection* fServerConnection; 37 vnode_id fConnectionBrokenTarget; 38 }; 39 40 #endif // NET_FS_SERVER_CONNECTON_PROVIDER_H 41