output/httpd: migrate from class Error to C++ exceptions
This commit is contained in:
parent
dce211dbba
commit
9dbdc75689
@ -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:
|
|||||||
|
|
||||||
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 @@
|
|||||||
#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)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 &)
|
|||||||
|
|
||||||
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)
|
|||||||
|
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user