blob: 36df1d8edbee35caa2f1eff71cc84eef9a87768e [file] [log] [blame]
Muhammad Qureshief19b082020-01-03 18:38:01 -08001/*
2 * Copyright (C) 2019, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "Collation.h"
20
21#include <map>
22#include <set>
23#include <vector>
24
25#include <stdio.h>
26#include <string.h>
27
28namespace android {
29namespace stats_log_api_gen {
30
31using namespace std;
32
33void write_java_q_logging_constants(FILE* out, const string& indent);
34
35int write_java_methods_q_schema(
36 FILE* out,
37 const map<vector<java_type_t>, set<string>>& signatures_to_modules,
38 const AtomDecl &attributionDecl,
39 const string& moduleName,
Muhammad Qureshi6f658812019-11-24 22:14:38 -080040 const string& indent);
Muhammad Qureshief19b082020-01-03 18:38:01 -080041
42void write_java_helpers_for_q_schema_methods(
43 FILE * out,
44 const AtomDecl &attributionDecl,
45 const int requiredHelpers,
Muhammad Qureshi6f658812019-11-24 22:14:38 -080046 const string& indent);
Muhammad Qureshief19b082020-01-03 18:38:01 -080047
48#if defined(STATS_SCHEMA_LEGACY)
Muhammad Qureshib11e00d2020-01-10 14:03:13 -080049int write_stats_log_java_q(FILE* out, const Atoms& atoms, const AtomDecl &attributionDecl,
50 const bool supportWorkSource);
Muhammad Qureshief19b082020-01-03 18:38:01 -080051
Muhammad Qureshi6f658812019-11-24 22:14:38 -080052int write_stats_log_java_q_for_module(FILE* out, const Atoms& atoms,
53 const AtomDecl &attributionDecl, const string& moduleName, const string& javaClass,
Muhammad Qureshib11e00d2020-01-10 14:03:13 -080054 const string& javaPackage, const bool supportWorkSource);
Muhammad Qureshief19b082020-01-03 18:38:01 -080055#endif
56} // namespace stats_log_api_gen
57} // namespace android