1*feb15cc6SPawel Dziepak /* 2*feb15cc6SPawel Dziepak * Copyright 2012 Haiku, Inc. All rights reserved. 3*feb15cc6SPawel Dziepak * Distributed under the terms of the MIT License. 4*feb15cc6SPawel Dziepak * 5*feb15cc6SPawel Dziepak * Authors: 6*feb15cc6SPawel Dziepak * Paweł Dziepak, pdziepak@quarnos.org 7*feb15cc6SPawel Dziepak */ 8*feb15cc6SPawel Dziepak 9*feb15cc6SPawel Dziepak 10*feb15cc6SPawel Dziepak #include "RPCCallbackReply.h" 11*feb15cc6SPawel Dziepak 12*feb15cc6SPawel Dziepak #include <util/kernel_cpp.h> 13*feb15cc6SPawel Dziepak 14*feb15cc6SPawel Dziepak #include "RPCDefs.h" 15*feb15cc6SPawel Dziepak 16*feb15cc6SPawel Dziepak 17*feb15cc6SPawel Dziepak using namespace RPC; 18*feb15cc6SPawel Dziepak 19*feb15cc6SPawel Dziepak CallbackReply()20*feb15cc6SPawel DziepakCallbackReply::CallbackReply() 21*feb15cc6SPawel Dziepak { 22*feb15cc6SPawel Dziepak } 23*feb15cc6SPawel Dziepak 24*feb15cc6SPawel Dziepak 25*feb15cc6SPawel Dziepak CallbackReply* Create(uint32 xid,AcceptStat rpcError)26*feb15cc6SPawel DziepakCallbackReply::Create(uint32 xid, AcceptStat rpcError) 27*feb15cc6SPawel Dziepak { 28*feb15cc6SPawel Dziepak CallbackReply* reply = new(std::nothrow) CallbackReply; 29*feb15cc6SPawel Dziepak if (reply == NULL) 30*feb15cc6SPawel Dziepak return NULL; 31*feb15cc6SPawel Dziepak 32*feb15cc6SPawel Dziepak reply->fStream.AddUInt(xid); 33*feb15cc6SPawel Dziepak 34*feb15cc6SPawel Dziepak reply->fStream.AddInt(REPLY); 35*feb15cc6SPawel Dziepak reply->fStream.AddUInt(MSG_ACCEPTED); 36*feb15cc6SPawel Dziepak 37*feb15cc6SPawel Dziepak reply->fStream.AddInt(AUTH_NONE); 38*feb15cc6SPawel Dziepak reply->fStream.AddOpaque(NULL, 0); 39*feb15cc6SPawel Dziepak 40*feb15cc6SPawel Dziepak reply->fStream.AddUInt(rpcError); 41*feb15cc6SPawel Dziepak 42*feb15cc6SPawel Dziepak return reply; 43*feb15cc6SPawel Dziepak } 44*feb15cc6SPawel Dziepak 45*feb15cc6SPawel Dziepak ~CallbackReply()46*feb15cc6SPawel DziepakCallbackReply::~CallbackReply() 47*feb15cc6SPawel Dziepak { 48*feb15cc6SPawel Dziepak } 49*feb15cc6SPawel Dziepak 50