mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
Integrate in/out plugin event struct and add event utils.
This commit is contained in:
@@ -40,13 +40,11 @@ FREERDP_API int freerdp_chanman_pre_connect(rdpChanMan* chan_man, rdpInst* inst)
|
||||
FREERDP_API int freerdp_chanman_post_connect(rdpChanMan* chan_man, rdpInst* inst);
|
||||
FREERDP_API int freerdp_chanman_data(rdpInst* inst, int chan_id, char* data, int data_size,
|
||||
int flags, int total_size);
|
||||
FREERDP_API int freerdp_chanman_send_event(rdpChanMan* chan_man, const char* name, uint32 event,
|
||||
void* data, int data_size);
|
||||
FREERDP_API int freerdp_chanman_send_event(rdpChanMan* chan_man, const char* name, FRDP_EVENT* event);
|
||||
FREERDP_API int freerdp_chanman_get_fds(rdpChanMan* chan_man, rdpInst* inst, void** read_fds,
|
||||
int* read_count, void** write_fds, int* write_count);
|
||||
FREERDP_API int freerdp_chanman_check_fds(rdpChanMan* chan_man, rdpInst* inst);
|
||||
FREERDP_API FRDP_EVENT* freerdp_chanman_pop_event(rdpChanMan* chan_man);
|
||||
FREERDP_API void freerdp_chanman_free_event(rdpChanMan* chan_man, FRDP_EVENT* event);
|
||||
FREERDP_API void freerdp_chanman_close(rdpChanMan* chan_man, rdpInst* inst);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -92,4 +92,14 @@ enum RDP_SVC_CHANNEL_EVENT
|
||||
CHANNEL_EVENT_USER = 1000
|
||||
};
|
||||
|
||||
/**
|
||||
* FreeRDP Event Types
|
||||
*/
|
||||
enum FRDP_EVENT_TYPE
|
||||
{
|
||||
FRDP_EVENT_TYPE_DEBUG = 0,
|
||||
FRDP_EVENT_TYPE_VIDEO_FRAME = 1,
|
||||
FRDP_EVENT_TYPE_REDRAW = 2
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
29
include/freerdp/utils/event.h
Normal file
29
include/freerdp/utils/event.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* Events
|
||||
*
|
||||
* 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 __EVENT_UTILS_H
|
||||
#define __EVENT_UTILS_H
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/constants.h>
|
||||
|
||||
FRDP_EVENT* freerdp_event_new(uint32 event_type, FRDP_EVENT_CALLBACK callback, void* user_data);
|
||||
void freerdp_event_free(FRDP_EVENT* event);
|
||||
|
||||
#endif
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <freerdp/svc.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
|
||||
typedef struct rdp_svc_plugin_private rdpSvcPluginPrivate;
|
||||
typedef struct rdp_svc_plugin rdpSvcPlugin;
|
||||
@@ -35,7 +36,7 @@ struct rdp_svc_plugin
|
||||
|
||||
void (*connect_callback)(rdpSvcPlugin* plugin);
|
||||
void (*receive_callback)(rdpSvcPlugin* plugin, STREAM* data_in);
|
||||
void (*event_callback)(rdpSvcPlugin* plugin, void* data, int size);
|
||||
void (*event_callback)(rdpSvcPlugin* plugin, FRDP_EVENT* event);
|
||||
void (*terminate_callback)(rdpSvcPlugin* plugin);
|
||||
|
||||
rdpSvcPluginPrivate* priv;
|
||||
|
||||
Reference in New Issue
Block a user