transport.h
update.c
update.h
+ vchan.c
+ vchan.h
)
add_library(freerdp-core SHARED ${LIBFREERDP_CORE_SRCS})
if (instance != NULL)
{
- rdpRdp* rdp = rdp_new();
+ rdpRdp* rdp = rdp_new(instance);
instance->rdp = (void*) rdp;
instance->input = rdp->input;
instance->update = rdp->update;
}
}
}
+ else if (channelId != MCS_GLOBAL_CHANNEL_ID)
+ {
+ vchan_process(rdp->vchan, s, channelId);
+ }
else
{
rdp_read_share_control_header(s, &pduLength, &pduType, &rdp->settings->pdu_source);
* @return new RDP module
*/
-rdpRdp* rdp_new()
+rdpRdp* rdp_new(freerdp* instance)
{
rdpRdp* rdp;
rdp->update = update_new(rdp);
rdp->nego = nego_new(rdp->transport);
rdp->mcs = mcs_new(rdp->transport);
+ rdp->vchan = vchan_new(instance);
}
return rdp;
input_free(rdp->input);
update_free(rdp->update);
mcs_free(rdp->mcs);
+ vchan_free(rdp->vchan);
xfree(rdp);
}
}
#include "transport.h"
#include "connection.h"
#include "capabilities.h"
+#include "vchan.h"
#include <freerdp/freerdp.h>
#include <freerdp/settings.h>
struct rdp_settings* settings;
struct rdp_registry* registry;
struct rdp_transport* transport;
+ struct rdp_vchan* vchan;
};
void rdp_read_security_header(STREAM* s, uint16* flags);
void rdp_set_blocking_mode(rdpRdp* rdp, boolean blocking);
int rdp_check_fds(rdpRdp* rdp);
-rdpRdp* rdp_new();
+rdpRdp* rdp_new(freerdp* instance);
void rdp_free(rdpRdp* rdp);
#endif /* __RDP_H */
--- /dev/null
+/**
+ * FreeRDP: A Remote Desktop Protocol Client
+ * Virtual Channels
+ *
+ * Copyright 2011 Vic Lee
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <freerdp/freerdp.h>
+#include <freerdp/utils/memory.h>
+#include <freerdp/utils/stream.h>
+
+#include "vchan.h"
+
+void vchan_process(rdpVchan* vchan, STREAM* s, uint16 channel_id)
+{
+ printf("vchan_process\n");
+}
+
+rdpVchan* vchan_new(freerdp* instance)
+{
+ rdpVchan* vchan;
+
+ vchan = xnew(rdpVchan);
+ vchan->instance = instance;
+
+ return vchan;
+}
+
+void vchan_free(rdpVchan* vchan)
+{
+ xfree(vchan);
+}
--- /dev/null
+/**
+ * FreeRDP: A Remote Desktop Protocol Client
+ * Virtual Channels
+ *
+ * Copyright 2011 Vic Lee
+ *
+ * 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 __VCHAN_H
+#define __VCHAN_H
+
+struct rdp_vchan
+{
+ freerdp* instance;
+};
+typedef struct rdp_vchan rdpVchan;
+
+void vchan_process(rdpVchan* vchan, STREAM* s, uint16 channel_id);
+
+rdpVchan* vchan_new(freerdp* instance);
+void vchan_free(rdpVchan* vchan);
+
+#endif /* __VCHAN_H */