2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2014-06-03 09:00:51 +04:00
|
|
|
* Copyright (C) Jay Sorg 2004-2014
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* header file for use with libxrdp.so / xrdp.dll
|
|
|
|
*/
|
2005-06-28 07:11:35 +04:00
|
|
|
|
2010-11-03 18:59:26 +03:00
|
|
|
#ifndef LIBXRDPINC_H
|
2005-06-28 07:11:35 +04:00
|
|
|
#define LIBXRDPINC_H
|
|
|
|
|
2012-06-25 05:10:49 +04:00
|
|
|
#include "xrdp_rail.h"
|
|
|
|
|
2012-05-14 00:56:15 +04:00
|
|
|
/* struct xrdp_client_info moved to xrdp_client_info.h */
|
2005-06-28 07:11:35 +04:00
|
|
|
|
|
|
|
struct xrdp_brush
|
|
|
|
{
|
2016-05-03 23:07:13 +03:00
|
|
|
int x_origin;
|
|
|
|
int y_origin;
|
2014-06-03 09:00:51 +04:00
|
|
|
int style;
|
|
|
|
char pattern[8];
|
2005-06-28 07:11:35 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct xrdp_pen
|
|
|
|
{
|
2014-06-03 09:00:51 +04:00
|
|
|
int style;
|
|
|
|
int width;
|
|
|
|
int color;
|
2005-06-28 07:11:35 +04:00
|
|
|
};
|
|
|
|
|
2013-07-04 02:57:00 +04:00
|
|
|
/* 2.2.2.2.1.2.5.1 Cache Glyph Data (TS_CACHE_GLYPH_DATA) */
|
2005-06-28 07:11:35 +04:00
|
|
|
struct xrdp_font_char
|
|
|
|
{
|
2014-06-03 09:00:51 +04:00
|
|
|
int offset; /* x */
|
|
|
|
int baseline; /* y */
|
|
|
|
int width; /* cx */
|
|
|
|
int height; /* cy */
|
|
|
|
int incby;
|
|
|
|
int bpp;
|
|
|
|
char *data;
|
2005-06-28 07:11:35 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct xrdp_rect
|
|
|
|
{
|
2014-06-03 09:00:51 +04:00
|
|
|
int left;
|
|
|
|
int top;
|
|
|
|
int right;
|
|
|
|
int bottom;
|
2005-06-28 07:11:35 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct xrdp_session
|
|
|
|
{
|
2014-06-03 09:00:51 +04:00
|
|
|
tintptr id;
|
|
|
|
struct trans *trans;
|
2017-02-02 08:42:37 +03:00
|
|
|
int (*callback)(intptr_t id, int msg, intptr_t param1, intptr_t param2,
|
|
|
|
intptr_t param3, intptr_t param4);
|
2014-06-03 09:00:51 +04:00
|
|
|
void *rdp;
|
|
|
|
void *orders;
|
|
|
|
struct xrdp_client_info *client_info;
|
|
|
|
int up_and_running;
|
|
|
|
int (*is_term)(void);
|
|
|
|
int in_process_data; /* inc / dec libxrdp_process_data calls */
|
2015-07-06 09:14:46 +03:00
|
|
|
|
|
|
|
struct source_info si;
|
2005-06-28 07:11:35 +04:00
|
|
|
};
|
|
|
|
|
2017-03-12 19:35:00 +03:00
|
|
|
struct xrdp_session *
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_init(tbus id, struct trans *trans);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_exit(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_disconnect(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2016-02-14 07:41:07 +03:00
|
|
|
libxrdp_process_incoming(struct xrdp_session *session);
|
2014-03-05 06:11:55 +04:00
|
|
|
int EXPORT_CC
|
|
|
|
libxrdp_get_pdu_bytes(const char *aheader);
|
2017-03-12 19:35:00 +03:00
|
|
|
struct stream *
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_force_read(struct trans *trans);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_process_data(struct xrdp_session *session, struct stream *s);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_send_palette(struct xrdp_session *session, int *palette);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_send_bell(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_send_bitmap(struct xrdp_session *session, int width, int height,
|
|
|
|
int bpp, char *data, int x, int y, int cx, int cy);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
|
|
|
|
char *data, char *mask, int x, int y, int bpp);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_set_pointer(struct xrdp_session *session, int cache_idx);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_init(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_force_send(struct xrdp_session *session);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_rect(struct xrdp_session *session, int x, int y,
|
|
|
|
int cx, int cy, int color, struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_screen_blt(struct xrdp_session *session, int x, int y,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cx, int cy, int srcx, int srcy,
|
2014-06-03 09:00:51 +04:00
|
|
|
int rop, struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_pat_blt(struct xrdp_session *session, int x, int y,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cx, int cy, int rop, int bg_color,
|
2014-06-03 09:00:51 +04:00
|
|
|
int fg_color, struct xrdp_brush *brush,
|
|
|
|
struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_dest_blt(struct xrdp_session *session, int x, int y,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cx, int cy, int rop,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_line(struct xrdp_session *session, int mix_mode,
|
2005-06-28 07:11:35 +04:00
|
|
|
int startx, int starty,
|
|
|
|
int endx, int endy, int rop, int bg_color,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct xrdp_pen *pen,
|
|
|
|
struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_mem_blt(struct xrdp_session *session, int cache_id,
|
2005-06-28 07:11:35 +04:00
|
|
|
int color_table, int x, int y, int cx, int cy,
|
|
|
|
int rop, int srcx, int srcy,
|
2014-06-03 09:00:51 +04:00
|
|
|
int cache_idx, struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_composite_blt(struct xrdp_session *session, int srcidx,
|
2013-07-07 08:03:58 +04:00
|
|
|
int srcformat, int srcwidth, int srcrepeat,
|
2014-06-03 09:00:51 +04:00
|
|
|
int *srctransform, int mskflags,
|
2013-07-07 08:03:58 +04:00
|
|
|
int mskidx, int mskformat, int mskwidth,
|
|
|
|
int mskrepeat, int op, int srcx, int srcy,
|
|
|
|
int mskx, int msky, int dstx, int dsty,
|
|
|
|
int width, int height, int dstformat,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct xrdp_rect *rect);
|
2013-07-07 08:03:58 +04:00
|
|
|
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_text(struct xrdp_session *session,
|
2005-06-28 07:11:35 +04:00
|
|
|
int font, int flags, int mixmode,
|
|
|
|
int fg_color, int bg_color,
|
|
|
|
int clip_left, int clip_top,
|
|
|
|
int clip_right, int clip_bottom,
|
|
|
|
int box_left, int box_top,
|
|
|
|
int box_right, int box_bottom,
|
2014-06-03 09:00:51 +04:00
|
|
|
int x, int y, char *data, int data_len,
|
|
|
|
struct xrdp_rect *rect);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_palette(struct xrdp_session *session, int *palette,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cache_id);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_raw_bitmap(struct xrdp_session *session,
|
|
|
|
int width, int height, int bpp, char *data,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cache_id, int cache_idx);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_bitmap(struct xrdp_session *session,
|
|
|
|
int width, int height, int bpp, char *data,
|
2005-06-28 07:11:35 +04:00
|
|
|
int cache_id, int cache_idx);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_font(struct xrdp_session *session,
|
|
|
|
struct xrdp_font_char *font_char,
|
2005-06-28 07:11:35 +04:00
|
|
|
int font_index, int char_index);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_reset(struct xrdp_session *session,
|
2005-08-24 05:09:33 +04:00
|
|
|
int width, int height, int bpp);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_raw_bitmap2(struct xrdp_session *session,
|
|
|
|
int width, int height, int bpp, char *data,
|
2006-03-17 04:10:24 +03:00
|
|
|
int cache_id, int cache_idx);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_bitmap2(struct xrdp_session *session,
|
|
|
|
int width, int height, int bpp, char *data,
|
2012-05-21 21:38:32 +04:00
|
|
|
int cache_id, int cache_idx, int hints);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_bitmap3(struct xrdp_session *session,
|
|
|
|
int width, int height, int bpp, char *data,
|
2012-07-18 02:24:11 +04:00
|
|
|
int cache_id, int cache_idx, int hints);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_query_channel(struct xrdp_session *session, int index,
|
|
|
|
char *channel_name, int *channel_flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2016-06-22 02:30:17 +03:00
|
|
|
libxrdp_get_channel_id(struct xrdp_session *session, const char *name);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_send_to_channel(struct xrdp_session *session, int channel_id,
|
|
|
|
char *data, int data_len,
|
2008-12-16 05:18:36 +03:00
|
|
|
int total_data_len, int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_brush(struct xrdp_session *session,
|
2008-06-24 09:43:10 +04:00
|
|
|
int width, int height, int bpp, int type,
|
2014-06-03 09:00:51 +04:00
|
|
|
int size, char *data, int cache_id);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_create_os_surface(struct xrdp_session *session, int id,
|
2012-05-22 19:27:09 +04:00
|
|
|
int width, int height,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct list *del_list);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_orders_send_switch_os_surface(struct xrdp_session *session, int id);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_window_new_update(struct xrdp_session *session, int window_id,
|
|
|
|
struct rail_window_state_order *window_state,
|
2012-06-25 05:10:49 +04:00
|
|
|
int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_window_delete(struct xrdp_session *session, int window_id);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_window_icon(struct xrdp_session *session, int window_id,
|
2012-06-25 05:10:49 +04:00
|
|
|
int cache_entry, int cache_id,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct rail_icon_info *icon_info, int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_window_cached_icon(struct xrdp_session *session, int window_id,
|
2012-06-25 05:10:49 +04:00
|
|
|
int cache_entry, int cache_id,
|
|
|
|
int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_notify_new_update(struct xrdp_session *session,
|
2012-06-25 05:10:49 +04:00
|
|
|
int window_id, int notify_id,
|
2014-06-03 09:00:51 +04:00
|
|
|
struct rail_notify_state_order *notify_state,
|
2012-06-25 05:10:49 +04:00
|
|
|
int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_notify_delete(struct xrdp_session *session,
|
2012-06-25 05:10:49 +04:00
|
|
|
int window_id, int notify_id);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-06-03 09:00:51 +04:00
|
|
|
libxrdp_monitored_desktop(struct xrdp_session *session,
|
|
|
|
struct rail_monitored_desktop_order *mdo,
|
2012-06-25 05:10:49 +04:00
|
|
|
int flags);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-03-17 02:54:13 +04:00
|
|
|
libxrdp_codec_jpeg_compress(struct xrdp_session *session,
|
|
|
|
int format, char *inp_data,
|
|
|
|
int width, int height,
|
|
|
|
int stride, int x, int y,
|
|
|
|
int cx, int cy, int quality,
|
|
|
|
char *out_data, int *io_len);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2014-03-18 11:07:11 +04:00
|
|
|
libxrdp_fastpath_send_surface(struct xrdp_session *session,
|
2014-06-03 09:00:51 +04:00
|
|
|
char *data_pad, int pad_bytes,
|
2014-03-18 11:07:11 +04:00
|
|
|
int data_bytes,
|
|
|
|
int destLeft, int dst_Top,
|
|
|
|
int destRight, int destBottom, int bpp,
|
|
|
|
int codecID, int width, int height);
|
2015-03-29 04:34:25 +03:00
|
|
|
int EXPORT_CC
|
|
|
|
libxrdp_fastpath_send_frame_marker(struct xrdp_session *session,
|
|
|
|
int frame_action, int frame_id);
|
2016-07-18 09:28:37 +03:00
|
|
|
int EXPORT_CC
|
|
|
|
libxrdp_send_session_info(struct xrdp_session *session, const char *data,
|
|
|
|
int data_bytes);
|
2005-06-28 07:11:35 +04:00
|
|
|
|
|
|
|
#endif
|