Turned _init_message_(), _delete_message_(), and _clean_msg_cache_() into
proper private static BMessage members and made them accessible through BMessage::Private. Got rid of unused _reconstruct_message_(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11106 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -301,8 +301,6 @@ friend class BMessenger;
|
||||
friend class BApplication;
|
||||
friend class Private;
|
||||
|
||||
friend void _msg_cache_cleanup_();
|
||||
friend BMessage *_reconstruct_msg_(uint32,uint32,uint32);
|
||||
friend inline void _set_message_target_(BMessage *, int32, bool);
|
||||
friend inline void _set_message_reply_(BMessage *, BMessenger);
|
||||
friend inline int32 _get_message_target_(BMessage *);
|
||||
@@ -362,13 +360,15 @@ static status_t _SendFlattenedMessage(void *data, int32 size,
|
||||
port_id port, int32 token, bool preferred,
|
||||
bigtime_t timeout);
|
||||
|
||||
static void _StaticInit();
|
||||
static void _StaticCleanup();
|
||||
static void _StaticCacheCleanup();
|
||||
|
||||
enum { sNumReplyPorts = 3 };
|
||||
static port_id sReplyPorts[sNumReplyPorts];
|
||||
static long sReplyPortInUse[sNumReplyPorts];
|
||||
static int32 sGetCachedReplyPort();
|
||||
|
||||
friend int _init_message_();
|
||||
friend int _delete_message_();
|
||||
static BBlockCache *sMsgCache;
|
||||
|
||||
struct dyn_array {
|
||||
|
||||
@@ -6,25 +6,10 @@
|
||||
#ifndef MESSAGEPRIVATE_H
|
||||
#define MESSAGEPRIVATE_H
|
||||
|
||||
// Standard Includes -----------------------------------------------------------
|
||||
|
||||
// System Includes -------------------------------------------------------------
|
||||
#include <Message.h>
|
||||
#include <Messenger.h>
|
||||
#include <MessengerPrivate.h>
|
||||
|
||||
// Project Includes ------------------------------------------------------------
|
||||
|
||||
// Local Includes --------------------------------------------------------------
|
||||
|
||||
// Local Defines ---------------------------------------------------------------
|
||||
|
||||
// Globals ---------------------------------------------------------------------
|
||||
|
||||
extern "C" void _msg_cache_cleanup_();
|
||||
extern "C" int _init_message_();
|
||||
extern "C" int _delete_message_();
|
||||
|
||||
class BMessage::Private
|
||||
{
|
||||
public:
|
||||
@@ -36,6 +21,7 @@ class BMessage::Private
|
||||
fMessage->fTarget = token;
|
||||
fMessage->fPreferred = preferred;
|
||||
}
|
||||
|
||||
inline void SetReply(BMessenger messenger)
|
||||
{
|
||||
BMessenger::Private mp(messenger);
|
||||
@@ -44,10 +30,12 @@ class BMessage::Private
|
||||
fMessage->fReplyTo.team = mp.Team();
|
||||
fMessage->fReplyTo.preferred = mp.IsPreferredTarget();
|
||||
}
|
||||
|
||||
inline int32 GetTarget()
|
||||
{
|
||||
return fMessage->fTarget;
|
||||
}
|
||||
|
||||
inline bool UsePreferredTarget()
|
||||
{
|
||||
return fMessage->fPreferred;
|
||||
@@ -60,6 +48,21 @@ class BMessage::Private
|
||||
preferred, timeout);
|
||||
}
|
||||
|
||||
static inline void StaticInit()
|
||||
{
|
||||
BMessage::_StaticInit();
|
||||
}
|
||||
|
||||
static inline void StaticCleanup()
|
||||
{
|
||||
BMessage::_StaticCleanup();
|
||||
}
|
||||
|
||||
static inline void StaticCacheCleanup()
|
||||
{
|
||||
BMessage::_StaticCacheCleanup();
|
||||
}
|
||||
|
||||
private:
|
||||
BMessage* fMessage;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user