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