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 <no-reply+buildbot@haiku-os.org> Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
This commit is contained in:
parent
e9946b675c
commit
a94ee3f35a
@ -40,8 +40,6 @@ public:
|
||||
|
||||
// URL protocol thread management
|
||||
virtual thread_id Run();
|
||||
virtual status_t Pause();
|
||||
virtual status_t Resume();
|
||||
virtual status_t Stop();
|
||||
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
|
||||
BUrlRequest::Stop()
|
||||
{
|
||||
@ -146,7 +130,11 @@ BUrlRequest::SetContext(BUrlContext* context)
|
||||
if (IsRunning())
|
||||
return B_ERROR;
|
||||
|
||||
fContext = context;
|
||||
if (context == NULL)
|
||||
fContext = gDefaultContext;
|
||||
else
|
||||
fContext = context;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user