1 //------------------------------------------------------------------------------ 2 // MessagePrivate.h 3 // 4 //------------------------------------------------------------------------------ 5 6 #ifndef MESSAGEPRIVATE_H 7 #define MESSAGEPRIVATE_H 8 9 // Standard Includes ----------------------------------------------------------- 10 11 // System Includes ------------------------------------------------------------- 12 13 // Project Includes ------------------------------------------------------------ 14 15 // Local Includes -------------------------------------------------------------- 16 17 // Local Defines --------------------------------------------------------------- 18 19 // Globals --------------------------------------------------------------------- 20 21 extern "C" void _msg_cache_cleanup_(); 22 extern "C" int _init_message_(); 23 extern "C" int _delete_message_(); 24 25 class BMessage::Private 26 { 27 public: 28 Private(BMessage* msg) : fMessage(msg) {;} 29 Private(BMessage& msg) : fMessage(&msg) {;} 30 31 inline void SetTarget(int32 token, bool preferred) 32 { 33 fMessage->fTarget = token; 34 fMessage->fPreferred = preferred; 35 } 36 inline void SetReply(BMessenger messenger) 37 { 38 fMessage->fReplyTo.port = messenger.fPort; 39 fMessage->fReplyTo.target = messenger.fHandlerToken; 40 fMessage->fReplyTo.team = messenger.fTeam; 41 fMessage->fReplyTo.preferred = messenger.fPreferredTarget; 42 } 43 inline int32 GetTarget() 44 { 45 return fMessage->fTarget; 46 } 47 inline bool UsePreferredTarget() 48 { 49 return fMessage->fPreferred; 50 } 51 52 private: 53 BMessage* fMessage; 54 }; 55 56 #endif // MESSAGEPRIVATE_H 57 58 /* 59 * $Log $ 60 * 61 * $Id $ 62 * 63 */ 64 65