Updated BQuery's BMessenger hack to be more legit (and

to allow libstorage to compile using public app kit headers)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2002-08-16 21:58:44 +00:00
parent c904c6cdf1
commit ef753322a8
2 changed files with 3 additions and 17 deletions

View File

@ -93,6 +93,7 @@ private:
friend class BRoster;
friend class BPrivate::TRoster;
friend class BMessage;
friend class BQuery;
friend inline void _set_message_reply_(BMessage *, BMessenger);
friend status_t swap_data(type_code, void *, size_t, swap_action);
friend bool operator<(const BMessenger &a, const BMessenger &b);

View File

@ -26,22 +26,6 @@ enum {
NOT_IMPLEMENTED = B_ERROR,
};
// ===========================================================================
// Hack to get a BMessenger's port and token.
class _TRoster_ {
public:
static inline void get_messenger_port_token(const BMessenger &messenger,
port_id &port, int32 &token)
{
port = messenger.fPort;
token = messenger.fHandlerToken;
}
};
// ===========================================================================
// BQuery
// constructor
@ -406,7 +390,8 @@ BQuery::SetTarget(BMessenger messenger)
if (error == B_OK && _HasFetched())
error = B_NOT_ALLOWED;
if (error == B_OK) {
_TRoster_::get_messenger_port_token(messenger, fPort, fToken);
fPort = messenger.fPort;
fToken = messenger.fHandlerToken;
fLive = true;
}
return error;