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 REPLYBUILDER_H 9 #define REPLYBUILDER_H 10 11 12 #include <SupportDefs.h> 13 14 #include "RPCCallbackReply.h" 15 #include "XDR.h" 16 17 18 class ReplyBuilder { 19 public: 20 ReplyBuilder(uint32 xid); 21 ~ReplyBuilder(); 22 23 RPC::CallbackReply* Reply(); 24 25 status_t Recall(status_t status); 26 27 private: 28 void _InitHeader(); 29 30 static uint32 _HaikuErrorToNFS4(status_t error); 31 32 status_t fStatus; 33 XDR::Stream::Position fStatusPosition; 34 35 uint32 fOpCount; 36 XDR::Stream::Position fOpCountPosition; 37 38 RPC::CallbackReply* fReply; 39 }; 40 41 42 #endif // REPLYBUILDER_H 43 44