vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / file_systems / nfs4 / RPCCallback.h
blob9f579be9cf9a2f57215ff220bdf55e34175bcb8f
1 /*
2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Paweł Dziepak, pdziepak@quarnos.org
7 */
8 #ifndef RPCCALLBACK_H
9 #define RPCCALLBACK_H
12 #include "Connection.h"
15 namespace RPC {
17 class CallbackServer;
18 class CallbackRequest;
19 class Server;
21 class Callback {
22 public:
23 Callback(Server* server);
25 inline void SetID(int32 id);
26 inline int32 ID();
28 inline void SetCBServer(CallbackServer* server);
29 inline CallbackServer* CBServer();
31 status_t EnqueueRequest(CallbackRequest* request,
32 Connection* connection);
34 private:
35 CallbackServer* fCBServer;
36 Server* fServer;
37 int32 fID;
41 inline void
42 Callback::SetID(int32 id)
44 fID = id;
48 inline int32
49 Callback::ID()
51 return fID;
55 inline void
56 Callback::SetCBServer(CallbackServer* server)
58 fCBServer = server;
62 inline CallbackServer*
63 Callback::CBServer()
65 return fCBServer;
69 } // namespace RPC
72 #endif // RPCCALLBACK_H