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