• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 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 /*
18  * Generated mock file from original source file
19  *   Functions generated:7
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #include "gd/common/metric_id_manager.h"
28 #include "main/shim/metric_id_api.h"
29 #include "main/shim/shim.h"
30 #include "types/raw_address.h"
31 
32 #ifndef UNUSED_ATTR
33 #define UNUSED_ATTR
34 #endif
35 
36 namespace bluetooth {
37 namespace shim {
38 
InitMetricIdAllocator(const std::unordered_map<RawAddress,int> & paired_device_map,CallbackLegacy save_id_callback,CallbackLegacy forget_device_callback)39 bool InitMetricIdAllocator(
40     const std::unordered_map<RawAddress, int>& paired_device_map,
41     CallbackLegacy save_id_callback, CallbackLegacy forget_device_callback) {
42   mock_function_count_map[__func__]++;
43   return false;
44 }
CloseMetricIdAllocator()45 bool CloseMetricIdAllocator() {
46   mock_function_count_map[__func__]++;
47   return false;
48 }
IsEmptyMetricIdAllocator()49 bool IsEmptyMetricIdAllocator() {
50   mock_function_count_map[__func__]++;
51   return false;
52 }
IsValidIdFromMetricIdAllocator(const int id)53 bool IsValidIdFromMetricIdAllocator(const int id) {
54   mock_function_count_map[__func__]++;
55   return false;
56 }
SaveDeviceOnMetricIdAllocator(const RawAddress & raw_address)57 bool SaveDeviceOnMetricIdAllocator(const RawAddress& raw_address) {
58   mock_function_count_map[__func__]++;
59   return false;
60 }
AllocateIdFromMetricIdAllocator(const RawAddress & raw_address)61 int AllocateIdFromMetricIdAllocator(const RawAddress& raw_address) {
62   mock_function_count_map[__func__]++;
63   return 0;
64 }
ForgetDeviceFromMetricIdAllocator(const RawAddress & raw_address)65 void ForgetDeviceFromMetricIdAllocator(const RawAddress& raw_address) {
66   mock_function_count_map[__func__]++;
67 }
68 
69 }  // namespace shim
70 }  // namespace bluetooth
71