1 #ifndef __SHAREDMEMORYCLIENT__
2 #define __SHAREDMEMORYCLIENT__
8 #include <securityd_client/SharedMemoryCommon.h>
9 #include <security_utilities/threading.h>
14 enum UnavailableReason
{kURNone
, kURMessageDropped
, kURMessagePending
, kURNoMessage
, kURBufferCorrupt
};
16 class SharedMemoryClient
19 std::string mSegmentName
;
28 SegmentOffsetType
GetProducerCount ();
30 void ReadData (void* buffer
, SegmentOffsetType bytesToRead
);
31 SegmentOffsetType
ReadOffset ();
34 SharedMemoryClient (const char* segmentName
, SegmentOffsetType segmentSize
);
35 virtual ~SharedMemoryClient ();
37 bool ReadMessage (void* message
, SegmentOffsetType
&length
, UnavailableReason
&ur
);
39 const char* GetSegmentName ();
40 size_t GetSegmentSize ();