2011-09-14 00:30:16 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-09-14 00:30:16 +04:00
|
|
|
* FreeRDP X11 Server
|
|
|
|
*
|
|
|
|
* Copyright 2011 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.
|
|
|
|
*/
|
|
|
|
|
2012-08-15 01:20:53 +04:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2013-04-30 00:37:11 +04:00
|
|
|
#include "xf_interface.h"
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
int main(int argc, char* argv[])
|
2011-09-14 00:30:16 +04:00
|
|
|
{
|
2013-04-30 00:37:11 +04:00
|
|
|
HANDLE thread;
|
2013-04-29 23:38:18 +04:00
|
|
|
xfServer* server;
|
|
|
|
DWORD dwExitCode;
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
freerdp_server_global_init();
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
server = freerdp_server_new(argc, argv);
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
if (!server)
|
|
|
|
return 0;
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
freerdp_server_start(server);
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-30 00:37:11 +04:00
|
|
|
thread = freerdp_server_get_thread(server);
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-30 00:37:11 +04:00
|
|
|
WaitForSingleObject(thread, INFINITE);
|
|
|
|
|
|
|
|
GetExitCodeThread(thread, &dwExitCode);
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
freerdp_server_free(server);
|
2011-09-14 00:30:16 +04:00
|
|
|
|
2013-04-29 23:38:18 +04:00
|
|
|
freerdp_server_global_uninit();
|
2011-09-14 00:30:16 +04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|