add a login callback

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

@ -32,6 +32,7 @@
#include <directfb.h> #include <directfb.h>
#include <pthread.h> #include <pthread.h>
#include "uimain.h" #include "uimain.h"
#include "bsops.h"
extern char g_username[]; extern char g_username[];
extern char g_hostname[]; extern char g_hostname[];
@ -89,6 +90,8 @@ static int g_trans_colour = 0;
//static IDirectFBDataBuffer * g_buffer = 0; //static IDirectFBDataBuffer * g_buffer = 0;
//static IDirectFBImageProvider * g_provider = 0; //static IDirectFBImageProvider * g_provider = 0;
void (* master_callback)(int msg, int param1, int param2) = 0;
/*****************************************************************************/ /*****************************************************************************/
void void
mi_error(char * msg) mi_error(char * msg)
@ -115,8 +118,11 @@ mi_read_keyboard_state(void)
int int
mi_create_window(void) mi_create_window(void)
{ {
g_primary->SetColor(g_primary, 0, 0, 0, 0xff); if (!g_no_draw)
g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height); {
g_primary->SetColor(g_primary, 0, 0, 0, 0xff);
g_primary->FillRectangle(g_primary, 0, 0, g_width, g_height);
}
return 1; 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 static void
out_params(void) out_params(void)
@ -868,3 +884,11 @@ librdesktop_quit(void)
{ {
return 1; 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 # these are for phillips stb compiling
#-mips3 #-mips3
INCDIR=/home/j/stb/stb810-SP2/build/staging/usr/local/include/directfb INCDIR=/home/jay/mediamall/SP5/stb810-SP5/build/staging/usr/local/include/directfb
ROOTFS=/home/j/stb/stb810-SP2/build/rootfs ROOTFS=/home/jay/mediamall/SP5/stb810-SP5/build/rootfs
CC = mipsel-linux-gnu-gcc CC = mipsel-linux-gnu-gcc
OBJS = tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o \ 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_setstate(unsigned long id, unsigned int state, unsigned long flags);
void ui_seamless_syncbegin(unsigned long flags); void ui_seamless_syncbegin(unsigned long flags);
void ui_seamless_ack(unsigned int serial); void ui_seamless_ack(unsigned int serial);
void ui_logon(void);
/* lspci.c */ /* lspci.c */
BOOL lspci_init(void); BOOL lspci_init(void);
/* seamless.c */ /* seamless.c */

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

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

Loading…
Cancel
Save