1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 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 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 #ifndef _SEBASE_H_ 19 #define _SEBASE_H_ 20 21 #include "h245msg.h" 22 #include "h245inf.h" 23 #include "oscl_timer.h" 24 25 class PER; 26 class H245; 27 class SE; 28 class PVLogger; 29 30 #define TIMER_DURATION 30 31 32 class SEBase 33 { 34 public: 35 SEBase(); ~SEBase()36 virtual ~SEBase() {} 37 SetSE(SE * se)38 void SetSE(SE *se) 39 { 40 MySE = se; 41 } 42 void RequestTimer(int32 timerID, int32 timeoutInfo, int32 count, OsclTimerObserver *observer = 0); 43 void CancelTimer(int32 timerID); 44 SetPer(PER * per)45 void SetPer(PER *per) 46 { 47 MyPer = per; 48 } 49 void MessageSend(PS_H245Msg pMsg); 50 OSCL_IMPORT_REF void MessageSend(uint32 type1, uint32 type2, uint8 *pdata); 51 SetH245(H245 * h245)52 void SetH245(H245 *h245) 53 { 54 MyH245 = h245; 55 } 56 void PrimitiveSend(PS_InfHeader pPrimitive); 57 58 OSCL_IMPORT_REF void Print(const char *format, ...); 59 60 uint32 TimerDuration; // Duration of timers in seconds 61 62 private: 63 SEBase(const SEBase&); 64 65 SE *MySE; 66 PER *MyPer; 67 H245 *MyH245; 68 PVLogger *Logger; 69 }; 70 71 #endif //_SEBASE_H_ 72