|
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 <tmsringtoneobsrvr.h> |
|
19 #include <tmsringtone.h> |
|
20 #include "tmsringtonebody.h" |
|
21 |
|
22 using namespace TMS; |
|
23 |
|
24 EXPORT_C TMSRingTone::TMSRingTone() : |
|
25 iBody(NULL) |
|
26 { |
|
27 } |
|
28 |
|
29 EXPORT_C TMSRingTone::~TMSRingTone() |
|
30 { |
|
31 delete iBody; |
|
32 } |
|
33 |
|
34 EXPORT_C gint TMSRingTone::AddObserver(TMSRingToneObserver& obsrvr, |
|
35 gpointer user_data) |
|
36 { |
|
37 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
38 if (iBody) |
|
39 { |
|
40 status = iBody->AddObserver(obsrvr, user_data); |
|
41 } |
|
42 return status; |
|
43 } |
|
44 |
|
45 EXPORT_C gint TMSRingTone::RemoveObserver(TMSRingToneObserver& obsrvr) |
|
46 { |
|
47 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
48 if (iBody) |
|
49 { |
|
50 status = iBody->RemoveObserver(obsrvr); |
|
51 } |
|
52 return status; |
|
53 } |
|
54 |
|
55 EXPORT_C gint TMSRingTone::Init(const TMSRingToneType type, GString* str, |
|
56 GString* tts) |
|
57 { |
|
58 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
59 if (iBody) |
|
60 { |
|
61 status = iBody->Init(type, str, tts); |
|
62 } |
|
63 return status; |
|
64 } |
|
65 |
|
66 EXPORT_C gint TMSRingTone::Deinit() |
|
67 { |
|
68 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
69 if (iBody) |
|
70 { |
|
71 status = iBody->Deinit(); |
|
72 } |
|
73 return status; |
|
74 } |
|
75 |
|
76 EXPORT_C gint TMSRingTone::Play() |
|
77 { |
|
78 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
79 if (iBody) |
|
80 { |
|
81 status = iBody->Play(); |
|
82 } |
|
83 return status; |
|
84 } |
|
85 |
|
86 EXPORT_C gint TMSRingTone::Stop() |
|
87 { |
|
88 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
89 if (iBody) |
|
90 { |
|
91 status = iBody->Stop(); |
|
92 } |
|
93 return status; |
|
94 } |
|
95 |
|
96 EXPORT_C gint TMSRingTone::Pause() |
|
97 { |
|
98 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
99 if (iBody) |
|
100 { |
|
101 status = iBody->Pause(); |
|
102 } |
|
103 return status; |
|
104 } |
|
105 |
|
106 EXPORT_C gint TMSRingTone::Mute() |
|
107 { |
|
108 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
109 if (iBody) |
|
110 { |
|
111 status = iBody->Mute(); |
|
112 } |
|
113 return status; |
|
114 } |
|
115 |
|
116 // End of file |