_get_object_token_ has found its permanent home in AppMisc.h, which the

other files were modified to include.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2957 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
ejakowatz 2003-03-19 08:00:50 +00:00
parent edfec36839
commit 2be975a1ee
4 changed files with 14 additions and 50 deletions

View File

@ -27,6 +27,7 @@
#ifndef _APP_MISC_H
#define _APP_MISC_H
#include <Handler.h>
#include <OS.h>
#include <SupportDefs.h>
@ -42,4 +43,14 @@ thread_id main_thread_for(team_id team);
} // namespace BPrivate
// _get_object_token_
/*! Return the token of a BHandler.
\param handler The BHandler.
\return the token.
*/
inline int32 _get_object_token_(const BHandler* object)
{ return object->fToken; }
#endif // _APP_MISC_H

View File

@ -950,11 +950,6 @@ bool FilterDeleter(void* filter)
}
//------------------------------------------------------------------------------
int32 _get_object_token_(const BHandler *handler)
{
return handler->fToken;
}
/*
* $Log $
*

View File

@ -45,6 +45,8 @@
#include <Roster.h>
// Project Includes ------------------------------------------------------------
#include <AppMisc.h>
#include <MessageUtils.h>
#include "TokenSpace.h"
// Local Includes --------------------------------------------------------------
@ -59,51 +61,6 @@ enum {
NOT_IMPLEMENTED = B_ERROR,
};
// _get_object_token_
/*! Return the token of a BHandler.
\param handler The BHandler.
\return the token.
\todo Think about a better place for this function.
*/
inline
int32
_get_object_token_(const BHandler* handler)
{
return handler->fToken;
}
// _set_message_target_
/*! \brief Sets the target of a message.
\param message The message.
\param token The target handler token.
\param preferred Indicates whether to use the looper's preferred handler.
*/
inline
void
_set_message_target_(BMessage *message, int32 token, bool preferred)
{
message->fTarget = token;
message->fPreferred = preferred;
}
// _set_message_reply_
/*! \brief Sets a message's reply target.
\param message The message.
\param messenger The reply messenger.
*/
inline
void
_set_message_reply_(BMessage *message, BMessenger messenger)
{
message->fReplyTo.port = messenger.fPort;
message->fReplyTo.target = messenger.fHandlerToken;
message->fReplyTo.team = messenger.fTeam;
message->fReplyTo.preferred = messenger.fPreferredTarget;
}
// constructor
/*! \brief Creates an unitialized BMessenger.

View File

@ -31,6 +31,7 @@
#include <BeBuild.h>
// Project Includes ------------------------------------------------------------
#include <AppMisc.h>
#include <InterfaceDefs.h>
#include <Application.h>
#include <Looper.h>