1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Declares Base service API for all providers to implement in order to |
|
17 * offer services to Application Interworking Framework. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef _VIDEOPROVIDER_H |
|
23 #define _VIDEOPROVIDER_H |
|
24 |
|
25 //<IBUDSW> |
|
26 |
|
27 #include <AiwServiceIfMenu.h> |
|
28 #include <apparc.h> |
|
29 #include <ConeResLoader.h> |
|
30 #include <AknServerApp.h> |
|
31 #include "SimpleVideoEditor.h" |
|
32 |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class MAiwNotifyCallback; |
|
36 class CAknOpenFileService; |
|
37 class TDataType; |
|
38 |
|
39 |
|
40 class CVideoProvider : public CAiwServiceIfMenu, |
|
41 public MAknServerAppExitObserver, |
|
42 public MSimpleVideoEditorExitObserver |
|
43 { |
|
44 public: |
|
45 /** New factory method |
|
46 * |
|
47 * |
|
48 * @param - |
|
49 * @return - pointer to a new instance of CEditorProvider |
|
50 */ |
|
51 static CVideoProvider* NewL(); |
|
52 |
|
53 /** Destructor |
|
54 * |
|
55 * @param - |
|
56 * @return - |
|
57 */ |
|
58 ~CVideoProvider(); |
|
59 |
|
60 public: |
|
61 /** InitialiseL |
|
62 * |
|
63 * @see CAiwServiceIfBase |
|
64 */ |
|
65 virtual void InitialiseL ( |
|
66 MAiwNotifyCallback & aFrameworkCallback, |
|
67 const RCriteriaArray & aInterest |
|
68 ); |
|
69 |
|
70 /** HandleServiceCmdL |
|
71 * |
|
72 * @see CAiwServiceIfBase |
|
73 */ |
|
74 virtual void HandleServiceCmdL ( |
|
75 const TInt & aCmdId, |
|
76 const CAiwGenericParamList & aInParamList, |
|
77 CAiwGenericParamList & aOutParamList, |
|
78 TUint aCmdOptions = 0, |
|
79 const MAiwNotifyCallback * aCallback = NULL |
|
80 ); |
|
81 |
|
82 /** InitializeMenuPaneL |
|
83 * |
|
84 * @see CAiwServiceIfMenu |
|
85 */ |
|
86 virtual void InitializeMenuPaneL ( |
|
87 CAiwMenuPane & aMenuPane, |
|
88 TInt aIndex, |
|
89 TInt aCascadeId, |
|
90 const CAiwGenericParamList & aInParamList |
|
91 ); |
|
92 |
|
93 /** HandleMenuCmdL |
|
94 * |
|
95 * @see CAiwServiceIfMenu |
|
96 */ |
|
97 virtual void HandleMenuCmdL ( |
|
98 TInt aMenuCmdId, |
|
99 const CAiwGenericParamList & aInParamList, |
|
100 CAiwGenericParamList & aOutParamList, |
|
101 TUint aCmdOptions = 0, |
|
102 const MAiwNotifyCallback * aCallback = NULL |
|
103 ); |
|
104 |
|
105 /** HandleServerAppExit |
|
106 * |
|
107 * @see MAknServerAppExitObserver |
|
108 */ |
|
109 virtual void HandleServerAppExit (TInt aReason); |
|
110 |
|
111 /** HandleSimpleVideoEditorExit |
|
112 * |
|
113 * @see MSimpleVideoEditorExitObserver |
|
114 */ |
|
115 virtual void HandleSimpleVideoEditorExit (TInt aReason, const TDesC& aResultFileName); |
|
116 |
|
117 private: |
|
118 CVideoProvider(); |
|
119 |
|
120 private: |
|
121 /** |
|
122 * @param aMenuCmdId |
|
123 * @param aFileName |
|
124 * @param CAiwGenericParamList |
|
125 * @return - |
|
126 */ |
|
127 void LaunchEditorL( |
|
128 TInt aMenuCmdId, |
|
129 const TDesC & aFileName, |
|
130 const CAiwGenericParamList & aInParamList |
|
131 ); |
|
132 |
|
133 /** HandleCmdsL |
|
134 * |
|
135 * Handle menu and service commands |
|
136 * |
|
137 * @see HandleMenuCmdL |
|
138 * @see HandleServiceCmdL |
|
139 */ |
|
140 void HandleCmdsL ( |
|
141 TInt aMenuCmdId, |
|
142 const CAiwGenericParamList & aInParamList, |
|
143 CAiwGenericParamList & aOutParamList, |
|
144 TUint aCmdOptions, |
|
145 const MAiwNotifyCallback * aCallback |
|
146 ); |
|
147 |
|
148 TBool IsSupportedVideoFile (const TDesC& aDataType) const; |
|
149 TBool IsSupportedAudioFile (const TDesC& aDataType) const; |
|
150 TBool IsSupportedImageFile (const TDesC& aDataType) const; |
|
151 |
|
152 void FinalizeL (const TDesC& aFileName); |
|
153 void CloseFsSession(); |
|
154 |
|
155 private: // Data |
|
156 |
|
157 RFs iSharableFS; |
|
158 TFileName iResourceFile; |
|
159 RConeResourceLoader iResLoader; |
|
160 TBool iResFileIsLoaded; |
|
161 CAknOpenFileService * iOpenFileService; |
|
162 const MAiwNotifyCallback* iAiwNotifyCallback; |
|
163 #if defined(INCLUDE_SIMPLE_VIDEO_EDITOR) |
|
164 CSimpleVideoEditor* iSimpleVideoEditor; |
|
165 #endif |
|
166 CAiwGenericParamList* iInParamList; |
|
167 CAiwGenericParamList* iOutParamList; |
|
168 |
|
169 // Time stamp of the original file. If there are multiple files, |
|
170 // the most recent. |
|
171 TTime iOriginalTimeStamp; |
|
172 |
|
173 /// Media Gallery Albums support. |
|
174 /// List of albums where the source file(s) belong(s) to. |
|
175 RArray<TInt> iSourceMGAlbumIdList; |
|
176 }; |
|
177 |
|
178 //</IBUDSW> |
|
179 #endif |
|
180 |
|
181 // End of file |
|