1 /** 2 * Copyright (C) 2022 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 BASE_SESSION_CALLBACK_H 18 #define BASE_SESSION_CALLBACK_H 19 20 #include <ImsMediaDefine.h> 21 22 struct SessionCallbackParameter 23 { 24 public: 25 SessionCallbackParameter(uint32_t t = 0, uint32_t p1 = 0, uint32_t p2 = 0) : typeSessionCallbackParameter26 type(t), 27 param1(p1), 28 param2(p2) 29 { 30 } 31 uint32_t type; 32 uint32_t param1; 33 uint32_t param2; 34 }; 35 36 class BaseSessionCallback 37 { 38 public: BaseSessionCallback()39 BaseSessionCallback() {} ~BaseSessionCallback()40 virtual ~BaseSessionCallback() {} 41 virtual void SendEvent(int32_t type, uint64_t param1 = 0, uint64_t param2 = 0) 42 { 43 onEvent(type, param1, param2); 44 } 45 46 protected: 47 virtual void onEvent(int32_t type, uint64_t param1, uint64_t param2) = 0; 48 }; 49 50 #endif