CClipboard.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CCLIPBOARD_H
00016 #define CCLIPBOARD_H
00017 
00018 #include "IClipboard.h"
00019 
00021 
00024 class CClipboard : public IClipboard {
00025 public:
00026     CClipboard();
00027     virtual ~CClipboard();
00028 
00030 
00031 
00033 
00037     void                unmarshall(const CString& data, Time time);
00038 
00040 
00041 
00042 
00044 
00048     CString             marshall() const;
00049 
00051 
00052     // IClipboard overrides
00053     virtual bool        empty();
00054     virtual void        add(EFormat, const CString& data);
00055     virtual bool        open(Time) const;
00056     virtual void        close() const;
00057     virtual Time        getTime() const;
00058     virtual bool        has(EFormat) const;
00059     virtual CString     get(EFormat) const;
00060 
00061 private:
00062     mutable bool        m_open;
00063     mutable Time        m_time;
00064     bool                m_owner;
00065     Time                m_timeOwned;
00066     bool                m_added[kNumFormats];
00067     CString             m_data[kNumFormats];
00068 };
00069 
00070 #endif

Generated on Fri Nov 6 00:18:44 2009 for synergy-plus by  doxygen 1.4.7