Commit 9dbdc756 authored by Max Kellermann's avatar Max Kellermann

output/httpd: migrate from class Error to C++ exceptions

parent dce211db
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include <list> #include <list>
struct ConfigBlock; struct ConfigBlock;
class Error;
class EventLoop; class EventLoop;
class ServerSocket; class ServerSocket;
class HttpdClient; class HttpdClient;
...@@ -246,7 +245,7 @@ public: ...@@ -246,7 +245,7 @@ public:
void SendTag(const Tag &tag); void SendTag(const Tag &tag);
size_t Play(const void *chunk, size_t size, Error &error); size_t Play(const void *chunk, size_t size);
void CancelAllClients(); void CancelAllClients();
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "IOThread.hxx" #include "IOThread.hxx"
#include "event/Call.hxx" #include "event/Call.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/DeleteDisposer.hxx" #include "util/DeleteDisposer.hxx"
#include "Log.hxx" #include "Log.hxx"
...@@ -419,7 +418,7 @@ HttpdOutput::EncodeAndPlay(const void *chunk, size_t size) ...@@ -419,7 +418,7 @@ HttpdOutput::EncodeAndPlay(const void *chunk, size_t size)
} }
inline size_t inline size_t
HttpdOutput::Play(const void *chunk, size_t size, Error &) HttpdOutput::Play(const void *chunk, size_t size)
{ {
if (LockHasClients()) if (LockHasClients())
EncodeAndPlay(chunk, size); EncodeAndPlay(chunk, size);
...@@ -433,11 +432,11 @@ HttpdOutput::Play(const void *chunk, size_t size, Error &) ...@@ -433,11 +432,11 @@ HttpdOutput::Play(const void *chunk, size_t size, Error &)
static size_t static size_t
httpd_output_play(AudioOutput *ao, const void *chunk, size_t size, httpd_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error) Error &)
{ {
HttpdOutput *httpd = HttpdOutput::Cast(ao); HttpdOutput *httpd = HttpdOutput::Cast(ao);
return httpd->Play(chunk, size, error); return httpd->Play(chunk, size);
} }
static bool static bool
...@@ -447,11 +446,10 @@ httpd_output_pause(AudioOutput *ao) ...@@ -447,11 +446,10 @@ httpd_output_pause(AudioOutput *ao)
if (httpd->LockHasClients()) { if (httpd->LockHasClients()) {
static const char silence[1020] = { 0 }; static const char silence[1020] = { 0 };
return httpd_output_play(ao, silence, sizeof(silence), httpd->Play(silence, sizeof(silence));
IgnoreError()) > 0;
} else {
return true;
} }
return true;
} }
inline void inline void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment