2005-11-17 23:19:27 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2003-2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2005-01-25 17:42:55 +03:00
|
|
|
#ifndef MESSENGER_PRIVATE_H
|
|
|
|
#define MESSENGER_PRIVATE_H
|
2003-08-26 03:33:02 +04:00
|
|
|
|
2005-11-17 23:19:27 +03:00
|
|
|
|
2003-08-26 03:33:02 +04:00
|
|
|
#include <Messenger.h>
|
2005-11-20 19:24:23 +03:00
|
|
|
#include <TokenSpace.h>
|
2003-08-26 03:33:02 +04:00
|
|
|
|
2005-11-17 23:19:27 +03:00
|
|
|
|
|
|
|
class BMessenger::Private {
|
2003-08-26 03:33:02 +04:00
|
|
|
public:
|
2005-11-17 23:19:27 +03:00
|
|
|
Private(BMessenger* messenger) : fMessenger(messenger) {}
|
|
|
|
Private(BMessenger& messenger) : fMessenger(&messenger) {}
|
2003-08-26 03:33:02 +04:00
|
|
|
|
|
|
|
port_id Port()
|
|
|
|
{ return fMessenger->fPort; }
|
2005-11-17 23:19:27 +03:00
|
|
|
int32 Token()
|
2015-09-05 16:33:32 +03:00
|
|
|
{ return fMessenger->fHandlerToken; }
|
2003-08-26 03:33:02 +04:00
|
|
|
team_id Team()
|
|
|
|
{ return fMessenger->fTeam; }
|
2005-11-17 23:19:27 +03:00
|
|
|
bool IsPreferredTarget()
|
2005-11-20 19:24:23 +03:00
|
|
|
{ return fMessenger->fHandlerToken == B_PREFERRED_TOKEN; }
|
2003-08-26 03:33:02 +04:00
|
|
|
|
2005-11-20 19:24:23 +03:00
|
|
|
void SetTo(team_id team, port_id port, int32 token)
|
|
|
|
{ fMessenger->_SetTo(team, port, token); }
|
2005-01-25 17:42:55 +03:00
|
|
|
|
2003-08-26 03:33:02 +04:00
|
|
|
private:
|
|
|
|
BMessenger* fMessenger;
|
|
|
|
};
|
|
|
|
|
2005-01-25 17:42:55 +03:00
|
|
|
#endif // MESSENGER_PRIVATE_H
|