[gnome-remote-desktop] rdp: Move RdpPeerContext struct into its own file
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] rdp: Move RdpPeerContext struct into its own file
- Date: Fri, 3 Sep 2021 09:34:42 +0000 (UTC)
commit afe202132a4d29f8813739432394a54e156129d8
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Mon May 31 13:05:00 2021 +0200
rdp: Move RdpPeerContext struct into its own file
This allows the creation of separate classes for Fast- and Slowpath
PDUs.
src/grd-rdp-private.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
src/grd-session-rdp.c | 21 +--------------------
src/meson.build | 1 +
3 files changed, 48 insertions(+), 20 deletions(-)
---
diff --git a/src/grd-rdp-private.h b/src/grd-rdp-private.h
new file mode 100644
index 0000000..afb0c6f
--- /dev/null
+++ b/src/grd-rdp-private.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2021 Pascal Nowack
+ *
+ * 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.
+ */
+
+#ifndef GRD_RDP_PRIVATE_H
+#define GRD_RDP_PRIVATE_H
+
+#include <freerdp/freerdp.h>
+
+#include "grd-types.h"
+
+typedef struct _RdpPeerContext
+{
+ rdpContext rdp_context;
+
+ GrdSessionRdp *session_rdp;
+
+ uint32_t frame_id;
+ uint16_t planar_flags;
+
+ RFX_CONTEXT *rfx_context;
+ wStream *encode_stream;
+
+ /* Virtual Channel Manager */
+ HANDLE vcm;
+
+ GrdClipboardRdp *clipboard_rdp;
+ GrdRdpGraphicsPipeline *graphics_pipeline;
+} RdpPeerContext;
+
+#endif /* GRD_RDP_PRIVATE_H */
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index 77bcd1f..f4c68ec 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -34,6 +34,7 @@
#include "grd-rdp-event-queue.h"
#include "grd-rdp-graphics-pipeline.h"
#include "grd-rdp-pipewire-stream.h"
+#include "grd-rdp-private.h"
#include "grd-rdp-sam.h"
#include "grd-rdp-server.h"
#include "grd-rdp-surface.h"
@@ -146,26 +147,6 @@ struct _GrdSessionRdp
GrdRdpPipeWireStream *pipewire_stream;
};
-typedef struct _RdpPeerContext
-{
- rdpContext rdp_context;
-
- GrdSessionRdp *session_rdp;
-
- uint32_t frame_id;
-
- RFX_CONTEXT *rfx_context;
- wStream *encode_stream;
-
- uint16_t planar_flags;
-
- /* Virtual Channel Manager */
- HANDLE vcm;
-
- GrdClipboardRdp *clipboard_rdp;
- GrdRdpGraphicsPipeline *graphics_pipeline;
-} RdpPeerContext;
-
G_DEFINE_TYPE (GrdSessionRdp, grd_session_rdp, GRD_TYPE_SESSION);
static gboolean
diff --git a/src/meson.build b/src/meson.build
index 75f1761..e9bcc9f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -50,6 +50,7 @@ if have_rdp
'grd-rdp-graphics-pipeline.h',
'grd-rdp-pipewire-stream.c',
'grd-rdp-pipewire-stream.h',
+ 'grd-rdp-private.h',
'grd-rdp-sam.c',
'grd-rdp-sam.h',
'grd-rdp-server.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]