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 /** \addtogroup  RTP_Stack
18  *  @{
19  */
20 
21 #ifndef __RTP_IMPL_H_
22 #define __RTP_IMPL_H_
23 
24 #include <IRtpAppInterface.h>
25 #include <RtpBuffer.h>
26 #include <RtpGlobal.h>
27 
28 class IRtpAppInterface;
29 
30 /**
31  * @class    RtpImpl
32  * @brief    This class implements RTP callback methods [IRtpAppInterface].
33  *
34  * @see IRtpAppInterface
35  */
36 class RtpImpl : public IRtpAppInterface
37 {
38 private:
39     RtpDt_Void* m_pvAppdata;
40 
41 public:
42     RtpImpl();
43     ~RtpImpl();
44 
45     eRtp_Bool rtpSsrcCollisionInd(IN RtpDt_Int32 uiOldSsrc, IN RtpDt_Int32 uiNewSsrc);
46 
47     RtpDt_Void setAppdata(IN RtpDt_Void* pvAppdata);
48 
49     RtpDt_Void* getAppdata();
50 
51     eRtp_Bool rtpNewMemberJoinInd(IN RtpDt_Int32 uiSsrc);
52 
53     eRtp_Bool rtpMemberLeaveInd(IN eRTP_LEAVE_REASON eLeaveReason, IN RtpDt_Int32 uiSsrc);
54 
55     eRtp_Bool rtcpPacketSendInd(IN RtpBuffer* pobjRtcpBuf, IN RtpSession* pobjRtpSession);
56 
57     eRtp_Bool rtcpAppPayloadReqInd(
58             OUT RtpDt_UInt16& usSubType, OUT RtpDt_UInt32& uiName, OUT RtpBuffer* pobjPayload);
59 
60     eRtp_Bool getRtpHdrExtInfo(OUT RtpBuffer* pobjExtHdrInfo);
61 
62     eRtp_Bool deleteRcvrInfo(
63             IN RtpDt_UInt32 uiRemoteSsrc, IN RtpBuffer* pobjDestAddr, IN RtpDt_UInt16 usRemotePort);
64 
65     eRtp_Bool rtcpTimerHdlErrorInd(IN eRTP_STATUS_CODE eStatus);
66 
67     RtpDt_Void* RtpStartTimer(IN RtpDt_UInt32 uiDuration, IN eRtp_Bool bRepeat,
68             IN RTPCB_TIMERHANDLER pfnTimerCb, IN RtpDt_Void* pvData);
69 
70     eRtp_Bool RtpStopTimer(IN RtpDt_Void* pTimerId, OUT RtpDt_Void** ppUserData);
71 };
72 
73 #endif /* __RTP_IMPL_H_ */
74 
75 /** @}*/
76