1 // Connection.h 2 3 #ifndef NET_FS_CONNECTION_H 4 #define NET_FS_CONNECTION_H 5 6 #include <OS.h> 7 8 class Channel; 9 class SecurityContext; 10 class User; 11 12 // Connection 13 class Connection { 14 protected: 15 Connection(); 16 17 public: 18 virtual ~Connection(); 19 20 virtual status_t Init(const char* parameters) = 0; 21 virtual void Close() = 0; 22 23 virtual int32 CountDownStreamChannels() const = 0; 24 virtual Channel* DownStreamChannelAt(int32 index) const = 0; 25 26 virtual status_t GetUpStreamChannel(Channel** channel, 27 bigtime_t timeout = B_INFINITE_TIMEOUT) = 0; 28 virtual status_t PutUpStreamChannel(Channel* channel) = 0; 29 }; 30 31 #endif // NET_FS_CONNECTION_H 32