xref: /haiku/headers/build/private/app/MessengerPrivate.h (revision 24159a0c7d6d6dcba9f2a0c1a7c08d2c8167f21b)
1 #ifndef MESSENGER_PRIVATE_H
2 #define MESSENGER_PRIVATE_H
3 
4 #include <Messenger.h>
5 
6 class BMessenger::Private
7 {
8 	public:
9 		Private(BMessenger* msnger) : fMessenger(msnger) {;}
10 		Private(BMessenger& msnger) : fMessenger(&msnger) {;}
11 
12 		port_id	Port()
13 			{ return fMessenger->fPort; }
14 		int32	Token()
15 			 { return fMessenger->fHandlerToken; }
16 		team_id	Team()
17 			{ return fMessenger->fTeam; }
18 		bool	IsPreferredTarget()
19 			{ return fMessenger->fPreferredTarget; }
20 
21 		void SetTo(team_id team, port_id port, int32 token, bool preferred)
22 			{ fMessenger->SetTo(team, port, token, preferred); }
23 
24 	private:
25 		BMessenger* fMessenger;
26 };
27 
28 #endif	// MESSENGER_PRIVATE_H
29