author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:28:06 +0300 | |
branch | RCL_3 |
changeset 41 | 755f0370535b |
parent 33 | bc78a40cd63c |
permissions | -rw-r--r-- |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#ifndef MUSHENGCLIPSESSION_H |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#define MUSHENGCLIPSESSION_H |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
// USER |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "musengmceoutsession.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
33 | 25 |
|
26 |
class MMusEngClipSessionObserver; |
|
27 |
class CMusEngLiveSession; |
|
28 |
class CMceFileSource; |
|
29 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
class CMusEngClipSession : public CMusEngMceOutSession |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
{ |
33 | 32 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
public: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
* |
33 | 37 |
* @since S60 v3.2 |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
*/ |
33 | 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 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
* |
33 | 84 |
* @since S60 v3.2 |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
*/ |
33 | 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(); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
private: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
* |
33 | 139 |
* @since S60 v3.2 |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
*/ |
33 | 141 |
CMusEngClipSession( MMusEngClipSessionObserver* aSessionObserver, |
142 |
const TRect& aRect, |
|
143 |
TUint aSipProfileId = 0 ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
* @leave KErrPermissionDenied if file is DRM protected |
33 | 147 |
* @since S60 v3.2 |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
*/ |
33 | 149 |
void ConstructL( const TDesC& aFileName ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
|
33 | 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 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
}; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
#endif |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |