rfbsrc: Cleanup dead code

Remove all the unused stuff, the include header, definition and C code
that don't contribute anything to this element.
This commit is contained in:
Nicolas Dufresne 2016-03-16 16:49:09 -04:00
parent 7b4b8a95b4
commit 29f1ca8602
8 changed files with 0 additions and 142 deletions

View file

@ -20,8 +20,5 @@ librfb_la_LIBADD = $(GST_LIBS) $(GIO_LIBS)
noinst_HEADERS = \
rfb.h \
rfbdecoder.h \
rfbbuffer.h \
rfbcontext.h \
rfbutil.h \
gstrfbsrc.h \
d3des.h

View file

@ -1,28 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include "rfb.h"
int
main (int argc, char *argv[])
{
RfbDecoder *decoder;
// int fd = 0;
decoder = rfb_decoder_new ();
rfb_decoder_connect_tcp (decoder, "127.0.0.1", 5901);
// rfb_decoder_use_file_descriptor (decoder, fd);
while (!decoder->inited)
rfb_decoder_iterate (decoder);
rfb_decoder_send_update_request (decoder, FALSE, 0, 0, 100, 100);
while (1) {
rfb_decoder_iterate (decoder);
}
return 0;
}

View file

@ -2,6 +2,5 @@
#define _RFB_RFB_H_
#include <librfb/rfbdecoder.h>
#include <librfb/rfbbuffer.h>
#endif

View file

@ -1,30 +0,0 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rfbbuffer.h"
RfbBuffer *
rfb_buffer_new (void)
{
return g_new0 (RfbBuffer, 1);
}
RfbBuffer *
rfb_buffer_new_and_alloc (int len)
{
RfbBuffer *buffer = g_new0 (RfbBuffer, 1);
buffer->data = g_malloc (len);
buffer->free_data = (RfbBufferFreeFunc) g_free;
return buffer;
}
void
rfb_buffer_free (RfbBuffer * buffer)
{
g_return_if_fail (buffer != NULL);
buffer->free_data (buffer->data, buffer->buffer_private);
}

View file

@ -1,23 +0,0 @@
#ifndef _LIBRFB_BUFFER_H_
#define _LIBRFB_BUFFER_H_
#include <glib.h>
G_BEGIN_DECLS typedef struct _RfbBuffer RfbBuffer;
typedef void (*RfbBufferFreeFunc) (guint8 * data, gpointer priv);
struct _RfbBuffer
{
RfbBufferFreeFunc free_data;
gpointer buffer_private;
guint8 *data;
gint length;
};
RfbBuffer *rfb_buffer_new (void);
RfbBuffer *rfb_buffer_new_and_alloc (gint len);
void rfb_buffer_free (RfbBuffer * buffer);
G_END_DECLS
#endif

View file

@ -1,35 +0,0 @@
#ifndef _LIBRFB_RFBCONTEXT_H_
#define _LIBRFB_RFBCONTEXT_H_
#include <glib.h>
G_BEGIN_DECLS typedef struct _RfbContext
{
RfbConnection *connection;
guint8 *buffer1;
gpointer buffer1_alloc;
guint buffer1_len;
guint8 *buffer2;
gpointer buffer2_alloc;
guint buffer2_len;
gchar *name;
} RfbContext;
typedef struct _RfbRect
{
RfbContext *context;
guint x_pos;
guint y_pos;
guint width;
guint height;
guint encoding_type;
gchar *data;
} RfbRect;
G_END_DECLS
#endif

View file

@ -95,21 +95,6 @@ struct _RfbDecoder
guint line_size;
};
#if 0
typedef struct _RfbRect
{
RfbConnection *connection;
guint x_pos;
guint y_pos;
guint width;
guint height;
guint encoding_type;
gchar *data;
} RfbRect;
#endif
RfbDecoder *rfb_decoder_new (void);
void rfb_decoder_free (RfbDecoder * decoder);
gboolean rfb_decoder_connect_tcp (RfbDecoder * decoder,

View file

@ -1,7 +0,0 @@
#ifndef _LIBRFB_UTIL_H_
#define _LIBRFB_UTIL_H_
#include <glib.h>
G_BEGIN_DECLS G_END_DECLS
#endif