• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 PVRTSP_ENGINE_NODE_EXTENSION_INTERFACE_IMPL_H_INCLUDED
19 #include "pvrtspenginenodeextensioninterface_impl.h"
20 #endif
21 
22 ///////////////////////////////////////////////////////////////////////////////
23 //Interface ctor and dtor
24 ///////////////////////////////////////////////////////////////////////////////
PVRTSPEngineNodeExtensionInterfaceImpl(PVRTSPEngineNode * aContainer)25 PVRTSPEngineNodeExtensionInterfaceImpl::PVRTSPEngineNodeExtensionInterfaceImpl(PVRTSPEngineNode* aContainer): PVInterfaceImpl<PVRTSPEngineNodeAllocator>(KPVRTSPEngineNodeExtensionUuid), iContainer(aContainer)
26 {
27 }
28 
~PVRTSPEngineNodeExtensionInterfaceImpl()29 PVRTSPEngineNodeExtensionInterfaceImpl::~PVRTSPEngineNodeExtensionInterfaceImpl()
30 {
31 }
32 
33 ///////////////////////////////////////////////////////////////////////////////
34 //Implemenatation of virtuals declared in class PVInterface
35 ///////////////////////////////////////////////////////////////////////////////
addRef()36 void PVRTSPEngineNodeExtensionInterfaceImpl::addRef()
37 {
38     PVInterfaceImpl<PVRTSPEngineNodeAllocator>::addRef();
39 }
40 
removeRef()41 void PVRTSPEngineNodeExtensionInterfaceImpl::removeRef()
42 {
43     PVInterfaceImpl<PVRTSPEngineNodeAllocator>::removeRef();
44 }
45 
queryInterface(const PVUuid & uuid,PVInterface * & iface)46 bool PVRTSPEngineNodeExtensionInterfaceImpl::queryInterface(const PVUuid& uuid, PVInterface*& iface)
47 {
48     if (uuid == Uuid())
49     {
50         addRef();
51         iface = this;
52         return true;
53     }
54     else
55     {
56         iface = NULL;
57         return false;
58     }
59 }
60 
61 ///////////////////////////////////////////////////////////////////////////////
62 //Implemenatation of virtuals exposed by  PVRTSPEngineNodeExtensionInterface
63 ///////////////////////////////////////////////////////////////////////////////
64 
SetStreamingType(PVRTSPStreamingType aType)65 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetStreamingType(PVRTSPStreamingType aType)
66 {
67     return iContainer->SetStreamingType(aType);
68 }
69 
70 //Either SetSessionURL() or  SetSDPInfo() must be called before Init()
SetSessionURL(OSCL_wString & aURL)71 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetSessionURL(OSCL_wString& aURL)
72 {
73     return iContainer->SetSessionURL(aURL);
74 }
75 
GetSDP(OsclRefCounterMemFrag & aSDPBuf)76 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetSDP(OsclRefCounterMemFrag& aSDPBuf)
77 {
78     return iContainer->GetSDP(aSDPBuf);
79 }
80 
SetRtspProxy(OSCL_String & aRtspProxyName,uint32 aRtspProxyPort)81 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetRtspProxy(OSCL_String& aRtspProxyName, uint32 aRtspProxyPort)
82 {
83     return iContainer->SetRtspProxy(aRtspProxyName, aRtspProxyPort);
84 }
85 
GetRtspProxy(OSCL_String & aRtspProxyName,uint32 & aRtspProxyPort)86 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetRtspProxy(OSCL_String& aRtspProxyName, uint32& aRtspProxyPort)
87 {
88     return iContainer->GetRtspProxy(aRtspProxyName, aRtspProxyPort);
89 }
90 
IsRdtTransport()91 OSCL_EXPORT_REF bool PVRTSPEngineNodeExtensionInterfaceImpl::IsRdtTransport()
92 {
93     return iContainer->IsRdtTransport();
94 }
95 
SetPortRdtStreamId(PVMFPortInterface * pPort,int iRdtStreamId)96 OSCL_EXPORT_REF void PVRTSPEngineNodeExtensionInterfaceImpl::SetPortRdtStreamId(PVMFPortInterface* pPort, int iRdtStreamId)
97 {
98     iContainer->SetPortRdtStreamId(pPort, iRdtStreamId);
99 }
100 
SetSDPInfo(OsclSharedPtr<SDPInfo> & aSDPinfo,Oscl_Vector<StreamInfo,OsclMemAllocator> & aSelectedStream)101 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetSDPInfo(OsclSharedPtr<SDPInfo>& aSDPinfo, Oscl_Vector<StreamInfo, OsclMemAllocator> &aSelectedStream)
102 {
103     return iContainer->SetSDPInfo(aSDPinfo, aSelectedStream);
104 }
105 
GetServerInfo(PVRTSPEngineNodeServerInfo & aServerInfo)106 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetServerInfo(PVRTSPEngineNodeServerInfo& aServerInfo)
107 {
108     return iContainer->GetServerInfo(aServerInfo);
109 }
110 
GetStreamInfo(Oscl_Vector<StreamInfo,OsclMemAllocator> & aSelectedStream)111 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetStreamInfo(Oscl_Vector<StreamInfo, OsclMemAllocator> &aSelectedStream)
112 {
113     return iContainer->GetStreamInfo(aSelectedStream);
114 }
115 
SetRealChallengeCalculator(IRealChallengeGen * pChallengeCalc)116 OSCL_EXPORT_REF void PVRTSPEngineNodeExtensionInterfaceImpl::SetRealChallengeCalculator(IRealChallengeGen* pChallengeCalc)
117 {
118     iContainer->SetRealChallengeCalculator(pChallengeCalc);
119 }
120 
SetRdtParser(IPayloadParser * pRdtParser)121 OSCL_EXPORT_REF void PVRTSPEngineNodeExtensionInterfaceImpl::SetRdtParser(IPayloadParser* pRdtParser)
122 {
123     iContainer->SetRdtParser(pRdtParser);
124 }
125 
SetRequestPlayRange(const RtspRangeType & aRange)126 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetRequestPlayRange(const RtspRangeType& aRange)
127 {
128     return iContainer->SetRequestPlayRange(aRange);
129 }
130 
GetActualPlayRange(RtspRangeType & aRange)131 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetActualPlayRange(RtspRangeType& aRange)
132 {
133     return iContainer->GetActualPlayRange(aRange);
134 }
135 
GetUserAgent(OSCL_wString & aUserAgent)136 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetUserAgent(OSCL_wString& aUserAgent)
137 {
138     return iContainer->GetUserAgent(aUserAgent);
139 }
140 
SetClientParameters(OSCL_wString & aUserAgent,OSCL_wString & aUserNetwork,OSCL_wString & aDeviceInfo)141 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetClientParameters(OSCL_wString& aUserAgent,
142         OSCL_wString&  aUserNetwork,
143         OSCL_wString&  aDeviceInfo)
144 {
145     return iContainer->SetClientParameters(aUserAgent, aUserNetwork, aDeviceInfo);
146 }
147 
SetAuthenticationParameters(OSCL_wString & aUserID,OSCL_wString & aAuthentication,OSCL_wString & aExpiration,OSCL_wString & aApplicationSpecificString,OSCL_wString & aVerification,OSCL_wString & aSignature)148 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetAuthenticationParameters(OSCL_wString& aUserID,
149         OSCL_wString& aAuthentication,
150         OSCL_wString& aExpiration,
151         OSCL_wString& aApplicationSpecificString,
152         OSCL_wString& aVerification,
153         OSCL_wString& aSignature)
154 {
155     return iContainer->SetAuthenticationParameters(aUserID, aAuthentication, aExpiration, aApplicationSpecificString, aVerification, aSignature);
156 }
157 
SetKeepAliveMethod_timeout(int32 aTimeout)158 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetKeepAliveMethod_timeout(int32 aTimeout)
159 {
160     return iContainer->SetKeepAliveMethod_timeout(aTimeout);
161 }
162 
SetKeepAliveMethod_use_SET_PARAMETER(bool aUseSetParameter)163 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetKeepAliveMethod_use_SET_PARAMETER(bool aUseSetParameter)
164 {
165     return iContainer->SetKeepAliveMethod_use_SET_PARAMETER(aUseSetParameter);
166 }
167 
SetKeepAliveMethod_keep_alive_in_play(bool aKeepAliveInPlay)168 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetKeepAliveMethod_keep_alive_in_play(bool aKeepAliveInPlay)
169 {
170     return iContainer->SetKeepAliveMethod_keep_alive_in_play(aKeepAliveInPlay);
171 }
172 
GetKeepAliveMethod(int32 & aTimeout,bool & aUseSetParameter,bool & aKeepAliveInPlay)173 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetKeepAliveMethod(int32 &aTimeout, bool &aUseSetParameter, bool &aKeepAliveInPlay)
174 {
175     return iContainer->GetKeepAliveMethod(aTimeout, aUseSetParameter, aKeepAliveInPlay);
176 }
177 
178 
179 
GetRTSPTimeOut(int32 & aTimeout)180 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::GetRTSPTimeOut(int32 &aTimeout)
181 {
182     return iContainer->GetRTSPTimeOut(aTimeout);
183 }
184 
SetRTSPTimeOut(int32 aTimeout)185 OSCL_EXPORT_REF PVMFStatus PVRTSPEngineNodeExtensionInterfaceImpl::SetRTSPTimeOut(int32 aTimeout)
186 {
187     return iContainer->SetRTSPTimeOut(aTimeout);
188 }
189 
UpdateSessionCompletionStatus(bool aSessionCompleted)190 OSCL_EXPORT_REF void PVRTSPEngineNodeExtensionInterfaceImpl::UpdateSessionCompletionStatus(bool aSessionCompleted)
191 {
192     iContainer->UpdateSessionCompletionStatus(aSessionCompleted);
193 }
194