|
1 /* |
|
2 * Copyright (c) 2007-2008 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: VOIP Audio Services |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <voipringtoneplayer.h> |
|
21 #include <voipringtonefactory.h> |
|
22 #include "VoIPQueueHandler.h" |
|
23 #include "VoIPRingToneFactoryImpl.h" |
|
24 |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // CRingToneFactory::CreateFactory |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 EXPORT_C TInt CRingToneFactory::CreateFactory(CRingToneFactory*& aFactory) |
|
31 { |
|
32 TInt err = KErrNone; |
|
33 CRingToneFactory* factory = NULL; |
|
34 factory = new CRingToneFactory; |
|
35 |
|
36 if (factory) |
|
37 { |
|
38 TRAP(err, factory->ConstructL()); |
|
39 if (err != KErrNone) |
|
40 { |
|
41 delete factory; |
|
42 factory = NULL; |
|
43 } |
|
44 } |
|
45 |
|
46 aFactory = factory; |
|
47 return err; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // CRingToneFactory::~CRingToneFactory |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 EXPORT_C CRingToneFactory::~CRingToneFactory() |
|
55 { |
|
56 delete iRingToneFactoryImpl; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CRingToneFactory::CRingToneFactory |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CRingToneFactory::CRingToneFactory() |
|
64 { |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // CRingToneFactory::ConstructL |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 void CRingToneFactory::ConstructL() |
|
72 { |
|
73 iRingToneFactoryImpl = NULL; |
|
74 iRingToneFactoryImpl = CRingToneFactoryImpl::NewL(); |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // CRingToneFactory::CreateRingTonePlayer |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 EXPORT_C TInt CRingToneFactory::CreateRingTonePlayer( |
|
82 CRingTonePlayer*& aRingTonePlayer) |
|
83 { |
|
84 TInt err = iRingToneFactoryImpl->CreateRingTonePlayer(aRingTonePlayer); |
|
85 return err; |
|
86 } |
|
87 |
|
88 |
|
89 // End of file |