aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/MachIPC.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mac/MachIPC.h')
-rw-r--r--src/common/mac/MachIPC.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/mac/MachIPC.h b/src/common/mac/MachIPC.h
index 71419be9..a3fae5a1 100644
--- a/src/common/mac/MachIPC.h
+++ b/src/common/mac/MachIPC.h
@@ -73,7 +73,7 @@
// mach_port_t task = message.GetTranslatedPort(0);
// mach_port_t thread = message.GetTranslatedPort(1);
//
-// char *messageString = message.GetData();
+// char* messageString = message.GetData();
//
// printf("message string = %s\n", messageString);
// }
@@ -164,7 +164,7 @@ class MachMessage {
public:
// The receiver of the message can retrieve the raw data this way
- uint8_t *GetData() {
+ uint8_t* GetData() {
return GetDataLength() > 0 ? GetDataPacket()->data : NULL;
}
@@ -181,10 +181,10 @@ class MachMessage {
// Adds a descriptor (typically a mach port) to be translated
// returns true if successful, otherwise not enough space
- bool AddDescriptor(const MachMsgPortDescriptor &desc);
+ bool AddDescriptor(const MachMsgPortDescriptor& desc);
int GetDescriptorCount() const { return body.msgh_descriptor_count; }
- MachMsgPortDescriptor *GetDescriptor(int n);
+ MachMsgPortDescriptor* GetDescriptor(int n);
// Convenience method which gets the mach port described by the descriptor
mach_port_t GetTranslatedPort(int n);
@@ -193,7 +193,7 @@ class MachMessage {
bool IsSimpleMessage() const { return GetDescriptorCount() == 0; }
// Sets raw data for the message (returns false if not enough space)
- bool SetData(void *data, int32_t data_length);
+ bool SetData(void* data, int32_t data_length);
protected:
// Consider this an abstract base class - must create an actual instance
@@ -216,7 +216,7 @@ class MachMessage {
MessageDataPacket* GetDataPacket();
void SetDescriptorCount(int n);
- void SetDescriptor(int n, const MachMsgPortDescriptor &desc);
+ void SetDescriptor(int n, const MachMsgPortDescriptor& desc);
// Returns total message size setting msgh_size in the header to this value
mach_msg_size_t CalculateSize();
@@ -250,7 +250,7 @@ class MachSendMessage : public MachMessage {
class ReceivePort {
public:
// Creates a new mach port for receiving messages and registers a name for it
- explicit ReceivePort(const char *receive_port_name);
+ explicit ReceivePort(const char* receive_port_name);
// Given an already existing mach port, use it. We take ownership of the
// port and deallocate it in our destructor.
@@ -262,7 +262,7 @@ class ReceivePort {
~ReceivePort();
// Waits on the mach port until message received or timeout
- kern_return_t WaitForMessage(MachReceiveMessage *out_message,
+ kern_return_t WaitForMessage(MachReceiveMessage* out_message,
mach_msg_timeout_t timeout);
// The underlying mach port that we wrap
@@ -280,13 +280,13 @@ class ReceivePort {
class MachPortSender {
public:
// get a port with send rights corresponding to a named registered service
- explicit MachPortSender(const char *receive_port_name);
+ explicit MachPortSender(const char* receive_port_name);
// Given an already existing mach port, use it.
explicit MachPortSender(mach_port_t send_port);
- kern_return_t SendMessage(MachSendMessage &message,
+ kern_return_t SendMessage(MachSendMessage& message,
mach_msg_timeout_t timeout);
private: