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:
Adrien Destugues 2021-07-25 13:49:44 +02:00 committed by Jérôme Duval
parent e9946b675c
commit a94ee3f35a
2 changed files with 5 additions and 19 deletions

View File

@ -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) {}

View File

@ -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;
}