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 GetAttr(status_t status, int mask, 26 uint64 size, uint64 change); 27 status_t Recall(status_t status); 28 29 private: 30 void _InitHeader(); 31 32 static uint32 _HaikuErrorToNFS4(status_t error); 33 34 status_t fStatus; 35 XDR::Stream::Position fStatusPosition; 36 37 uint32 fOpCount; 38 XDR::Stream::Position fOpCountPosition; 39 40 RPC::CallbackReply* fReply; 41 }; 42 43 44 #endif // REPLYBUILDER_H 45 46