Muhammad Qureshi | ef19b08 | 2020-01-03 18:38:01 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 28 | namespace android { |
| 29 | namespace stats_log_api_gen { |
| 30 | |
| 31 | using namespace std; |
| 32 | |
| 33 | void write_java_q_logging_constants(FILE* out, const string& indent); |
| 34 | |
| 35 | int 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 Qureshi | 6f65881 | 2019-11-24 22:14:38 -0800 | [diff] [blame] | 40 | const string& indent); |
Muhammad Qureshi | ef19b08 | 2020-01-03 18:38:01 -0800 | [diff] [blame] | 41 | |
| 42 | void write_java_helpers_for_q_schema_methods( |
| 43 | FILE * out, |
| 44 | const AtomDecl &attributionDecl, |
| 45 | const int requiredHelpers, |
Muhammad Qureshi | 6f65881 | 2019-11-24 22:14:38 -0800 | [diff] [blame] | 46 | const string& indent); |
Muhammad Qureshi | ef19b08 | 2020-01-03 18:38:01 -0800 | [diff] [blame] | 47 | |
| 48 | #if defined(STATS_SCHEMA_LEGACY) |
Muhammad Qureshi | b11e00d | 2020-01-10 14:03:13 -0800 | [diff] [blame] | 49 | int write_stats_log_java_q(FILE* out, const Atoms& atoms, const AtomDecl &attributionDecl, |
| 50 | const bool supportWorkSource); |
Muhammad Qureshi | ef19b08 | 2020-01-03 18:38:01 -0800 | [diff] [blame] | 51 | |
Muhammad Qureshi | 6f65881 | 2019-11-24 22:14:38 -0800 | [diff] [blame] | 52 | int write_stats_log_java_q_for_module(FILE* out, const Atoms& atoms, |
| 53 | const AtomDecl &attributionDecl, const string& moduleName, const string& javaClass, |
Muhammad Qureshi | b11e00d | 2020-01-10 14:03:13 -0800 | [diff] [blame] | 54 | const string& javaPackage, const bool supportWorkSource); |
Muhammad Qureshi | ef19b08 | 2020-01-03 18:38:01 -0800 | [diff] [blame] | 55 | #endif |
| 56 | } // namespace stats_log_api_gen |
| 57 | } // namespace android |