Add building channels for Windows and stubs for clipboard reader.

This commit is contained in:
xangis 2012-07-20 14:05:06 -07:00
parent 21c8fc6110
commit c74cae4209
5 changed files with 181 additions and 39 deletions

View File

@ -161,9 +161,7 @@ add_subdirectory(libfreerdp-channels)
add_subdirectory(libfreerdp-locale)
add_subdirectory(libfreerdp-core)
if(NOT WIN32)
add_subdirectory(channels)
endif()
add_subdirectory(channels)
option(WITH_CLIENT "Build client binaries" ON)
if(WITH_CLIENT)

View File

@ -1,36 +1,38 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Windows cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# 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.
add_executable(wfreerdp WIN32
wf_gdi.c
wf_gdi.h
wf_event.c
wf_event.h
wf_graphics.c
wf_graphics.h
wfreerdp.c
wfreerdp.h)
target_link_libraries(wfreerdp freerdp-core)
target_link_libraries(wfreerdp freerdp-gdi)
target_link_libraries(wfreerdp freerdp-utils)
target_link_libraries(wfreerdp freerdp-codec)
target_link_libraries(wfreerdp freerdp-channels)
install(TARGETS wfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Windows cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# 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.
add_executable(wfreerdp WIN32
wf_gdi.c
wf_gdi.h
wf_event.c
wf_event.h
wf_graphics.c
wf_graphics.h
wf_cliprdr.c
wf_cliprdr.h
wfreerdp.c
wfreerdp.h)
target_link_libraries(wfreerdp freerdp-core)
target_link_libraries(wfreerdp freerdp-gdi)
target_link_libraries(wfreerdp freerdp-utils)
target_link_libraries(wfreerdp freerdp-codec)
target_link_libraries(wfreerdp freerdp-channels)
install(TARGETS wfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})

106
client/Windows/wf_cliprdr.c Normal file
View File

@ -0,0 +1,106 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* Windows Clipboard Redirection
*
* Copyright 2012 Jason Champion
*
* 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/utils/event.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/unicode.h>
#include <freerdp/plugins/cliprdr.h>
#include "wf_cliprdr.h"
void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman)
{
}
void wf_cliprdr_uninit(wfInfo* wfi)
{
}
static void wf_cliprdr_process_cb_monitor_ready_event(wfInfo* wfi)
{
}
static void wf_cliprdr_process_cb_data_request_event(wfInfo* wfi, RDP_CB_DATA_REQUEST_EVENT* event)
{
}
static void wf_cliprdr_process_cb_format_list_event(wfInfo* wfi, RDP_CB_FORMAT_LIST_EVENT* event)
{
}
static void wf_cliprdr_process_cb_data_response_event(wfInfo* wfi, RDP_CB_DATA_RESPONSE_EVENT* event)
{
}
void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event)
{
switch (event->event_type)
{
case RDP_EVENT_TYPE_CB_MONITOR_READY:
wf_cliprdr_process_cb_monitor_ready_event(wfi);
break;
case RDP_EVENT_TYPE_CB_FORMAT_LIST:
wf_cliprdr_process_cb_format_list_event(wfi, (RDP_CB_FORMAT_LIST_EVENT*) event);
break;
case RDP_EVENT_TYPE_CB_DATA_REQUEST:
wf_cliprdr_process_cb_data_request_event(wfi, (RDP_CB_DATA_REQUEST_EVENT*) event);
break;
case RDP_EVENT_TYPE_CB_DATA_RESPONSE:
wf_cliprdr_process_cb_data_response_event(wfi, (RDP_CB_DATA_RESPONSE_EVENT*) event);
break;
default:
break;
}
}
boolean wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
return true;
}
boolean wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
return true;
}
boolean wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
return true;
}
boolean wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
return true;
}
void wf_cliprdr_check_owner(wfInfo* wfi)
{
}

View File

@ -0,0 +1,33 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* Windows Clipboard Redirection
*
* Copyright 2012 Jason Champion
*
* 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 __WF_CLIPRDR_H
#define __WF_CLIPRDR_H
#include "wfreerdp.h"
void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman);
void wf_cliprdr_uninit(wfInfo* wfi);
void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event);
boolean wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
boolean wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
boolean wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
boolean wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void wf_cliprdr_check_owner(wfInfo* wfi);
#endif /* __WF_CLIPRDR_H */

View File

@ -41,6 +41,7 @@
#include "wf_gdi.h"
#include "wf_graphics.h"
#include "wf_cliprdr.h"
#include "wfreerdp.h"
@ -383,6 +384,8 @@ boolean wf_post_connect(freerdp* instance)
freerdp_channels_post_connect(instance->context->channels, instance);
wf_cliprdr_init(wfi, instance->context->channels);
return true;
}