dispatcher: Use IS-A relationship for Dispatcher hierarchy

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-04-01 20:43:04 +01:00 committed by Frediano Ziglio
parent ea0d056bb7
commit 75679dc95d
5 changed files with 5 additions and 9 deletions

View File

@ -101,7 +101,7 @@ libserver_la_SOURCES = \
dcc.h \
dcc-private.h \
dcc-send.cpp \
dispatcher.c \
dispatcher.cpp \
dispatcher.h \
display-channel.cpp \
display-channel.h \

View File

@ -309,7 +309,7 @@ static int dispatcher_handle_single_read(Dispatcher *dispatcher)
*/
static void dispatcher_handle_event(int fd, int event, void *opaque)
{
Dispatcher *dispatcher = opaque;
Dispatcher *dispatcher = (Dispatcher *) opaque;
while (dispatcher_handle_single_read(dispatcher)) {
}

View File

@ -50,10 +50,8 @@ typedef struct DispatcherPrivate DispatcherPrivate;
* activity and should call dispatcher_handle_recv_read() to process incoming
* messages.
*/
struct Dispatcher
struct Dispatcher: public GObject
{
GObject parent;
DispatcherPrivate *priv;
};

View File

@ -37,10 +37,8 @@ typedef struct MainDispatcher MainDispatcher;
typedef struct MainDispatcherClass MainDispatcherClass;
typedef struct MainDispatcherPrivate MainDispatcherPrivate;
struct MainDispatcher
struct MainDispatcher: public Dispatcher
{
Dispatcher parent;
MainDispatcherPrivate *priv;
};

View File

@ -61,7 +61,7 @@ spice_server_sources = [
'dcc.h',
'dcc-private.h',
'dcc-send.cpp',
'dispatcher.c',
'dispatcher.cpp',
'dispatcher.h',
'display-channel.cpp',
'display-channel.h',