BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / file_systems / nfs4 / Request.h
blobf740bb46194b2c921561f13b80f263d76fe4e777
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 REQUEST_H
9 #define REQUEST_H
12 #include "ReplyInterpreter.h"
13 #include "RequestBuilder.h"
14 #include "RPCServer.h"
17 class Cookie;
18 class FileSystem;
20 class Request {
21 public:
22 inline Request(RPC::Server* server,
23 FileSystem* fileSystem);
25 inline RequestBuilder& Builder();
26 inline ReplyInterpreter& Reply();
28 status_t Send(Cookie* cookie = NULL);
29 void Reset();
31 private:
32 status_t _SendUDP(Cookie* cookie);
33 status_t _SendTCP(Cookie* cookie);
35 RPC::Server* fServer;
36 FileSystem* fFileSystem;
38 RequestBuilder fBuilder;
39 ReplyInterpreter fReply;
43 inline
44 Request::Request(RPC::Server* server, FileSystem* fileSystem)
46 fServer(server),
47 fFileSystem(fileSystem)
49 ASSERT(server != NULL);
53 inline RequestBuilder&
54 Request::Builder()
56 return fBuilder;
60 inline ReplyInterpreter&
61 Request::Reply()
63 return fReply;
67 #endif // REQUEST_H