1/* 2 * Copyright 2012 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Paweł Dziepak, pdziepak@quarnos.org 7 */ 8#ifndef RPCREPLY_H 9#define RPCREPLY_H 10 11 12#include "XDR.h" 13 14 15namespace RPC { 16 17class Reply { 18public: 19 Reply(void* buffer, int size); 20 ~Reply(); 21 22 inline uint32 GetXID(); 23 24 inline status_t Error(); 25 inline XDR::ReadStream& Stream(); 26 27private: 28 uint32 fXID; 29 30 status_t fError; 31 32 XDR::ReadStream fStream; 33 void* fBuffer; 34}; 35 36inline uint32 37Reply::GetXID() 38{ 39 return fXID; 40} 41 42 43inline status_t 44Reply::Error() 45{ 46 return fError; 47} 48 49 50inline XDR::ReadStream& 51Reply::Stream() 52{ 53 return fStream; 54} 55 56} // namespace RPC 57 58 59#endif // RPCREPLY_H 60 61