1 /* 2 * Copyright 2016 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 #ifndef __VTS_SYSFUZZER_COMMON_FUZZER_CALLBACK_BASE_H__ 18 #define __VTS_SYSFUZZER_COMMON_FUZZER_CALLBACK_BASE_H__ 19 20 #include "component_loader/DllLoader.h" 21 22 #include <string> 23 24 #include "test/vts/proto/ComponentSpecificationMessage.pb.h" 25 #include "test/vts/proto/AndroidSystemControlMessage.pb.h" 26 27 using namespace std; 28 29 namespace android { 30 namespace vts { 31 32 class FuzzerCallbackBase { 33 public: 34 FuzzerCallbackBase(); 35 virtual ~FuzzerCallbackBase(); 36 37 static bool Register(const VariableSpecificationMessage& message); 38 39 protected: 40 static const char* GetCallbackID(const string& name); 41 42 static void RpcCallToAgent( 43 const AndroidSystemCallbackRequestMessage& message, 44 const string& callback_socket_name); 45 }; 46 47 } // namespace vts 48 } // namespace android 49 50 #endif // __VTS_SYSFUZZER_COMMON_FUZZER_CALLBACK_BASE_H__ 51