buffet: Adding GCD command definition schema - phase 1.

Initial implementation of GCD command definition schema
and parsing command definition provided as JSON.

This change introduces the class hierarchy to describe
parameter type description (ParamType-derived classes),
parameter values (ParamValue-derived classes), constraints,
and general object schema which is a collection of
parameter definition for an object which corresponds
almost directly into a GCD command definition.

Object definition parsing from JSON is implemented
as well as validation of parameter values with rich
error reporting.

This is a basis for future command definition implementation
and device draft definition for GCD devices.

BUG=chromium:374860
TEST=Unit tests pass

Change-Id: I82d185b155956ff31a2d2e33f75bec9605ef32ee
Reviewed-on: https://chromium-review.googlesource.com/201159
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/commands/schema_constants.h b/buffet/commands/schema_constants.h
new file mode 100644
index 0000000..0e58cff
--- /dev/null
+++ b/buffet/commands/schema_constants.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium OS 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 BUFFET_COMMANDS_SCHEMA_CONSTANTS_H_
+#define BUFFET_COMMANDS_SCHEMA_CONSTANTS_H_
+
+namespace buffet {
+namespace commands {
+
+namespace errors {
+// Error domain for command schema description.
+extern const char kDomain[];
+
+// Common command definition error codes.
+extern const char kOutOfRange[];
+extern const char kTypeMismatch[];
+extern const char kPropTypeChanged[];
+extern const char kUnknownType[];
+extern const char kInvalidPropDef[];
+extern const char kNoTypeInfo[];
+extern const char kPropertyMissing[];
+}  // namespace errors
+
+namespace attributes {
+// Command description JSON schema attributes.
+extern const char kType[];
+extern const char kDisplayName[];
+
+extern const char kNumeric_Min[];
+extern const char kNumeric_Max[];
+
+extern const char kString_MinLength[];
+extern const char kString_MaxLength[];
+
+extern const char kOneOf_Enum[];
+}  // namespace attributes
+
+}  // namespace commands
+}  // namespace buffet
+
+#endif  // BUFFET_COMMANDS_SCHEMA_CONSTANTS_H_