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 9 10 #include "RPCCallbackReply.h" 11 12 #include <util/kernel_cpp.h> 13 14 #include "RPCDefs.h" 15 16 17 using namespace RPC; 18 19 20 CallbackReply::CallbackReply() 21 { 22 } 23 24 25 CallbackReply* 26 CallbackReply::Create(uint32 xid, AcceptStat rpcError) 27 { 28 CallbackReply* reply = new(std::nothrow) CallbackReply; 29 if (reply == NULL) 30 return NULL; 31 32 reply->fStream.AddUInt(xid); 33 34 reply->fStream.AddInt(REPLY); 35 reply->fStream.AddUInt(MSG_ACCEPTED); 36 37 reply->fStream.AddInt(AUTH_NONE); 38 reply->fStream.AddOpaque(NULL, 0); 39 40 reply->fStream.AddUInt(rpcError); 41 42 return reply; 43 } 44 45 46 CallbackReply::~CallbackReply() 47 { 48 } 49 50