summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-10-15 00:04:39 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-10-20 08:27:50 +0100
commit6f32ec14349b706f4c7e094c54dee6a7832facb3 (patch)
treebaca00335e8635e794a09fa151b81256d7974a3e
parent14d0ac5fb5c541b1da8cf71718d1512713a6fd24 (diff)
Declare same enumerator in a single header
Avoid having duplication and desynchronisation. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--server/cursor-channel-client.c6
-rw-r--r--server/cursor-channel-client.h6
-rw-r--r--server/cursor-channel.c6
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;