2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 #include <FBaseSysLog.h>
20 #include <FMediaAudioRouteInfo.h>
21 #include "FMedia_AudioRouteInfoImpl.h"
23 using namespace Tizen::Base;
25 namespace Tizen { namespace Media
28 AudioRouteInfo::AudioRouteInfo(InputAudioDevice in, OutputAudioDevice out)
30 __pAudioRouteInfoImpl = new (std::nothrow) _AudioRouteInfoImpl(in,out);
33 AudioRouteInfo::~AudioRouteInfo()
35 if (__pAudioRouteInfoImpl)
37 delete __pAudioRouteInfoImpl;
38 __pAudioRouteInfoImpl = null;
42 AudioRouteInfo::AudioRouteInfo(const AudioRouteInfo& rhs)
44 if (rhs.__pAudioRouteInfoImpl)
46 __pAudioRouteInfoImpl = new (std::nothrow)_AudioRouteInfoImpl(*(rhs.__pAudioRouteInfoImpl));
51 AudioRouteInfo::SetInputAudioDevice(InputAudioDevice in)
53 __pAudioRouteInfoImpl->SetInputAudioDevice(in);
58 AudioRouteInfo::SetOutputAudioDevice(OutputAudioDevice out)
61 __pAudioRouteInfoImpl->SetOutputAudioDevice(out);
65 AudioRouteInfo::GetInputAudioDevice(void) const
67 return __pAudioRouteInfoImpl->GetInputAudioDevice();
71 AudioRouteInfo::GetOutputAudioDevice(void) const
73 return __pAudioRouteInfoImpl->GetOutputAudioDevice();
77 AudioRouteInfo::operator =(const AudioRouteInfo& rhs)
83 *__pAudioRouteInfoImpl = *(rhs.__pAudioRouteInfoImpl);
88 AudioRouteInfo::Equals(const Object& obj) const
90 const AudioRouteInfo *pRhs = dynamic_cast<const AudioRouteInfo *>(&obj);
95 return __pAudioRouteInfoImpl->Equals(*pRhs->__pAudioRouteInfoImpl);
100 AudioRouteInfo::GetHashCode(void) const
102 return __pAudioRouteInfoImpl->GetHashCode();