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