|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <tms.h> |
|
19 #include "tmscallproxy.h" |
|
20 #include "tmsqueuehandler.h" |
|
21 #include "tmsformatbodyimpl.h" |
|
22 |
|
23 using namespace TMS; |
|
24 |
|
25 TMSFormatBodyImpl::TMSFormatBodyImpl() |
|
26 { |
|
27 iProxy = NULL; |
|
28 } |
|
29 |
|
30 TMSFormatBodyImpl::~TMSFormatBodyImpl() |
|
31 { |
|
32 } |
|
33 |
|
34 gint TMSFormatBodyImpl::PostConstruct(TMSFormatType formatType) |
|
35 { |
|
36 gint ret(TMS_RESULT_SUCCESS); |
|
37 iFormatType = formatType; |
|
38 return ret; |
|
39 } |
|
40 |
|
41 gint TMSFormatBodyImpl::GetSupportedBitRates(BitRateVector& aVector) |
|
42 { |
|
43 gint ret(TMS_RESULT_INVALID_ARGUMENT); |
|
44 if (iProxy) |
|
45 { |
|
46 ret = iProxy->GetSupportedBitRates(aVector); |
|
47 } |
|
48 return ret; |
|
49 } |
|
50 |
|
51 gint TMSFormatBodyImpl::SetBitRate(const guint aBitrate) |
|
52 { |
|
53 gint ret(TMS_RESULT_INVALID_ARGUMENT); |
|
54 if (iProxy) |
|
55 { |
|
56 ret = iProxy->SetBitRate(aBitrate); |
|
57 } |
|
58 return ret; |
|
59 } |
|
60 |
|
61 gint TMSFormatBodyImpl::GetBitRate(guint& aBitrate) |
|
62 { |
|
63 gint ret(TMS_RESULT_INVALID_ARGUMENT); |
|
64 if (iProxy) |
|
65 { |
|
66 ret = iProxy->GetBitRate(aBitrate); |
|
67 } |
|
68 return ret; |
|
69 } |
|
70 |
|
71 gint TMSFormatBodyImpl::GetType(TMSFormatType& fmttype) |
|
72 { |
|
73 fmttype = iFormatType; |
|
74 return TMS_RESULT_SUCCESS; |
|
75 } |
|
76 |
|
77 void TMSFormatBodyImpl::SetProxy(TMSCallProxy* aProxy, gpointer /*queuehandler*/) |
|
78 { |
|
79 iProxy = aProxy; |
|
80 // ((CQueueHandler*)queuehandler)->AddObserver(*this,TMS_FORMAT_TYPE); |
|
81 } |
|
82 |
|
83 // End of file |