BUrlRequest: fix issues found while documenting
- Remove Pause/Resume functions. They are not possible to implement (the server would time out) - Fix SetContext(NULL) to do the right thing. Change-Id: I25ba09bb01ea0fe8a85d774611b33be7dc192028 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4245 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Niels Sascha Reedijk <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
e9946b675c
commit
a94ee3f35a
@@ -40,8 +40,6 @@ public:
|
|||||||
|
|
||||||
// URL protocol thread management
|
// URL protocol thread management
|
||||||
virtual thread_id Run();
|
virtual thread_id Run();
|
||||||
virtual status_t Pause();
|
|
||||||
virtual status_t Resume();
|
|
||||||
virtual status_t Stop();
|
virtual status_t Stop();
|
||||||
virtual void SetTimeout(bigtime_t timeout) {}
|
virtual void SetTimeout(bigtime_t timeout) {}
|
||||||
|
|
||||||
|
|||||||
@@ -98,22 +98,6 @@ BUrlRequest::Run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
BUrlRequest::Pause()
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return B_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
BUrlRequest::Resume()
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return B_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BUrlRequest::Stop()
|
BUrlRequest::Stop()
|
||||||
{
|
{
|
||||||
@@ -146,7 +130,11 @@ BUrlRequest::SetContext(BUrlContext* context)
|
|||||||
if (IsRunning())
|
if (IsRunning())
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
fContext = context;
|
if (context == NULL)
|
||||||
|
fContext = gDefaultContext;
|
||||||
|
else
|
||||||
|
fContext = context;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user