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 __RTCP_CONFIGINFO_H__
22 #define __RTCP_CONFIGINFO_H__
23 
24 #include <RtpGlobal.h>
25 
26 /**
27  * @class    RtcpConfigInfo
28  * @brief    It stores RTCP config information. RtcpConfigInfo information will be used in
29  * RTCP packet.
30  */
31 class RtcpConfigInfo
32 {
33 private:
34     RtpDt_UInt32 m_uiSdesItemCnt;
35     RtpDt_UInt32 m_uiByeReasonSize;
36     RtpDt_UInt32 m_uiAppDepDataSize;
37 
38     /**
39      * Each array element contains the information about one SDES item.
40      * The array is indexed as per eRTCP_SDES_TYPE
41      */
42     tRTCP_SDES_ITEM m_arrSdesInfo[RTP_MAX_SDES_TYPE];
43 
44     /**
45      * enable RTCP packet transmission support.
46      */
47     eRtp_Bool m_bEnaRtcpAppPktSend;
48 
49 public:
50     RtcpConfigInfo();
51     ~RtcpConfigInfo();
52 
53     /**
54      * set method for uiByeReasonSize
55      */
56     RtpDt_Void setByeReasonSize(IN RtpDt_UInt32 uiByeReason);
57 
58     /**
59      * get method for uiByeReasonSize
60      */
61     RtpDt_UInt32 getByeReasonSize();
62 
63     /**
64      * set method for uiAppDepDataSize
65      */
66     RtpDt_Void setAppDepDataSize(IN RtpDt_UInt32 uiAppDepSize);
67 
68     /**
69      * get method for uiAppDepDataSize
70      */
71     RtpDt_UInt32 getAppDepDataSize();
72 
73     /**
74      * get method for m_uiSdesItemCnt
75      */
76     RtpDt_UInt32 getSdesItemCount();
77 
78     /**
79      * set method for m_uiSdesItemCnt
80      */
81     RtpDt_Void setSdesItemCount(IN RtpDt_UInt32 uiSdesItemCnt);
82 
83     /**
84      * It adds tRTCP_SDES_ITEM  to m_arrSdesInfo
85      */
86     eRtp_Bool addRtcpSdesItem(IN tRTCP_SDES_ITEM* pstSdesItem, IN RtpDt_UInt32 uiIndex);
87 
88     /**
89      * It gets tRTCP_SDES_ITEM item using index
90      */
91     tRTCP_SDES_ITEM* getRtcpSdesItem(IN RtpDt_UInt32 uiIndex);
92 
93     /**
94      * set method for m_bEnaRtcpAppPktSend
95      */
96     RtpDt_Void enableRtcpAppPktSend();
97 
98     /**
99      * It returns true if m_bEnaRtcpAppPktSend is enabled.
100      */
101     eRtp_Bool isRtcpAppPktSendEnable();
102 
103     /**
104      * It estimates SDES Packet Size
105      */
106     RtpDt_UInt32 estimateSdesPktSize();
107 };  // RtcpConfigInfo
108 
109 #endif  //__RTCP_CONFIGINFO_H__
110 
111 /** @}*/
112