add a login callback

ulab-original
jsorg71 18 years ago
parent 3719200baa
commit b610beb4ac

@ -32,6 +32,7 @@
#include <directfb.h>
#include <pthread.h>
#include "uimain.h"
#include "bsops.h"
extern char g_username[];
extern char g_hostname[];
@ -89,6 +90,8 @@ static int g_trans_colour = 0;
//static IDirectFBDataBuffer * g_buffer = 0;
//static IDirectFBImageProvider * g_provider = 0;
void (* master_callback)(int msg, int param1, int param2) = 0;
/*****************************************************************************/
void
mi_error(char * msg)
@ -115,8 +118,11 @@ mi_read_keyboard_state(void)
int
mi_create_window(void)
{
g_primary->SetColor(g_primary, 0, 0, 0, 0xff);
g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height);
if (!g_no_draw)
{
g_primary->SetColor(g_primary, 0, 0, 0, 0xff);
g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height);
}
return 1;
}
@ -627,6 +633,16 @@ mi_set_null_cursor(void)
{
}
/*****************************************************************************/
void
mi_logon(void)
{
if (master_callback != 0)
{
master_callback(1, 0, 0);
}
}
/*****************************************************************************/
static void
out_params(void)
@ -868,3 +884,11 @@ librdesktop_quit(void)
{
return 1;
}
/*****************************************************************************/
int
librdesktop_set_callback(void (* callback)(int, int, int))
{
master_callback = callback;
return 0;
}

@ -4,8 +4,8 @@
# these are for phillips stb compiling
#-mips3
INCDIR=/home/j/stb/stb810-SP2/build/staging/usr/local/include/directfb
ROOTFS=/home/j/stb/stb810-SP2/build/rootfs
INCDIR=/home/jay/mediamall/SP5/stb810-SP5/build/staging/usr/local/include/directfb
ROOTFS=/home/jay/mediamall/SP5/stb810-SP5/build/rootfs
CC = mipsel-linux-gnu-gcc
OBJS = tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o \

@ -294,6 +294,7 @@ void ui_seamless_settitle(unsigned long id, const char *title, unsigned long fla
void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags);
void ui_seamless_syncbegin(unsigned long flags);
void ui_seamless_ack(unsigned int serial);
void ui_logon(void);
/* lspci.c */
BOOL lspci_init(void);
/* seamless.c */

@ -1312,11 +1312,11 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason)
case RDP_DATA_PDU_LOGON:
DEBUG(("Received Logon PDU\n"));
/* User logged on */
ui_logon();
break;
case RDP_DATA_PDU_DISCONNECT:
process_disconnect_pdu(s, ext_disc_reason);
/* We used to return true and disconnect immediately here, but
* Windows Vista sends a disconnect PDU with reason 0 when
* reconnecting to a disconnected session, and MSTSC doesn't

@ -120,6 +120,8 @@ void
mi_set_null_cursor(void);
int
mi_read_keyboard_state(void);
void
mi_logon(void);
/*****************************************************************************/
/* put part of the screen from the backing store to the display */
@ -829,6 +831,13 @@ ui_ellipse(uint8 opcode, uint8 fillmode,
/* not used */
}
/*****************************************************************************/
void
ui_logon(void)
{
mi_logon();
}
/*****************************************************************************/
/* get a 32 byte random */
void

Loading…
Cancel
Save