From 6f32ec14349b706f4c7e094c54dee6a7832facb3 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Sat, 15 Oct 2016 00:04:39 +0100 Subject: Declare same enumerator in a single header Avoid having duplication and desynchronisation. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/cursor-channel-client.c | 6 ------ server/cursor-channel-client.h | 6 ++++++ server/cursor-channel.c | 6 ------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/server/cursor-channel-client.c b/server/cursor-channel-client.c index b7ab2e53..56efd1e9 100644 --- a/server/cursor-channel-client.c +++ b/server/cursor-channel-client.c @@ -35,12 +35,6 @@ #define CURSOR_CACHE_HASH_KEY(id) ((id) & CURSOR_CACHE_HASH_MASK) #define CURSOR_CLIENT_TIMEOUT 30000000000ULL //nano -enum { - RED_PIPE_ITEM_TYPE_CURSOR = RED_PIPE_ITEM_TYPE_COMMON_LAST, - RED_PIPE_ITEM_TYPE_CURSOR_INIT, - RED_PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE, -}; - G_DEFINE_TYPE(CursorChannelClient, cursor_channel_client, RED_TYPE_CHANNEL_CLIENT) #define CURSOR_CHANNEL_CLIENT_PRIVATE(o) \ diff --git a/server/cursor-channel-client.h b/server/cursor-channel-client.h index fab68379..d1dd31dc 100644 --- a/server/cursor-channel-client.h +++ b/server/cursor-channel-client.h @@ -72,6 +72,12 @@ void cursor_channel_client_on_disconnect(RedChannelClient *rcc); RedCacheItem* cursor_channel_client_cache_find(CursorChannelClient *ccc, uint64_t id); int cursor_channel_client_cache_add(CursorChannelClient *ccc, uint64_t id, size_t size); +enum { + RED_PIPE_ITEM_TYPE_CURSOR = RED_PIPE_ITEM_TYPE_COMMON_LAST, + RED_PIPE_ITEM_TYPE_CURSOR_INIT, + RED_PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE, +}; + G_END_DECLS #endif /* CURSOR_CHANNEL_CLIENT_H_ */ diff --git a/server/cursor-channel.c b/server/cursor-channel.c index 28a6d548..cfaf55d9 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -30,12 +30,6 @@ #define CURSOR_CHANNEL(channel) ((CursorChannel*)(channel)) -enum { - RED_PIPE_ITEM_TYPE_CURSOR = RED_PIPE_ITEM_TYPE_COMMON_LAST, - RED_PIPE_ITEM_TYPE_CURSOR_INIT, - RED_PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE, -}; - typedef struct CursorItem { QXLInstance *qxl; int refs; -- cgit v1.2.3