xref: /haiku/src/servers/registrar/MIMEManager.h (revision 9f81ca838ce7b92b5689e57d3f86765db4705a7b)
1 // MIMEManager.h
2 
3 #ifndef MIME_MANAGER_H
4 #define MIME_MANAGER_H
5 
6 #include <Looper.h>
7 
8 #include <mime/Database.h>
9 
10 #include "RegistrarThreadManager.h"
11 
12 
13 class MIMEManager : public BLooper,
14 	private BPrivate::Storage::Mime::Database::NotificationListener {
15 public:
16 	MIMEManager();
17 	virtual ~MIMEManager();
18 
19 	virtual void MessageReceived(BMessage *message);
20 
21 private:
22 	// Database::NotificationListener
23 	virtual status_t Notify(BMessage* message, const BMessenger& target);
24 
25 private:
26 	class DatabaseLocker;
27 
28 private:
29 	void HandleSetParam(BMessage *message);
30 	void HandleDeleteParam(BMessage *message);
31 
32 private:
33 	BPrivate::Storage::Mime::Database fDatabase;
34 	DatabaseLocker* fDatabaseLocker;
35 	RegistrarThreadManager fThreadManager;
36 	BMessenger fManagerMessenger;
37 };
38 
39 #endif	// MIME_MANAGER_H
40