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