Merge pull request #2 from speidy/master

neutrinordp: clean old freerdp moduels, add config, fix for RFX codec to work.
ulab-next
jsorg71 11 years ago
commit 1fb8fd9b97

@ -1,10 +1,5 @@
EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt
if XRDP_FREERDP1
FREERDPDIR = freerdp1
else
FREERDPDIR =
endif
if XRDP_NEUTRINORDP
NEUTRINORDPDIR = neutrinordp
@ -24,7 +19,6 @@ SUBDIRS = \
rdp \
xup \
mc \
$(FREERDPDIR) \
$(NEUTRINORDPDIR) \
libxrdp \
xrdp \

@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.59)
AC_INIT([xrdp], [0.6.0], [xrdp-devel@lists.sourceforge.net])
AC_INIT([xrdp], [0.7.0], [xrdp-devel@lists.sourceforge.net])
AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
AM_INIT_AUTOMAKE([1.6 foreign])
AC_PROG_CC
@ -31,10 +31,6 @@ AC_ARG_ENABLE(xrdpdebug, AS_HELP_STRING([--enable-xrdpdebug],
[Build debug (default: no)]),
[xrdpdebug=true], [xrdpdebug=false])
AM_CONDITIONAL(XRDP_DEBUG, [test x$xrdpdebug = xtrue])
AC_ARG_ENABLE(freerdp1, AS_HELP_STRING([--enable-freerdp1],
[Build freerdp1 module (default: no)]),
[freerdp1=true], [freerdp1=false])
AM_CONDITIONAL(XRDP_FREERDP1, [test x$freerdp1 = xtrue])
AC_ARG_ENABLE(neutrinordp, AS_HELP_STRING([--enable-neutrinordp],
[Build neutrinordp module (default: no)]),
[neutrinordp=true], [neutrinordp=false])
@ -83,8 +79,6 @@ then
AC_DEFINE([USE_NOPAM],1,[Disable PAM])
fi
AS_IF( [test "x$enable_freerdp1" = "xyes"] , [PKG_CHECK_MODULES(FREERDP, freerdp >= 1.0.0)] )
AS_IF( [test "x$enable_neutrinordp" = "xyes"] , [PKG_CHECK_MODULES(FREERDP, freerdp >= 1.0.0)] )
# checking for libjpeg
@ -128,7 +122,6 @@ AC_CONFIG_FILES([Makefile
libxrdp/Makefile
xup/Makefile
mc/Makefile
freerdp1/Makefile
neutrinordp/Makefile
xrdp/Makefile
sesman/Makefile
@ -141,8 +134,8 @@ AC_CONFIG_FILES([Makefile
docs/man/Makefile
instfiles/Makefile
instfiles/pam.d/Makefile
instfiles/init.d/Makefile
instfiles/default/Makefile
instfiles/init.d/Makefile
instfiles/default/Makefile
genkeymap/Makefile
xrdpapi/Makefile
xrdpvr/Makefile

@ -1,20 +0,0 @@
EXTRA_DIST = xrdp-freerdp.h
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\"
INCLUDES = \
-I$(top_srcdir)/common \
$(FREERDP_CFLAGS)
lib_LTLIBRARIES = \
libxrdpfreerdp.la
libxrdpfreerdp_la_SOURCES = xrdp-freerdp.c xrdp-color.c
libxrdpfreerdp_la_LIBADD = \
$(top_builddir)/common/libcommon.la \
$(FREERDP_LIBS)

@ -1,314 +0,0 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2012
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* freerdp wrapper
*/
#include "xrdp-freerdp.h"
char *APP_CC
convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
int width, int height, int *palette)
{
char *out;
char *src;
char *dst;
int i;
int j;
int red;
int green;
int blue;
int pixel;
if ((in_bpp == 8) && (out_bpp == 8))
{
out = (char *)g_malloc(width * height, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR8(red, green, blue);
*dst = pixel;
src++;
dst++;
}
}
return out;
}
if ((in_bpp == 8) && (out_bpp == 16))
{
out = (char *)g_malloc(width * height * 2, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
*((tui16 *)dst) = pixel;
src++;
dst += 2;
}
}
return out;
}
if ((in_bpp == 8) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src++;
dst += 4;
}
}
return out;
}
if ((in_bpp == 15) && (out_bpp == 16))
{
out = (char *)g_malloc(width * height * 2, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
*((tui16 *)dst) = pixel;
src += 2;
dst += 2;
}
}
return out;
}
if ((in_bpp == 15) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src += 2;
dst += 4;
}
}
return out;
}
if ((in_bpp == 16) && (out_bpp == 16))
{
return bmpdata;
}
if ((in_bpp == 16) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR16(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src += 2;
dst += 4;
}
}
return out;
}
if ((in_bpp == 24) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
blue = *((tui8 *)src);
src++;
green = *((tui8 *)src);
src++;
red = *((tui8 *)src);
src++;
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
dst += 4;
}
}
return out;
}
if ((in_bpp == 32) && (out_bpp == 24))
{
return bmpdata;
}
if ((in_bpp == 32) && (out_bpp == 32))
{
return bmpdata;
}
if ((in_bpp == 15) && (out_bpp == 15))
{
return bmpdata;
}
g_writeln("convert_bitmap: error unknown conversion from %d to %d",
in_bpp, out_bpp);
return 0;
}
/*****************************************************************************/
/* returns color or 0 */
int APP_CC
convert_color(int in_bpp, int out_bpp, int in_color, int *palette)
{
int pixel;
int red;
int green;
int blue;
if ((in_bpp == 1) && (out_bpp == 24))
{
pixel = in_color == 0 ? 0 : 0xffffff;
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 8))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR8(red, green, blue);
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 16))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 24))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 15) && (out_bpp == 16))
{
pixel = in_color;
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
return pixel;
}
if ((in_bpp == 15) && (out_bpp == 24))
{
pixel = in_color;
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 16) && (out_bpp == 16))
{
return in_color;
}
if ((in_bpp == 16) && (out_bpp == 24))
{
pixel = in_color;
SPLITCOLOR16(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 24) && (out_bpp == 24))
{
return in_color;
}
if ((in_bpp == 32) && (out_bpp == 24))
{
return in_color;
}
if ((in_bpp == 32) && (out_bpp == 32))
{
return in_color;
}
if ((in_bpp == 15) && (out_bpp == 15))
{
return in_color;
}
g_writeln("convert_color: error unknown conversion from %d to %d",
in_bpp, out_bpp);
return 0;
}

@ -1,28 +0,0 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2012
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __XRDP_COLOR_H
#define __XRDP_COLOR_H
char* APP_CC
convert_bitmap(int in_bpp, int out_bpp, char* bmpdata,
int width, int height, int* palette);
int APP_CC
convert_color(int in_bpp, int out_bpp, int in_color, int* palette);
#endif

File diff suppressed because it is too large Load Diff

@ -1,105 +0,0 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2012
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* freerdp wrapper
*/
/* include other h files */
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
#include "defines.h"
/* this is the freerdp main header */
#include <freerdp/freerdp.h>
#define CURRENT_MOD_VER 2
struct mod
{
int size; /* size of this struct */
int version; /* internal version */
/* client functions */
int (*mod_start)(struct mod* v, int w, int h, int bpp);
int (*mod_connect)(struct mod* v);
int (*mod_event)(struct mod* v, int msg, long param1, long param2,
long param3, long param4);
int (*mod_signal)(struct mod* v);
int (*mod_end)(struct mod* v);
int (*mod_set_param)(struct mod* v, char* name, char* value);
int (*mod_session_change)(struct mod* v, int, int);
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout);
int (*mod_check_wait_objs)(struct mod* v);
long mod_dumby[100 - 9]; /* align, 100 minus the number of mod
functions above */
/* server functions */
int (*server_begin_update)(struct mod* v);
int (*server_end_update)(struct mod* v);
int (*server_fill_rect)(struct mod* v, int x, int y, int cx, int cy);
int (*server_screen_blt)(struct mod* v, int x, int y, int cx, int cy,
int srcx, int srcy);
int (*server_paint_rect)(struct mod* v, int x, int y, int cx, int cy,
char* data, int width, int height, int srcx, int srcy);
int (*server_set_cursor)(struct mod* v, int x, int y, char* data, char* mask);
int (*server_palette)(struct mod* v, int* palette);
int (*server_msg)(struct mod* v, char* msg, int code);
int (*server_is_term)(struct mod* v);
int (*server_set_clip)(struct mod* v, int x, int y, int cx, int cy);
int (*server_reset_clip)(struct mod* v);
int (*server_set_fgcolor)(struct mod* v, int fgcolor);
int (*server_set_bgcolor)(struct mod* v, int bgcolor);
int (*server_set_opcode)(struct mod* v, int opcode);
int (*server_set_mixmode)(struct mod* v, int mixmode);
int (*server_set_brush)(struct mod* v, int x_orgin, int y_orgin,
int style, char* pattern);
int (*server_set_pen)(struct mod* v, int style,
int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2);
int (*server_add_char)(struct mod* v, int font, int charactor,
int offset, int baseline,
int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font,
int flags, int mixmode, int clip_left, int clip_top,
int clip_right, int clip_bottom,
int box_left, int box_top,
int box_right, int box_bottom,
int x, int y, char* data, int data_len);
int (*server_reset)(struct mod* v, int width, int height, int bpp);
int (*server_query_channel)(struct mod* v, int index,
char* channel_name,
int* channel_flags);
int (*server_get_channel_id)(struct mod* v, char* name);
int (*server_send_to_channel)(struct mod* v, int channel_id,
char* data, int data_len,
int total_data_len, int flags);
int (*server_bell_trigger)(struct mod* v);
long server_dumby[100 - 25]; /* align, 100 minus the number of server
functions above */
/* common */
tbus handle; /* pointer to self as long */
tbus wm;
tbus painter;
int sck;
/* mod data */
int width;
int height;
int bpp;
struct rdp_set* settings;
struct rdp_inst* inst;
int cmap[256];
};

@ -1,28 +0,0 @@
EXTRA_DIST = xrdp-freerdp.h
EXTRA_DEFINES =
if XRDP_DEBUG
EXTRA_DEFINES += -DXRDP_DEBUG
else
EXTRA_DEFINES += -DXRDP_NODEBUG
endif
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES)
INCLUDES = \
-I$(top_srcdir)/common \
$(FREERDP_CFLAGS)
lib_LTLIBRARIES = \
libxrdpfreerdp1.la
libxrdpfreerdp1_la_SOURCES = xrdp-freerdp.c xrdp-color.c
libxrdpfreerdp1_la_LIBADD = \
$(top_builddir)/common/libcommon.la \
$(FREERDP_LIBS)

@ -1,313 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Server
* freerdp wrapper
*
* Copyright 2011-2012 Jay Sorg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "xrdp-freerdp.h"
char *APP_CC
convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
int width, int height, int *palette)
{
char *out;
char *src;
char *dst;
int i;
int j;
int red;
int green;
int blue;
int pixel;
if ((in_bpp == 8) && (out_bpp == 8))
{
out = (char *)g_malloc(width * height, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR8(red, green, blue);
*dst = pixel;
src++;
dst++;
}
}
return out;
}
if ((in_bpp == 8) && (out_bpp == 16))
{
out = (char *)g_malloc(width * height * 2, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
*((tui16 *)dst) = pixel;
src++;
dst += 2;
}
}
return out;
}
if ((in_bpp == 8) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui8 *)src);
pixel = palette[pixel];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src++;
dst += 4;
}
}
return out;
}
if ((in_bpp == 15) && (out_bpp == 16))
{
out = (char *)g_malloc(width * height * 2, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
*((tui16 *)dst) = pixel;
src += 2;
dst += 2;
}
}
return out;
}
if ((in_bpp == 15) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src += 2;
dst += 4;
}
}
return out;
}
if ((in_bpp == 15) && (out_bpp == 15))
{
return bmpdata;
}
if ((in_bpp == 16) && (out_bpp == 16))
{
return bmpdata;
}
if ((in_bpp == 16) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
pixel = *((tui16 *)src);
SPLITCOLOR16(red, green, blue, pixel);
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
src += 2;
dst += 4;
}
}
return out;
}
if ((in_bpp == 24) && (out_bpp == 24))
{
out = (char *)g_malloc(width * height * 4, 0);
src = bmpdata;
dst = out;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
blue = *((tui8 *)src);
src++;
green = *((tui8 *)src);
src++;
red = *((tui8 *)src);
src++;
pixel = COLOR24RGB(red, green, blue);
*((tui32 *)dst) = pixel;
dst += 4;
}
}
return out;
}
if ((in_bpp == 32) && (out_bpp == 24))
{
return bmpdata;
}
if ((in_bpp == 32) && (out_bpp == 32))
{
return bmpdata;
}
g_writeln("convert_bitmap: error unknown conversion from %d to %d",
in_bpp, out_bpp);
return 0;
}
/*****************************************************************************/
/* returns color or 0 */
int APP_CC
convert_color(int in_bpp, int out_bpp, int in_color, int *palette)
{
int pixel;
int red;
int green;
int blue;
if ((in_bpp == 1) && (out_bpp == 24))
{
pixel = in_color == 0 ? 0 : 0xffffff;
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 8))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR8(red, green, blue);
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 16))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
return pixel;
}
if ((in_bpp == 8) && (out_bpp == 24))
{
pixel = palette[in_color];
SPLITCOLOR32(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 15) && (out_bpp == 16))
{
pixel = in_color;
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR16(red, green, blue);
return pixel;
}
if ((in_bpp == 15) && (out_bpp == 24))
{
pixel = in_color;
SPLITCOLOR15(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 15) && (out_bpp == 15))
{
return in_color;
}
if ((in_bpp == 16) && (out_bpp == 16))
{
return in_color;
}
if ((in_bpp == 16) && (out_bpp == 24))
{
pixel = in_color;
SPLITCOLOR16(red, green, blue, pixel);
pixel = COLOR24BGR(red, green, blue);
return pixel;
}
if ((in_bpp == 24) && (out_bpp == 24))
{
return in_color;
}
if ((in_bpp == 32) && (out_bpp == 24))
{
return in_color;
}
if ((in_bpp == 32) && (out_bpp == 32))
{
return in_color;
}
g_writeln("convert_color: error unknown conversion from %d to %d",
in_bpp, out_bpp);
return 0;
}

@ -1,29 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Server
* freerdp wrapper
*
* Copyright 2011-2012 Jay Sorg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __XRDP_COLOR_H
#define __XRDP_COLOR_H
char* APP_CC
convert_bitmap(int in_bpp, int out_bpp, char* bmpdata,
int width, int height, int* palette);
int APP_CC
convert_color(int in_bpp, int out_bpp, int in_color, int* palette);
#endif

File diff suppressed because it is too large Load Diff

@ -1,180 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Server
* freerdp wrapper
*
* Copyright 2011-2012 Jay Sorg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* include other h files */
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
#include "defines.h"
#include "xrdp_rail.h"
#include "xrdp_client_info.h"
/* this is the freerdp main header */
#include <freerdp/freerdp.h>
#include <freerdp/rail.h>
#include <freerdp/rail/rail.h>
#include <freerdp/codec/bitmap.h>
//#include <freerdp/utils/memory.h>
//#include "/home/jay/git/jsorg71/staging/include/freerdp/freerdp.h"
struct bitmap_item
{
int width;
int height;
char* data;
};
struct brush_item
{
int bpp;
int width;
int height;
char* data;
char b8x8[8];
};
struct pointer_item
{
int hotx;
int hoty;
char data[32 * 32 * 3];
char mask[32 * 32 / 8];
};
#define CURRENT_MOD_VER 2
struct mod
{
int size; /* size of this struct */
int version; /* internal version */
/* client functions */
int (*mod_start)(struct mod* v, int w, int h, int bpp);
int (*mod_connect)(struct mod* v);
int (*mod_event)(struct mod* v, int msg, long param1, long param2,
long param3, long param4);
int (*mod_signal)(struct mod* v);
int (*mod_end)(struct mod* v);
int (*mod_set_param)(struct mod* v, char* name, char* value);
int (*mod_session_change)(struct mod* v, int, int);
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout);
int (*mod_check_wait_objs)(struct mod* v);
long mod_dumby[100 - 9]; /* align, 100 minus the number of mod
functions above */
/* server functions */
int (*server_begin_update)(struct mod* v);
int (*server_end_update)(struct mod* v);
int (*server_fill_rect)(struct mod* v, int x, int y, int cx, int cy);
int (*server_screen_blt)(struct mod* v, int x, int y, int cx, int cy,
int srcx, int srcy);
int (*server_paint_rect)(struct mod* v, int x, int y, int cx, int cy,
char* data, int width, int height, int srcx, int srcy);
int (*server_set_pointer)(struct mod* v, int x, int y, char* data, char* mask);
int (*server_palette)(struct mod* v, int* palette);
int (*server_msg)(struct mod* v, char* msg, int code);
int (*server_is_term)(struct mod* v);
int (*server_set_clip)(struct mod* v, int x, int y, int cx, int cy);
int (*server_reset_clip)(struct mod* v);
int (*server_set_fgcolor)(struct mod* v, int fgcolor);
int (*server_set_bgcolor)(struct mod* v, int bgcolor);
int (*server_set_opcode)(struct mod* v, int opcode);
int (*server_set_mixmode)(struct mod* v, int mixmode);
int (*server_set_brush)(struct mod* v, int x_orgin, int y_orgin,
int style, char* pattern);
int (*server_set_pen)(struct mod* v, int style,
int width);
int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2);
int (*server_add_char)(struct mod* v, int font, int charactor,
int offset, int baseline,
int width, int height, char* data);
int (*server_draw_text)(struct mod* v, int font,
int flags, int mixmode, int clip_left, int clip_top,
int clip_right, int clip_bottom,
int box_left, int box_top,
int box_right, int box_bottom,
int x, int y, char* data, int data_len);
int (*server_reset)(struct mod* v, int width, int height, int bpp);
int (*server_query_channel)(struct mod* v, int index,
char* channel_name,
int* channel_flags);
int (*server_get_channel_id)(struct mod* v, char* name);
int (*server_send_to_channel)(struct mod* v, int channel_id,
char* data, int data_len,
int total_data_len, int flags);
int (*server_bell_trigger)(struct mod* v);
/* off screen bitmaps */
int (*server_create_os_surface)(struct mod* v, int rdpindex,
int width, int height);
int (*server_switch_os_surface)(struct mod* v, int rdpindex);
int (*server_delete_os_surface)(struct mod* v, int rdpindex);
int (*server_paint_rect_os)(struct mod* mod, int x, int y,
int cx, int cy,
int rdpindex, int srcx, int srcy);
int (*server_set_hints)(struct mod* mod, int hints, int mask);
/* rail */
int (*server_window_new_update)(struct mod* mod, int window_id,
struct rail_window_state_order* window_state,
int flags);
int (*server_window_delete)(struct mod* mod, int window_id);
int (*server_window_icon)(struct mod* mod,
int window_id, int cache_entry, int cache_id,
struct rail_icon_info* icon_info,
int flags);
int (*server_window_cached_icon)(struct mod* mod,
int window_id, int cache_entry,
int cache_id, int flags);
int (*server_notify_new_update)(struct mod* mod,
int window_id, int notify_id,
struct rail_notify_state_order* notify_state,
int flags);
int (*server_notify_delete)(struct mod* mod, int window_id,
int notify_id);
int (*server_monitored_desktop)(struct mod* mod,
struct rail_monitored_desktop_order* mdo,
int flags);
long server_dumby[100 - 37]; /* align, 100 minus the number of server
functions above */
/* common */
tbus handle; /* pointer to self as long */
tbus wm;
tbus painter;
int sck;
/* mod data */
int width;
int height;
int bpp;
int colormap[256];
char* chan_buf;
int chan_buf_valid;
int chan_buf_bytes;
int vmaj;
int vmin;
int vrev;
char username[256];
char password[256];
struct xrdp_client_info client_info;
struct rdp_freerdp* inst;
struct bitmap_item bitmap_cache[4][4096];
struct brush_item brush_cache[64];
struct pointer_item pointer_cache[32];
};

@ -11,8 +11,8 @@ else
EXTRA_DEFINES += -DXRDP_NODEBUG
endif
if XRDP_FREERDP1
EXTRA_DEFINES += -DXRDP_FREERDP1
if XRDP_NEUTRINORDP
EXTRA_DEFINES += -DXRDP_NEUTRINORDP
EXTRA_LIBS += $(FREERDP_LIBS)
endif

@ -20,7 +20,7 @@
#include "libxrdp.h"
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
#include <freerdp/codec/rfx.h>
#endif
@ -2248,7 +2248,7 @@ xrdp_orders_send_as_jpeg(struct xrdp_orders *self,
return 1;
}
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
/* secondary drawing order (bitmap v3) using remotefx compression */
static int APP_CC
@ -2326,7 +2326,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
struct stream *xr_s; /* xrdp stream */
struct stream *temp_s; /* xrdp stream */
struct xrdp_client_info *ci;
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
STREAM *fr_s; /* FreeRDP stream */
RFX_CONTEXT *context;
RFX_RECT rect;
@ -2341,7 +2341,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
if (ci->v3_codec_id == ci->rfx_codec_id)
{
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
if (!xrdp_orders_send_as_rfx(self, width, height, bpp, hints))
{

@ -21,7 +21,7 @@
#include "libxrdp.h"
#include "log.h"
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
#include <freerdp/codec/rfx.h>
#endif
@ -146,7 +146,7 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info)
return 0;
}
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
static void
cpuid(tui32 info, tui32 *eax, tui32 *ebx, tui32 *ecx, tui32 *edx)
@ -227,7 +227,7 @@ xrdp_rdp_create(struct xrdp_session *session, struct trans *trans)
bytes = sizeof(self->client_info.client_ip) - 1;
g_write_ip_address(trans->sck, self->client_info.client_ip, bytes);
self->mppc_enc = mppc_enc_new(PROTO_RDP_50);
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
self->rfx_enc = rfx_context_new();
rfx_context_set_cpu_opt(self->rfx_enc, xrdp_rdp_detect_cpu());
#endif
@ -247,7 +247,7 @@ xrdp_rdp_delete(struct xrdp_rdp *self)
xrdp_sec_delete(self->sec_layer);
mppc_enc_free(self->mppc_enc);
#if defined(XRDP_FREERDP1)
#if defined(XRDP_NEUTRINORDP)
rfx_context_free((RFX_CONTEXT *)(self->rfx_enc));
#endif
g_free(self);

@ -112,8 +112,8 @@ ip=ask
port=ask3389
[xrdp7]
name=freerdp-any
lib=libxrdpfreerdp1.so
name=neutrinordp-any
lib=libxrdpneutrinordp.so
ip=ask
port=ask3389
username=ask

Loading…
Cancel
Save