Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: mojo/ipc/message/ipc_message.h

Issue 23629032: mojo: MessageBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add support for a string field type. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_IPC_MESSAGE_IPC_MESSAGE_H_
6 #define MOJO_IPC_MESSAGE_IPC_MESSAGE_H_
7
8 #include <stdint.h>
9 #include <vector>
10
11 #include "mojo/ipc/core/ipc_handle.h"
12
13 namespace mojo {
14
15 enum IPCMessageFieldType {
16 kIPCMessageFieldType_Bool = 0x1,
17 kIPCMessageFieldType_Int8 = 0x2,
18 kIPCMessageFieldType_Int16 = 0x3,
19 kIPCMessageFieldType_Int32 = 0x4,
20 kIPCMessageFieldType_Int64 = 0x5,
21 kIPCMessageFieldType_Uint8 = 0x6,
22 kIPCMessageFieldType_Uint16 = 0x7,
23 kIPCMessageFieldType_Uint32 = 0x8,
24 kIPCMessageFieldType_Uint64 = 0x9,
25 kIPCMessageFieldType_Float = 0xA,
26 kIPCMessageFieldType_Double = 0xB,
27 kIPCMessageFieldType_String = 0xC,
28 kIPCMessageFieldType_Bytes = 0xD,
29 kIPCMessageFieldType_Handle = 0xE,
vtl 2013/09/11 17:37:16 I see!
30 kIPCMessageFieldType_Message = 0xF,
31 };
32
33 class IPCMessage {
34 public:
35 IPCMessage();
36 ~IPCMessage();
37
38 const std::vector<uint8_t>& data() const { return data_; }
39 const std::vector<Handle>& handles() const { return handles_; }
40
41 private:
42 friend class IPCMessageBuilder;
43
44 std::vector<uint8_t> data_;
45 std::vector<Handle> handles_;
46 };
47
48 } // namespace mojo
49
50 #endif // MOJO_IPC_MESSAGE_IPC_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698