Skip to content

Commit

Permalink
Merge pull request #384 from giox069/next
Browse files Browse the repository at this point in the history
Fix rdp_cliprd for freerdp 1.2. Fixes #378 #379
  • Loading branch information
giox069 committed Nov 22, 2014
2 parents 3542008 + 50d314f commit 52b365d
Show file tree
Hide file tree
Showing 8 changed files with 654 additions and 146 deletions.
4 changes: 3 additions & 1 deletion remmina-plugins/rdp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330,
# Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307, USA.
#
# In addition, as a special exception, the copyright holders give
Expand Down Expand Up @@ -49,6 +49,8 @@ set(REMMINA_PLUGIN_RDP_SRCS
rdp_graphics.h
rdp_cliprdr.c
rdp_cliprdr.h
rdp_channels.c
rdp_channels.h
)

add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS})
Expand Down
86 changes: 86 additions & 0 deletions remmina-plugins/rdp/rdp_channels.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2012-2012 Jean-Louis Dupond
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations
* including the two.
* You must obey the GNU General Public License in all respects
* for all of the code used other than OpenSSL. * If you modify
* file(s) with this exception, you may extend this exception to your
* version of the file(s), but you are not obligated to do so. * If you
* do not wish to do so, delete this exception statement from your
* version. * If you delete this exception statement from all source
* files in the program, then also delete it here.
*
*/

#include "rdp_plugin.h"
#include "rdp_cliprdr.h"
#include "rdp_channels.h"

#include <freerdp/freerdp.h>
#include <freerdp/channels/channels.h>
#include <freerdp/client/cliprdr.h>

void remmina_rdp_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e)
{
rfContext* rfi = (rfContext*) context;

if (g_strcmp0(e->name, RDPEI_DVC_CHANNEL_NAME) == 0)
{
g_print("Unimplemented: channel %s connected but we can't use it\n", e->name);
// xfc->rdpei = (RdpeiClientContext*) e->pInterface;
}
else if (g_strcmp0(e->name, TSMF_DVC_CHANNEL_NAME) == 0)
{
g_print("Unimplemented: channel %s connected but we can't use it\n", e->name);
// xf_tsmf_init(xfc, (TsmfClientContext*) e->pInterface);
}
else if (g_strcmp0(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
{
g_print("Unimplemented: channel %s connected but we can't use it\n", e->name);
/*
if (settings->SoftwareGdi)
gdi_graphics_pipeline_init(context->gdi, (RdpgfxClientContext*) e->pInterface);
else
xf_graphics_pipeline_init(xfc, (RdpgfxClientContext*) e->pInterface);
*/
}
else if (g_strcmp0(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
g_print("Unimplemented: channel %s connected but we can't use it\n", e->name);
// xf_rail_init(xfc, (RailClientContext*) e->pInterface);
}
else if (g_strcmp0(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
{
remmina_rdp_cliprdr_init( rfi, (CliprdrClientContext*) e->pInterface);
}
else if (g_strcmp0(e->name, ENCOMSP_SVC_CHANNEL_NAME) == 0)
{
g_print("Unimplemented: channel %s connected but we can't use it\n", e->name);
// xf_encomsp_init(xfc, (EncomspClientContext*) e->pInterface);
}
}

void remmina_rdp_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e)
{

}
56 changes: 56 additions & 0 deletions remmina-plugins/rdp/rdp_channels.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2012-2012 Jean-Louis Dupond
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations
* including the two.
* You must obey the GNU General Public License in all respects
* for all of the code used other than OpenSSL. * If you modify
* file(s) with this exception, you may extend this exception to your
* version of the file(s), but you are not obligated to do so. * If you
* do not wish to do so, delete this exception statement from your
* version. * If you delete this exception statement from all source
* files in the program, then also delete it here.
*
*/


#ifndef __REMMINA_RDP_CHANNELS_H
#define __REMMINA_RDP_CHANNELS_H

#include <freerdp/freerdp.h>
#include <freerdp/client/channels.h>
#include <freerdp/client/rdpei.h>
#include <freerdp/client/tsmf.h>
#include <freerdp/client/rail.h>
#include <freerdp/client/cliprdr.h>
#include <freerdp/client/rdpgfx.h>
#include <freerdp/client/encomsp.h>

G_BEGIN_DECLS

void remmina_rdp_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e);
void remmina_rdp_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e);


G_END_DECLS

#endif
Loading

0 comments on commit 52b365d

Please sign in to comment.