[Spice-devel] [spice-server 02/17] sound: Remove dummy-channel.[ch]
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 11 08:48:16 UTC 2017
This is no longer used since "sound: Convert SndChannel to GObject"
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
server/Makefile.am | 2 --
server/dummy-channel.c | 94 --------------------------------------------------
server/dummy-channel.h | 60 --------------------------------
server/sound.c | 1 -
4 files changed, 157 deletions(-)
delete mode 100644 server/dummy-channel.c
delete mode 100644 server/dummy-channel.h
diff --git a/server/Makefile.am b/server/Makefile.am
index ae79ed7..90ff779 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -104,8 +104,6 @@ libserver_la_SOURCES = \
red-channel-client-private.h \
red-client.c \
red-client.h \
- dummy-channel.c \
- dummy-channel.h \
dummy-channel-client.c \
dummy-channel-client.h \
red-common.h \
diff --git a/server/dummy-channel.c b/server/dummy-channel.c
deleted file mode 100644
index aecd3a6..0000000
--- a/server/dummy-channel.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- Copyright (C) 2016 Red Hat, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "dummy-channel.h"
-
-G_DEFINE_TYPE(DummyChannel, dummy_channel, RED_TYPE_CHANNEL)
-
-static int dummy_config_socket(RedChannelClient *self)
-{
- return 1;
-}
-
-static void dummy_on_disconnect(RedChannelClient *self)
-{
-}
-
-static uint8_t* dummy_alloc_recv_buf(RedChannelClient *self,
- uint16_t type,
- uint32_t size)
-{
- return NULL;
-}
-
-static void dummy_release_recv_buf(RedChannelClient *self,
- uint16_t type,
- uint32_t size,
- uint8_t *msg)
-{
-}
-
-static void
-dummy_channel_class_init(DummyChannelClass *klass)
-{
- RedChannelClass *channel_class = RED_CHANNEL_CLASS(klass);
- channel_class->config_socket = dummy_config_socket;
- channel_class->on_disconnect = dummy_on_disconnect;
- channel_class->alloc_recv_buf = dummy_alloc_recv_buf;
- channel_class->release_recv_buf = dummy_release_recv_buf;
-}
-
-static void
-dummy_channel_init(DummyChannel *self)
-{
-}
-
-// TODO: red_worker can use this one
-static void dummy_watch_update_mask(const SpiceCoreInterfaceInternal *iface,
- SpiceWatch *watch, int event_mask)
-{
-}
-
-static SpiceWatch *dummy_watch_add(const SpiceCoreInterfaceInternal *iface,
- int fd, int event_mask, SpiceWatchFunc func, void *opaque)
-{
- return NULL; // apparently allowed?
-}
-
-static void dummy_watch_remove(const SpiceCoreInterfaceInternal *iface, SpiceWatch *watch)
-{
-}
-
-// TODO: actually, since I also use channel_client_dummy, no need for core. Can be NULL
-static const SpiceCoreInterfaceInternal dummy_core = {
- .watch_update_mask = dummy_watch_update_mask,
- .watch_add = dummy_watch_add,
- .watch_remove = dummy_watch_remove,
-};
-
-RedChannel *dummy_channel_new(RedsState *reds, uint32_t type, uint32_t id)
-{
- return g_object_new(TYPE_DUMMY_CHANNEL,
- "spice-server", reds,
- "core-interface", &dummy_core,
- "channel-type", type,
- "id", id,
- NULL);
-}
diff --git a/server/dummy-channel.h b/server/dummy-channel.h
deleted file mode 100644
index 9527633..0000000
--- a/server/dummy-channel.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright (C) 2009-2015 Red Hat, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __DUMMY_CHANNEL_H__
-#define __DUMMY_CHANNEL_H__
-
-#include <glib-object.h>
-
-#include "red-channel.h"
-
-G_BEGIN_DECLS
-
-// TODO: tmp, for channels that don't use RedChannel yet (e.g., snd channel), but
-// do use the client callbacks. So the channel clients are not connected (the channel doesn't
-// have list of them, but they do have a link to the channel, and the client has a list of them)
-
-#define TYPE_DUMMY_CHANNEL dummy_channel_get_type()
-
-#define DUMMY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_DUMMY_CHANNEL, DummyChannel))
-#define DUMMY_CHANNEL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_DUMMY_CHANNEL, DummyChannelClass))
-#define _IS_DUMMY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_DUMMY_CHANNEL))
-#define _IS_DUMMY_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_DUMMY_CHANNEL))
-#define DUMMY_CHANNEL_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_DUMMY_CHANNEL, DummyChannelClass))
-
-typedef struct DummyChannel DummyChannel;
-typedef struct DummyChannelClass DummyChannelClass;
-
-struct DummyChannel
-{
- RedChannel parent;
-};
-
-struct DummyChannelClass
-{
- RedChannelClass parent_class;
-};
-
-GType dummy_channel_get_type(void) G_GNUC_CONST;
-
-RedChannel *dummy_channel_new(RedsState *reds, uint32_t type, uint32_t id);
-
-G_END_DECLS
-
-#endif /* __DUMMY_CHANNEL_H__ */
diff --git a/server/sound.c b/server/sound.c
index 86bf3fc..f154465 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -32,7 +32,6 @@
#include "spice.h"
#include "red-common.h"
-#include "dummy-channel.h"
#include "dummy-channel-client.h"
#include "main-channel.h"
#include "reds.h"
--
2.9.3
More information about the Spice-devel
mailing list