ServerSocket: replace callback with virtual method

This commit is contained in:
Max Kellermann
2013-01-30 13:20:27 +01:00
parent cb9a05ac77
commit fa51db449f
5 changed files with 55 additions and 58 deletions

View File

@@ -28,6 +28,7 @@
#include "output_internal.h"
#include "timer.h"
#include "thread/Mutex.hxx"
#include "event/ServerSocket.hxx"
#include <glib.h>
@@ -39,7 +40,7 @@ class ServerSocket;
class HttpdClient;
class Page;
struct HttpdOutput {
struct HttpdOutput final : private ServerSocket {
struct audio_output base;
/**
@@ -78,11 +79,6 @@ struct HttpdOutput {
*/
struct timer *timer;
/**
* The listener socket.
*/
ServerSocket *server_socket;
/**
* The header page, which is sent to every client on connect.
*/
@@ -201,6 +197,10 @@ struct HttpdOutput {
bool EncodeAndPlay(const void *chunk, size_t size, GError **error_r);
void SendTag(const struct tag *tag);
private:
virtual void OnAccept(int fd, const sockaddr &address,
size_t address_length, int uid) override;
};
#endif