blob: 5ac38129220c965abe4140b57df993c988aa1f78 [file] [log] [blame]
#include <fidl/{{fidl_library_name}}/cpp/wire.h>
#include <fidl/{{fidl_library_name}}/cpp/wire_types.h>
#include <lib/fidl/llcpp/message.h>
#include <lib/fidl/llcpp/traits.h>
#include <lib/zx/vmo.h>
#include <zircon/assert.h>
#include <zircon/process.h>
#include <zircon/processargs.h>
#include <zircon/status.h>
#include <zircon/syscalls.h>
#include <iostream>
#include <string>
#include <vector>
#include "{{cpp_namespace}}.h"
namespace {{cpp_namespace}} {
{{> helpers }}
Config Config::TakeFromStartupHandle() noexcept {
// Get the VMO containing FIDL config
zx_handle_t config_vmo_handle = zx_take_startup_handle(PA_CONFIG_VMO);
ZX_ASSERT_MSG(config_vmo_handle != ZX_HANDLE_INVALID, "Could not obtain Config VMO Handle");
zx::vmo config_vmo(config_vmo_handle);
{{> vmo_parse }}
}
}