wfreerdp-server: fixed the build and some stupidity on my part

This commit is contained in:
C-o-r-E 2012-08-14 15:12:44 -04:00
parent bc07443f22
commit 343825221c
3 changed files with 101 additions and 101 deletions

View File

@ -150,7 +150,7 @@ BOOL wf_update_mirror_drv(wfPeerContext* context)
WORD drvExtraSaved;
DEVMODE* deviceMode;
DWORD dmf_devmodewext_magic_sig = 0xDF20C0DE;
_tchar rMsg[64];
TCHAR rMsg[64];
BOOL rturn;
/*
@ -198,31 +198,31 @@ BOOL wf_update_mirror_drv(wfPeerContext* context)
break;
case DISP_CHANGE_BADDUALVIEW:
rMsg = _T("DISP_CHANGE_BADDUALVIEW");
_tcscpy(rMsg, _T("DISP_CHANGE_BADDUALVIEW"));
break;
case DISP_CHANGE_BADFLAGS:
rMsg = _T("DISP_CHANGE_BADFLAGS");
_tcscpy(rMsg, _T("DISP_CHANGE_BADFLAGS"));
break;
case DISP_CHANGE_BADMODE:
rMsg = _T("DISP_CHANGE_BADMODE");
_tcscpy(rMsg, _T("DISP_CHANGE_BADMODE"));
break;
case DISP_CHANGE_BADPARAM:
rMsg = _T("DISP_CHANGE_BADPARAM");
_tcscpy(rMsg, _T("DISP_CHANGE_BADPARAM"));
break;
case DISP_CHANGE_FAILED:
rMsg = _T("DISP_CHANGE_FAILED");
_tcscpy(rMsg, _T("DISP_CHANGE_FAILED"));
break;
case DISP_CHANGE_NOTUPDATED:
rMsg = _T("DISP_CHANGE_NOTUPDATED");
_tcscpy(rMsg, _T("DISP_CHANGE_NOTUPDATED"));
break;
case DISP_CHANGE_RESTART:
rMsg = _T("DISP_CHANGE_RESTART");
_tcscpy(rMsg, _T("DISP_CHANGE_RESTART"));
break;
}

View File

@ -202,7 +202,7 @@ typedef struct
BOOL wf_check_disp_devices(wfPeerContext* context);
BOOL wf_disp_device_set_attatch(wfPeerContext* context, DWORD val);
BOOL wf_update_mirror_drv(wfPeerContext* context)
BOOL wf_update_mirror_drv(wfPeerContext* context);
int wf_mirage_step4(wfPeerContext* context);
#endif /* WF_MIRAGE_H */

View File

@ -1,92 +1,92 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* FreeRDP Windows Server
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* 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 <freerdp/listener.h>
#include "wf_mirage.h"
#include "wf_peer.h"
void wf_peer_context_new(freerdp_peer* client, wfPeerContext* context)
{
wf_mirage_step1(context);
wf_mirage_step2(context);
wf_mirage_step3(context);
wf_mirage_step4(context);
}
void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
{
if (context)
{
}
}
void wf_peer_init(freerdp_peer* client)
{
client->context_size = sizeof(wfPeerContext);
client->ContextNew = (psPeerContextNew) wf_peer_context_new;
client->ContextFree = (psPeerContextFree) wf_peer_context_free;
freerdp_peer_context_new(client);
}
boolean wf_peer_post_connect(freerdp_peer* client)
{
wfPeerContext* context = (wfPeerContext*) client->context;
/**
* This callback is called when the entire connection sequence is done, i.e. we've received the
* Font List PDU from the client and sent out the Font Map PDU.
* The server may start sending graphics output and receiving keyboard/mouse input after this
* callback returns.
*/
printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname,
client->settings->os_major_type, client->settings->os_minor_type);
if (client->settings->autologon)
{
printf(" and wants to login automatically as %s\\%s",
client->settings->domain ? client->settings->domain : "",
client->settings->username);
/* A real server may perform OS login here if NLA is not executed previously. */
}
printf("\n");
printf("Client requested desktop: %dx%dx%d\n",
client->settings->width, client->settings->height, client->settings->color_depth);
return true;
}
boolean wf_peer_activate(freerdp_peer* client)
{
wfPeerContext* context = (wfPeerContext*) client->context;
context->activated = true;
return true;
}
void wf_peer_synchronize_event(rdpInput* input, uint32 flags)
{
}
/**
* FreeRDP: A Remote Desktop Protocol Client
* FreeRDP Windows Server
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* 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 <freerdp/listener.h>
#include "wf_mirage.h"
#include "wf_peer.h"
void wf_peer_context_new(freerdp_peer* client, wfPeerContext* context)
{
wf_check_disp_devices(context);
wf_disp_device_set_attatch(context, 1);
wf_update_mirror_drv(context);
wf_mirage_step4(context);
}
void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
{
if (context)
{
}
}
void wf_peer_init(freerdp_peer* client)
{
client->context_size = sizeof(wfPeerContext);
client->ContextNew = (psPeerContextNew) wf_peer_context_new;
client->ContextFree = (psPeerContextFree) wf_peer_context_free;
freerdp_peer_context_new(client);
}
boolean wf_peer_post_connect(freerdp_peer* client)
{
wfPeerContext* context = (wfPeerContext*) client->context;
/**
* This callback is called when the entire connection sequence is done, i.e. we've received the
* Font List PDU from the client and sent out the Font Map PDU.
* The server may start sending graphics output and receiving keyboard/mouse input after this
* callback returns.
*/
printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname,
client->settings->os_major_type, client->settings->os_minor_type);
if (client->settings->autologon)
{
printf(" and wants to login automatically as %s\\%s",
client->settings->domain ? client->settings->domain : "",
client->settings->username);
/* A real server may perform OS login here if NLA is not executed previously. */
}
printf("\n");
printf("Client requested desktop: %dx%dx%d\n",
client->settings->width, client->settings->height, client->settings->color_depth);
return true;
}
boolean wf_peer_activate(freerdp_peer* client)
{
wfPeerContext* context = (wfPeerContext*) client->context;
context->activated = true;
return true;
}
void wf_peer_synchronize_event(rdpInput* input, uint32 flags)
{
}