blob: 4fde37fd38e15311b8398ffa802e82a6b928b5dc [file] [log] [blame]
{{/*
* Copyright (C) 2015 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.
*/}}
{{/* ---- Includes ---- */}}
{{Include "api_classnames.tmpl"}}
{{Include "cpp_common.tmpl" }}
{{/* ---- Overrides ---- */}}
{{Global "C++.EnumTypeOverride" "uint32_t"}}
{{$filename := print (Global "API") "_imports.h" }}
{{$ | Macro "imports.h" | Format (Global "clang-format") | Write $filename}}
{{/*
-------------------------------------------------------------------------------
Entry point.
-------------------------------------------------------------------------------
*/}}
{{define "imports.h"}}
{{Template "C++.AOSP.Copyright"}}
{{$guard := print "GAPII_" (Upper (Global "API")) "_IMPORTS_H"}}
#ifndef {{$guard}}
#define {{$guard}}
#include "{{Global "API"}}_types.h"
#include <gapic/target.h> // STDCALL
namespace gapii {
struct {{Template "ApiClassnames.Imports"}} {
void Resolve();
{{range $c := AllCommands $}}
{{if not (GetAnnotation $c "synthetic")}}
{{template "C++.TypedefFunctionPtr" $c}}
{{end}}
{{end}}
{{range $c := AllCommands $}}
{{if not (GetAnnotation $c "synthetic")}}
{{Template "C++.FunctionPtrDecl" $c}};
{{end}}
{{end}}
};
} // namespace gapii
#endif // {{$guard}}
{{end}}