source: trunk/synergy/lib/platform/CPMClipboardAnyTextConverter.h

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

Two classes (CPMScreen and CPMKeyState) + the hook dll left (and debugging of course).

File size: 1.8 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 * Copyright (C) 2006 Knut St. Osmundsen
5 *
6 * This package is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * found in the file COPYING that should have accompanied this file.
9 *
10 * This package is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef CPMCLIPBOARDANYTEXTCONVERTER_H
17#define CPMCLIPBOARDANYTEXTCONVERTER_H
18
19#include "CPMClipboard.h"
20
21//! Convert to/from some text encoding
22class CPMClipboardAnyTextConverter :
23 public IPMClipboardConverter {
24public:
25 CPMClipboardAnyTextConverter();
26 virtual ~CPMClipboardAnyTextConverter();
27
28 // IPMClipboardConverter overrides
29 virtual IClipboard::EFormat
30 getFormat() const;
31 virtual ULONG getPMFormat() const = 0;
32 virtual ULONG getPMFormatInfo() const;
33 virtual ULONG fromIClipboard(const CString&) const;
34 virtual void freePMData(ULONG) const;
35 virtual CString toIClipboard(ULONG) const;
36
37protected:
38 //! Convert from IClipboard format
39 /*!
40 Do UTF-8 conversion only. Memory handle allocation and
41 linefeed conversion is done by this class. doFromIClipboard()
42 must include the nul terminator in the returned string (not
43 including the CString's nul terminator).
44 */
45 virtual CString doFromIClipboard(const CString&) const = 0;
46
47 //! Convert to IClipboard format
48 /*!
49 Do UTF-8 conversion only. Memory handle allocation and
50 linefeed conversion is done by this class.
51 */
52 virtual CString doToIClipboard(const CString&) const = 0;
53
54private:
55 CString convertLinefeedToPM(const CString&) const;
56 CString convertLinefeedToUnix(const CString&) const;
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.