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

Unified Diff: mojo/public/c/bindings/validation.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/c/bindings/union.h ('k') | mojo/public/c/include/mojo/bindings/array.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/bindings/validation.h
diff --git a/mojo/public/c/bindings/validation.h b/mojo/public/c/bindings/validation.h
deleted file mode 100644
index 814d4ac1b4038689d98fbbd22043f310167627d0..0000000000000000000000000000000000000000
--- a/mojo/public/c/bindings/validation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_BINDINGS_VALIDATION_H_
-#define MOJO_PUBLIC_C_BINDINGS_VALIDATION_H_
-
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// One of MOJOM_VALIDATION_* codes; See below.
-typedef uint32_t MojomValidationResult;
-
-// No error; successful validation.
-#define MOJOM_VALIDATION_ERROR_NONE ((MojomValidationResult)0)
-// An object (struct or array) is not 8-byte aligned.
-#define MOJOM_VALIDATION_MISALIGNED_OBJECT ((MojomValidationResult)1)
-// An object is not contained inside the message data, or it overlaps other
-// objects.
-#define MOJOM_VALIDATION_ILLEGAL_MEMORY_RANGE ((MojomValidationResult)2)
-// A struct header doesn't make sense, for example:
-// - |num_bytes| is smaller than the size of the struct header.
-// - |num_bytes| and |version| don't match.
-#define MOJOM_VALIDATION_UNEXPECTED_STRUCT_HEADER ((MojomValidationResult)3)
-// An array header doesn't make sense, for example:
-// - |num_bytes| is smaller than the size of the header plus the size required
-// to store |num_elements| elements.
-// - For fixed-size arrays, |num_elements| is different than the specified
-// size.
-#define MOJOM_VALIDATION_UNEXPECTED_ARRAY_HEADER ((MojomValidationResult)4)
-// An encoded handle is illegal.
-#define MOJOM_VALIDATION_ILLEGAL_HANDLE ((MojomValidationResult)5)
-// A non-nullable handle field is set to invalid handle.
-#define MOJOM_VALIDATION_UNEXPECTED_INVALID_HANDLE ((MojomValidationResult)6)
-// An encoded pointer is illegal.
-#define MOJOM_VALIDATION_ILLEGAL_POINTER ((MojomValidationResult)7)
-// A non-nullable pointer field is set to null.
-#define MOJOM_VALIDATION_UNEXPECTED_NULL_POINTER ((MojomValidationResult)8)
-// |flags| in the message header is invalid. The flags are either
-// inconsistent with one another, inconsistent with other parts of the
-// message, or unexpected for the message receiver. For example the
-// receiver is expecting a request message but the flags indicate that
-// the message is a response message.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS ((MojomValidationResult)9)
-// |flags| in the message header indicates that a request ID is required but
-// there isn't one.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_MISSING_REQUEST_ID \
- ((MojomValidationResult)10)
-// The |name| field in a message header contains an unexpected value.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_UNKNOWN_METHOD \
- ((MojomValidationResult)11)
-// Two parallel arrays which are supposed to represent a map have different
-// lengths.
-#define MOJOM_VALIDATION_DIFFERENT_SIZED_ARRAYS_IN_MAP \
- ((MojomValidationResult)12)
-// A non-nullable union is set to null. (Has size 0)
-#define MOJOM_VALIDATION_UNEXPECTED_NULL_UNION ((MojomValidationResult)13)
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_BINDINGS_VALIDATION_H_
« no previous file with comments | « mojo/public/c/bindings/union.h ('k') | mojo/public/c/include/mojo/bindings/array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698