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 #ifndef LIBNETAPI_DEPRECATED 17 namespace BPrivate { 18 19 namespace Network { 20 #endif 21 22 class BFileRequest : public BUrlRequest { 23 public: 24 virtual ~BFileRequest(); 25 26 const BUrlResult& Result() const; 27 void SetDisableListener(bool disable); 28 29 private: 30 friend class BUrlProtocolRoster; 31 32 BFileRequest(const BUrl& url, 33 BUrlProtocolListener* listener = NULL, 34 BUrlContext* context = NULL); 35 36 status_t _ProtocolLoop(); 37 private: 38 BUrlResult fResult; 39 }; 40 41 #ifndef LIBNETAPI_DEPRECATED 42 } // namespace Network 43 44 } // namespace BPrivate 45 #endif 46 47 #endif // _B_FILE_REQUEST_H_ 48