// Copyright 2022, The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //! Utility to emit the CDDL for messages passed between HAL and TA. use kmr_common::crypto; use kmr_wire::*; use kmr_wire::{keymint::*, secureclock::*, sharedsecret::*}; fn show_schema() { if let (Some(n), Some(s)) = (::cddl_typename(), ::cddl_schema()) { println!("{} = {}", n, s); } } fn main() { // CDDL corresponding to types defined by the AIDL spec. // newtype wrappers show_schema::(); show_schema::(); show_schema::(); // enums show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); // structs show_schema::(); // BeginResult omitted as it holds a Binder reference show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); // Internal exhaustive enum (instead of `KeyParameter` and `KeyParameterValue` from the HAL). show_schema::(); // CDDL corresponding to types defined in this crate. // enums show_schema::(); // structs show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); // Special case show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); show_schema::(); // Autogenerated enums show_schema::(); show_schema::(); // Overall response structure show_schema::(); }