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 "callipadpt.h" |
|
20 #include "callcsadpt.h" |
|
21 #include "calladpt.h" |
|
22 #include "tmsutility.h" |
|
23 |
|
24 using namespace TMS; |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // TMSCallAdpt::TMSCallAdpt |
|
28 // |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 TMSCallAdpt::TMSCallAdpt() |
|
32 { |
|
33 TRACE_PRN_FN_ENT; |
|
34 TRACE_PRN_FN_EXT; |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // TMSCallAdpt::~TMSCallAdpt |
|
39 // |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 TMSCallAdpt::~TMSCallAdpt() |
|
43 { |
|
44 TRACE_PRN_FN_ENT; |
|
45 TRACE_PRN_FN_EXT; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // TMSCallAdpt::CreateCallL |
|
50 // |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 gint TMSCallAdpt::CreateCallL(gint callType, TMSCallAdpt*& callAdpt) |
|
54 { |
|
55 TRACE_PRN_FN_ENT; |
|
56 TMSCallAdpt* self(NULL); |
|
57 gint retVal(TMS_RESULT_SUCCESS); |
|
58 switch (callType) |
|
59 { |
|
60 case TMS_CALL_IP: |
|
61 retVal = TMS_RESULT_INSUFFICIENT_MEMORY; |
|
62 self = TMSCallIPAdpt::NewL(); |
|
63 if (self) |
|
64 { |
|
65 retVal = self->PostConstruct(); |
|
66 if (retVal != TMS_RESULT_SUCCESS) |
|
67 { |
|
68 delete self; |
|
69 self = NULL; |
|
70 } |
|
71 } |
|
72 break; |
|
73 |
|
74 case TMS_CALL_CS: |
|
75 retVal = TMS_RESULT_INSUFFICIENT_MEMORY; |
|
76 self = new TMSCallCSAdpt(); |
|
77 if (self) |
|
78 { |
|
79 retVal = self->PostConstruct(); |
|
80 if (retVal != TMS_RESULT_SUCCESS) |
|
81 { |
|
82 delete self; |
|
83 self = NULL; |
|
84 } |
|
85 } |
|
86 break; |
|
87 default: |
|
88 retVal = TMS_RESULT_CALL_TYPE_NOT_SUPPORTED; |
|
89 break; |
|
90 } |
|
91 callAdpt = self; |
|
92 TRACE_PRN_FN_EXT; |
|
93 return retVal; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // TMSCallAdpt::PostConstruct |
|
98 // |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 gint TMSCallAdpt::PostConstruct() |
|
102 { |
|
103 return TMS_RESULT_SUCCESS; |
|
104 } |
|
105 |
|
106 // End of file |
|