|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSHENGCLIPSESSION_H |
|
20 #define MUSHENGCLIPSESSION_H |
|
21 |
|
22 // USER |
|
23 #include "musengmceoutsession.h" |
|
24 |
|
25 |
|
26 class MMusEngClipSessionObserver; |
|
27 class CMusEngLiveSession; |
|
28 class CMceFileSource; |
|
29 |
|
30 class CMusEngClipSession : public CMusEngMceOutSession |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 /** |
|
36 * |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 IMPORT_C static CMusEngClipSession* NewL( |
|
40 const TDesC& aFileName, |
|
41 const TRect& aRect, |
|
42 MMusEngClipSessionObserver* aSessionObserver, |
|
43 TUint aSipProfileId = 0 ); |
|
44 |
|
45 /** |
|
46 * |
|
47 * @since 3.2 |
|
48 */ |
|
49 ~CMusEngClipSession(); |
|
50 |
|
51 |
|
52 public: // new API |
|
53 |
|
54 /** |
|
55 * Sets file to be shared during session. |
|
56 * @pre Session must be established |
|
57 * @pre New file cannot be DRM protected |
|
58 * @leave One of the system wide error codes |
|
59 * @param aFileName Name of the file to be shared |
|
60 * @since S60 v3.2 |
|
61 */ |
|
62 IMPORT_C void ChangeClipL( const TDesC& aFileName ); |
|
63 |
|
64 /** |
|
65 * |
|
66 * @since S60 v3.2 |
|
67 */ |
|
68 IMPORT_C void FastForwardL( TBool aUseFFWD ); |
|
69 |
|
70 /** |
|
71 * |
|
72 * @since S60 v3.2 |
|
73 */ |
|
74 IMPORT_C void FastRewindL( TBool aUseFRWD ); |
|
75 |
|
76 /** |
|
77 * |
|
78 * @since S60 v3.2 |
|
79 */ |
|
80 IMPORT_C TTimeIntervalSeconds PositionL(); |
|
81 |
|
82 /** |
|
83 * |
|
84 * @since S60 v3.2 |
|
85 */ |
|
86 IMPORT_C TTimeIntervalSeconds DurationL(); |
|
87 |
|
88 /** |
|
89 * |
|
90 * @since S60 v3.2 |
|
91 */ |
|
92 IMPORT_C void SetPositionL (const TTimeIntervalSeconds &aPosition); |
|
93 |
|
94 |
|
95 public: |
|
96 |
|
97 /** |
|
98 * |
|
99 * @since S60 v3.2 |
|
100 */ |
|
101 IMPORT_C void SetSessionObserver( |
|
102 MMusEngClipSessionObserver* aSessionObserver ); |
|
103 |
|
104 |
|
105 public: // implementation of virtual API from CMusEngMceOutSession |
|
106 |
|
107 /** |
|
108 * Resumes previously paused session. |
|
109 * Continues showing file on display, resumes clip's audio, continues |
|
110 * playing file and enables streaming to network. |
|
111 * |
|
112 * @since S60 v3.2 |
|
113 */ |
|
114 IMPORT_C void PlayL(); |
|
115 |
|
116 /** |
|
117 * Pauses session. |
|
118 * Holds display, mutes clip's audio, pauses file and |
|
119 * disables all streaming to network. |
|
120 * |
|
121 * @since S60 v3.2 |
|
122 */ |
|
123 IMPORT_C void PauseL(); |
|
124 |
|
125 |
|
126 protected: // implementation of virtual helper from CMusEngMceOutSession |
|
127 |
|
128 /** |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 */ |
|
132 void CompleteSessionStructureL(); |
|
133 |
|
134 |
|
135 private: |
|
136 |
|
137 /** |
|
138 * |
|
139 * @since S60 v3.2 |
|
140 */ |
|
141 CMusEngClipSession( MMusEngClipSessionObserver* aSessionObserver, |
|
142 const TRect& aRect, |
|
143 TUint aSipProfileId = 0 ); |
|
144 |
|
145 /** |
|
146 * @leave KErrPermissionDenied if file is DRM protected |
|
147 * @since S60 v3.2 |
|
148 */ |
|
149 void ConstructL( const TDesC& aFileName ); |
|
150 |
|
151 |
|
152 private: // HELPERS |
|
153 |
|
154 /** |
|
155 * |
|
156 * @since S60 v3.2 |
|
157 */ |
|
158 TBool IsProtectedFileL( const TDesC& aClipFile ); |
|
159 |
|
160 /** |
|
161 * Constructs audio stream structure during session completion and adds |
|
162 * it to session. |
|
163 * @pre iSession != NULL |
|
164 * @pre iFileSource != NULL |
|
165 */ |
|
166 void ConstructAudioStructureL(); |
|
167 |
|
168 public: // Data |
|
169 |
|
170 CMceFileSource* iFileSource; |
|
171 |
|
172 }; |
|
173 |
|
174 #endif |
|
175 |