|
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 "tmsutility.h" |
|
22 #include "tmsglobalcontext.h" |
|
23 #include "tmsamrbodyimpl.h" |
|
24 |
|
25 using namespace TMS; |
|
26 |
|
27 TMSAMRFormatBodyImpl::TMSAMRFormatBodyImpl() |
|
28 { |
|
29 iProxy = NULL; |
|
30 } |
|
31 |
|
32 TMSAMRFormatBodyImpl::~TMSAMRFormatBodyImpl() |
|
33 { |
|
34 TRACE_PRN_FN_ENT; |
|
35 TRACE_PRN_FN_EXT; |
|
36 } |
|
37 |
|
38 gint TMSAMRFormatBodyImpl::Create(TMSAMRFormatBody*& bodyimpl) |
|
39 { |
|
40 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
41 TMSAMRFormatBodyImpl* self = new TMSAMRFormatBodyImpl; |
|
42 if (self) |
|
43 { |
|
44 ret = self->PostConstruct(); |
|
45 if (ret != TMS_RESULT_SUCCESS) |
|
46 { |
|
47 delete self; |
|
48 self = NULL; |
|
49 } |
|
50 } |
|
51 bodyimpl = self; |
|
52 return ret; |
|
53 } |
|
54 |
|
55 gint TMSAMRFormatBodyImpl::PostConstruct() |
|
56 { |
|
57 gint ret(TMS_RESULT_SUCCESS); |
|
58 ret = TMSFormatBodyImpl::PostConstruct(TMS_FORMAT_AMR); |
|
59 return ret; |
|
60 } |
|
61 |
|
62 gint TMSAMRFormatBodyImpl::GetType(TMSFormatType& fmttype) |
|
63 { |
|
64 gint ret(TMS_RESULT_SUCCESS); |
|
65 fmttype = TMS_FORMAT_AMR; |
|
66 return ret; |
|
67 } |
|
68 |
|
69 void TMSAMRFormatBodyImpl::SetProxy(TMSGlobalContext* context, |
|
70 gpointer queuehandler) |
|
71 { |
|
72 if (context && queuehandler) |
|
73 { |
|
74 iProxy = context->CallProxy; |
|
75 iStreamType = context->StreamType; |
|
76 TMSFormatBodyImpl::SetProxy(iProxy, queuehandler); |
|
77 ((CQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_AMR); |
|
78 } |
|
79 } |
|
80 |
|
81 void TMSAMRFormatBodyImpl::QueueEvent(TInt aEventType, TInt /*aError*/, |
|
82 void* /*user_data*/) |
|
83 { |
|
84 switch (aEventType) |
|
85 { |
|
86 default: |
|
87 break; |
|
88 } |
|
89 } |
|
90 |
|
91 // End of file |