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

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

synergy v1.3.1 sources (zip).

File size: 1.5 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2004 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#ifndef COSXCLIPBOARDANYTEXTCONVERTER_H
16#define COSXCLIPBOARDANYTEXTCONVERTER_H
17
18#include "COSXClipboard.h"
19
20//! Convert to/from some text encoding
21class COSXClipboardAnyTextConverter : public IOSXClipboardConverter {
22public:
23 COSXClipboardAnyTextConverter();
24 virtual ~COSXClipboardAnyTextConverter();
25
26 // IOSXClipboardConverter overrides
27 virtual IClipboard::EFormat
28 getFormat() const;
29 virtual ScrapFlavorType
30 getOSXFormat() const = 0;
31 virtual CString fromIClipboard(const CString &) const;
32 virtual CString toIClipboard(const CString &) const;
33
34protected:
35 //! Convert from IClipboard format
36 /*!
37 Do UTF-8 conversion and linefeed conversion.
38 */
39 virtual CString doFromIClipboard(const CString&) const = 0;
40
41 //! Convert to IClipboard format
42 /*!
43 Do UTF-8 conversion and Linefeed conversion.
44 */
45 virtual CString doToIClipboard(const CString&) const = 0;
46
47private:
48 static CString convertLinefeedToMacOS(const CString&);
49 static CString convertLinefeedToUnix(const CString&);
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.