38 #import <mach/message.h>    39 #import <servers/bootstrap.h>    42 #import <CoreServices/CoreServices.h>    98 #define PRINT_MACH_RESULT(result_, message_) \    99   printf(message_" %s (%d)\n", mach_error_string(result_), result_ );   108                         mach_msg_type_name_t in_disposition) {
   112     disposition = in_disposition;
   113     type = MACH_MSG_PORT_DESCRIPTOR;
   121     disposition = MACH_MSG_TYPE_COPY_SEND;
   122     type = MACH_MSG_PORT_DESCRIPTOR;
   130     disposition = desc.disposition;
   143   operator mach_port_t()
 const {
   168     return GetDataLength() > 0 ? GetDataPacket()->data : NULL;
   172     return EndianU32_LtoN(GetDataPacket()->data_length);
   177     GetDataPacket()->id = EndianU32_NtoL(message_id);
   190   mach_port_t GetTranslatedPort(
int n);
   196   bool SetData(
void *data, int32_t data_length);
   218   void SetDescriptorCount(
int n);
   222   mach_msg_size_t CalculateSize();
   226   uint8_t            padding[1024]; 
   253   explicit ReceivePort(
const char *receive_port_name);
   266                                mach_msg_timeout_t timeout);
   275   kern_return_t init_result_;
   290                             mach_msg_timeout_t timeout);
   295   mach_port_t   send_port_;
   296   kern_return_t init_result_;
   301 #endif // MACH_IPC_H__ 
bool IsSimpleMessage() const 
 
mach_msg_type_name_t GetDisposition() const 
 
void SetMessageID(int32_t message_id)
 
MachMsgPortDescriptor(mach_port_t in_name)
 
MachMsgPortDescriptor(mach_port_t in_name, mach_msg_type_name_t in_disposition)
 
mach_port_t GetPort() const 
 
mach_port_t GetMachPort() const 
 
MachMsgPortDescriptor(const MachMsgPortDescriptor &desc)
 
int GetDescriptorCount() const