1 /* 2 * Copyright 2013 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _B_FILE_REQUEST_H_ 6 #define _B_FILE_REQUEST_H_ 7 8 9 #include <deque> 10 11 12 #include <UrlRequest.h> 13 #include <UrlProtocolRoster.h> 14 15 16 namespace BPrivate { 17 18 namespace Network { 19 20 21 class BFileRequest : public BUrlRequest { 22 public: 23 virtual ~BFileRequest(); 24 25 const BUrlResult& Result() const; 26 void SetDisableListener(bool disable); 27 28 private: 29 friend class BUrlProtocolRoster; 30 31 BFileRequest(const BUrl& url, 32 BDataIO* output, 33 BUrlProtocolListener* listener = NULL, 34 BUrlContext* context = NULL); 35 36 status_t _ProtocolLoop(); 37 private: 38 BUrlResult fResult; 39 }; 40 41 42 } // namespace Network 43 44 } // namespace BPrivate 45 46 #endif // _B_FILE_REQUEST_H_ 47