source: trunk/synergy/lib/server/CClientProxy1_1.cpp

Last change on this file was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 1.7 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 *
5 * This package is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * found in the file COPYING that should have accompanied this file.
8 *
9 * This package is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#include "CClientProxy1_1.h"
16#include "CProtocolUtil.h"
17#include "CLog.h"
18#include <cstring>
19
20//
21// CClientProxy1_1
22//
23
24CClientProxy1_1::CClientProxy1_1(const CString& name, IStream* stream) :
25 CClientProxy1_0(name, stream)
26{
27 // do nothing
28}
29
30CClientProxy1_1::~CClientProxy1_1()
31{
32 // do nothing
33}
34
35void
36CClientProxy1_1::keyDown(KeyID key, KeyModifierMask mask, KeyButton button)
37{
38 LOG((CLOG_DEBUG1 "send key down to \"%s\" id=%d, mask=0x%04x, button=0x%04x", getName().c_str(), key, mask, button));
39 CProtocolUtil::writef(getStream(), kMsgDKeyDown, key, mask, button);
40}
41
42void
43CClientProxy1_1::keyRepeat(KeyID key, KeyModifierMask mask,
44 SInt32 count, KeyButton button)
45{
46 LOG((CLOG_DEBUG1 "send key repeat to \"%s\" id=%d, mask=0x%04x, count=%d, button=0x%04x", getName().c_str(), key, mask, count, button));
47 CProtocolUtil::writef(getStream(), kMsgDKeyRepeat, key, mask, count, button);
48}
49
50void
51CClientProxy1_1::keyUp(KeyID key, KeyModifierMask mask, KeyButton button)
52{
53 LOG((CLOG_DEBUG1 "send key up to \"%s\" id=%d, mask=0x%04x, button=0x%04x", getName().c_str(), key, mask, button));
54 CProtocolUtil::writef(getStream(), kMsgDKeyUp, key, mask, button);
55}
Note: See TracBrowser for help on using the repository browser.