| {{/* |
| * 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"}} |
| {{Macro "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 {{Macro "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}} |
| |