Remove unused code

vencrypt
Andri Yngvason 2020-01-25 15:39:23 +00:00
parent 19e4e42036
commit caf9fe0130
5 changed files with 0 additions and 91 deletions

View File

@ -1,37 +0,0 @@
/*
* Copyright (c) 2019 Andri Yngvason
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include <uv.h>
#include <unistd.h>
struct rfb_pixel_format;
struct vnc_write_request {
uv_write_t request;
uv_write_cb on_done;
uv_buf_t buffer;
void* userdata;
};
int vnc__write(uv_stream_t* stream, const void* payload, size_t size,
uv_write_cb on_done);
int vnc__write2(uv_stream_t* stream, const void* payload, size_t size,
uv_write_cb on_done, void* userdata);
int rfb_pixfmt_from_fourcc(struct rfb_pixel_format* dst, uint32_t src);

View File

@ -42,7 +42,6 @@ inc = include_directories('include', 'contrib/miniz')
sources = [ sources = [
'src/server.c', 'src/server.c',
'src/util.c',
'src/vec.c', 'src/vec.c',
'src/zrle.c', 'src/zrle.c',
'src/raw-encoding.c', 'src/raw-encoding.c',

View File

@ -15,7 +15,6 @@
*/ */
#include "rfb-proto.h" #include "rfb-proto.h"
#include "util.h"
#include "zrle.h" #include "zrle.h"
#include "tight.h" #include "tight.h"
#include "raw-encoding.h" #include "raw-encoding.h"

View File

@ -1,51 +0,0 @@
/*
* Copyright (c) 2019 Andri Yngvason
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include "util.h"
#include <uv.h>
#include <stdlib.h>
#include <unistd.h>
static void on_write_req_done(uv_write_t* req, int status)
{
struct vnc_write_request* self = (struct vnc_write_request*)req;
if (self->on_done)
self->on_done(req, status);
free(self);
}
int vnc__write2(uv_stream_t* stream, const void* payload, size_t size,
uv_write_cb on_done, void* userdata)
{
struct vnc_write_request* req = calloc(1, sizeof(*req));
if (!req)
return -1;
req->buffer.base = (char*)payload;
req->buffer.len = size;
req->on_done = on_done;
req->userdata = userdata;
return uv_write(&req->request, stream, &req->buffer, 1,
on_write_req_done);
}
int vnc__write(uv_stream_t* stream, const void* payload, size_t size,
uv_write_cb on_done)
{
return vnc__write2(stream, payload, size, on_done, NULL);
}

View File

@ -15,7 +15,6 @@
*/ */
#include "rfb-proto.h" #include "rfb-proto.h"
#include "util.h"
#include "vec.h" #include "vec.h"
#include "zrle.h" #include "zrle.h"
#include "miniz.h" #include "miniz.h"