diff options
author | Nicola Ruggero <nicola@nxnt.org> | 2010-10-26 13:08:28 +0200 |
---|---|---|
committer | Nicola Ruggero <nicola@nxnt.org> | 2010-10-26 13:08:28 +0200 |
commit | 104f762e5d3dcd659415632f442e745cef5a3bf2 (patch) | |
tree | 3fd40b9dfc46904d6e0cb3896f936cf7e0596352 /libxrdp | |
parent | 36ef046e3c5be09798b0f6e7f3492f712d194972 (diff) | |
download | xrdp-proprietary-104f762e5d3dcd659415632f442e745cef5a3bf2.tar.gz xrdp-proprietary-104f762e5d3dcd659415632f442e745cef5a3bf2.zip |
Added bell (pcspeaker) support
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/libxrdp.c | 30 | ||||
-rw-r--r-- | libxrdp/libxrdpinc.h | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 534f838d..0d7a86b1 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -168,6 +168,36 @@ libxrdp_send_palette(struct xrdp_session* session, int* palette) return 0; } +/******************************************************************************/ +int EXPORT_CC +libxrdp_send_bell(struct xrdp_session* session) +{ + struct stream* s = (struct stream *)NULL; + + DEBUG(("libxrdp_send_bell sending bell signal")); + /* see MS documentation: Server play sound PDU, TS_PLAY_SOUND_PDU_DATA */ + + make_stream(s); + init_stream(s, 8192); + + if (xrdp_rdp_init_data((struct xrdp_rdp*)session->rdp, s) != 0) + { + free_stream(s); + return 1; + } + out_uint32_le(s, 440); /* frequency */ + out_uint32_le(s, 100); /* duration (ms) */ + s_mark_end(s); + if (xrdp_rdp_send_data((struct xrdp_rdp*)session->rdp, s, RDP_DATA_PDU_PLAY_SOUND) != 0) + { + free_stream(s); + return 1; + } + free_stream(s); + return 0; +} + + /*****************************************************************************/ int EXPORT_CC libxrdp_send_bitmap(struct xrdp_session* session, int width, int height, diff --git a/libxrdp/libxrdpinc.h b/libxrdp/libxrdpinc.h index 245416c6..258fbb83 100644 --- a/libxrdp/libxrdpinc.h +++ b/libxrdp/libxrdpinc.h @@ -125,6 +125,8 @@ libxrdp_process_data(struct xrdp_session* session); int DEFAULT_CC libxrdp_send_palette(struct xrdp_session* session, int* palette); int DEFAULT_CC +libxrdp_send_bell(struct xrdp_session* session); +int DEFAULT_CC libxrdp_send_bitmap(struct xrdp_session* session, int width, int height, int bpp, char* data, int x, int y, int cx, int cy); int DEFAULT_CC |