1*58b5124eSIngo Weinhold // Clipboard.h 2*58b5124eSIngo Weinhold 3*58b5124eSIngo Weinhold #ifndef CLIPBOARD_H 4*58b5124eSIngo Weinhold #define CLIPBOARD_H 5*58b5124eSIngo Weinhold 6*58b5124eSIngo Weinhold #include <String.h> 7*58b5124eSIngo Weinhold #include <Message.h> 8*58b5124eSIngo Weinhold #include <Messenger.h> 9*58b5124eSIngo Weinhold #include "WatchingService.h" 10*58b5124eSIngo Weinhold 11*58b5124eSIngo Weinhold class Clipboard { 12*58b5124eSIngo Weinhold public: 13*58b5124eSIngo Weinhold Clipboard(const char *name); 14*58b5124eSIngo Weinhold ~Clipboard(); 15*58b5124eSIngo Weinhold 16*58b5124eSIngo Weinhold void SetData(const BMessage *data, BMessenger dataSource); 17*58b5124eSIngo Weinhold 18*58b5124eSIngo Weinhold const BMessage *Data() const; 19*58b5124eSIngo Weinhold BMessenger DataSource() const; 20*58b5124eSIngo Weinhold int32 Count() const; 21*58b5124eSIngo Weinhold 22*58b5124eSIngo Weinhold bool AddWatcher(BMessenger watcher); 23*58b5124eSIngo Weinhold bool RemoveWatcher(BMessenger watcher); 24*58b5124eSIngo Weinhold void NotifyWatchers(); 25*58b5124eSIngo Weinhold 26*58b5124eSIngo Weinhold private: 27*58b5124eSIngo Weinhold BString fName; 28*58b5124eSIngo Weinhold BMessage fData; 29*58b5124eSIngo Weinhold BMessenger fDataSource; 30*58b5124eSIngo Weinhold int32 fCount; 31*58b5124eSIngo Weinhold WatchingService fWatchingService; 32*58b5124eSIngo Weinhold }; 33*58b5124eSIngo Weinhold 34*58b5124eSIngo Weinhold #endif // CLIPBOARD_H 35