Support new BUrlProtocolRoster::MakeRequest()
This commit is contained in:
parent
bbdc2c2865
commit
faccada3f0
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include <UrlProtocolListener.h>
|
#include <UrlProtocolListener.h>
|
||||||
|
|
||||||
|
class BDataIO;
|
||||||
|
|
||||||
|
|
||||||
#ifndef LIBNETAPI_DEPRECATED
|
#ifndef LIBNETAPI_DEPRECATED
|
||||||
using namespace BPrivate::Network;
|
using namespace BPrivate::Network;
|
||||||
|
|
|
@ -139,9 +139,14 @@ fetch(BUrl url, BDataIO* reply, BString* hash, int timeout)
|
||||||
ProtocolListener listener(true);
|
ProtocolListener listener(true);
|
||||||
boost::uuids::detail::sha1 sha1;
|
boost::uuids::detail::sha1 sha1;
|
||||||
|
|
||||||
|
#ifdef LIBNETAPI_DEPRECATED
|
||||||
BUrlRequest* request = BUrlProtocolRoster::MakeRequest(url, &listener);
|
BUrlRequest* request = BUrlProtocolRoster::MakeRequest(url, &listener);
|
||||||
|
|
||||||
listener.SetDownloadIO(reply);
|
listener.SetDownloadIO(reply);
|
||||||
|
#else
|
||||||
|
BUrlRequest* request = BUrlProtocolRoster::MakeRequest(url, reply, &listener);
|
||||||
|
listener.SetDownloadIO(NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
listener.SetSha1(&sha1);
|
listener.SetSha1(&sha1);
|
||||||
|
|
||||||
time_t startTime = time(0);
|
time_t startTime = time(0);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define UTIL_H
|
#define UTIL_H
|
||||||
|
|
||||||
#include <DateTime.h>
|
#include <DateTime.h>
|
||||||
|
#include <Entry.h>
|
||||||
|
|
||||||
#include "ProtocolListener.h"
|
#include "ProtocolListener.h"
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue