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

Side by Side Diff: mojo/public/c/include/mojo/bindings/message.h

Issue 2232833003: Change the canonical way to include the C bindings headers to <mojo/bindings/*.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_mojo_tests
Patch Set: rebased Created 4 years, 4 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
« no previous file with comments | « mojo/public/c/include/mojo/bindings/map.h ('k') | mojo/public/c/include/mojo/bindings/string.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_C_BINDINGS_MESSAGE_H_ 5 #ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
6 #define MOJO_PUBLIC_C_BINDINGS_MESSAGE_H_ 6 #define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
7 7
8 #include <mojo/bindings/struct.h>
9 #include <mojo/bindings/validation.h>
8 #include <mojo/macros.h> 10 #include <mojo/macros.h>
9 #include <stdint.h> 11 #include <stdint.h>
10 12
11 #include "mojo/public/c/bindings/struct.h"
12 #include "mojo/public/c/bindings/validation.h"
13
14 MOJO_BEGIN_EXTERN_C 13 MOJO_BEGIN_EXTERN_C
15 14
16 #define MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE ((uint32_t)(1 << 0u)) 15 #define MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE ((uint32_t)(1 << 0u))
17 #define MOJOM_MESSAGE_FLAGS_IS_RESPONSE ((uint32_t)(1 << 1u)) 16 #define MOJOM_MESSAGE_FLAGS_IS_RESPONSE ((uint32_t)(1 << 1u))
18 17
19 // All mojom messages (over a message pipe) are framed with a MojomMessage as 18 // All mojom messages (over a message pipe) are framed with a MojomMessage as
20 // its header. 19 // its header.
21 // MojomMessage is actually a mojom struct -- we define it here since it's 20 // MojomMessage is actually a mojom struct -- we define it here since it's
22 // easier to read, and the validation has more to it than simple mojom struct 21 // easier to read, and the validation has more to it than simple mojom struct
23 // validation. 22 // validation.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // MojomMessage_ValidateHeader(). 66 // MojomMessage_ValidateHeader().
68 MojomValidationResult MojomMessage_ValidateRequestWithoutResponse( 67 MojomValidationResult MojomMessage_ValidateRequestWithoutResponse(
69 const void* in_buf); 68 const void* in_buf);
70 69
71 // Validates that the given message is a response. Assumes taht the message is 70 // Validates that the given message is a response. Assumes taht the message is
72 // already validated by MojomMessage_ValidateHeader(). 71 // already validated by MojomMessage_ValidateHeader().
73 MojomValidationResult MojomMessage_ValidateResponse(const void* in_buf); 72 MojomValidationResult MojomMessage_ValidateResponse(const void* in_buf);
74 73
75 MOJO_END_EXTERN_C 74 MOJO_END_EXTERN_C
76 75
77 #endif // MOJO_PUBLIC_C_BINDINGS_MESSAGE_H_ 76 #endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
OLDNEW
« no previous file with comments | « mojo/public/c/include/mojo/bindings/map.h ('k') | mojo/public/c/include/mojo/bindings/string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698