|
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 "tmsutility.h" |
|
20 #include "tmspcmbodyimpl.h" |
|
21 #include "tmspcmformatimpl.h" |
|
22 |
|
23 using namespace TMS; |
|
24 |
|
25 TMSPCMFormatImpl::TMSPCMFormatImpl() |
|
26 { |
|
27 } |
|
28 |
|
29 TMSPCMFormatImpl::~TMSPCMFormatImpl() |
|
30 { |
|
31 } |
|
32 |
|
33 gint TMSPCMFormatImpl::PostConstruct() |
|
34 { |
|
35 TRACE_PRN_FN_ENT; |
|
36 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
37 TMSPCMFormatBody* bodyimpl(NULL); |
|
38 |
|
39 ret = TMSPCMFormatBodyImpl::Create(bodyimpl); |
|
40 |
|
41 if (ret == TMS_RESULT_SUCCESS) |
|
42 { |
|
43 this->iBody = bodyimpl; |
|
44 this->iFormatBody = (TMSPCMFormatBodyImpl*) bodyimpl; |
|
45 } |
|
46 TRACE_PRN_FN_EXT; |
|
47 return ret; |
|
48 } |
|
49 |
|
50 gint TMSPCMFormatImpl::Create(TMSFormat*& tmsformat) |
|
51 { |
|
52 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
53 TMSPCMFormatImpl *self = new TMSPCMFormatImpl; |
|
54 |
|
55 TRACE_PRN_FN_ENT; |
|
56 if (self) |
|
57 { |
|
58 ret = self->PostConstruct(); |
|
59 if (ret != TMS_RESULT_SUCCESS) |
|
60 { |
|
61 delete self; |
|
62 self = NULL; |
|
63 } |
|
64 } |
|
65 tmsformat = self; |
|
66 TRACE_PRN_FN_EXT; |
|
67 return ret; |
|
68 } |
|
69 |
|
70 gint TMSPCMFormatImpl::SetProxy(TMSGlobalContext* context, |
|
71 gpointer queuehandler) |
|
72 { |
|
73 gint ret(TMS_RESULT_SUCCESS); |
|
74 if (this->iBody) |
|
75 { |
|
76 ((TMSPCMFormatBodyImpl*) this->iBody)->SetProxy(context, queuehandler); |
|
77 } |
|
78 else |
|
79 { |
|
80 ret = TMS_RESULT_UNINITIALIZED_OBJECT; |
|
81 } |
|
82 return ret; |
|
83 } |
|
84 |
|
85 // End of file |