|
1 /* |
|
2 * Copyright (c) 2006 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: Media Fetch Implementation API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MEDIAFETCHIMPLEMENTATION_H |
|
20 #define MEDIAFETCHIMPLEMENTATION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <MediaFileTypes.hrh> |
|
24 |
|
25 class MMGFetchVerifier; |
|
26 class MMGFetchCanceler; |
|
27 |
|
28 /** |
|
29 * ECom interface for Media Fetch plug-in implementation. |
|
30 * |
|
31 * Plug-in implementation used for Media Fetch API functionality is selected |
|
32 * based on plug-ins' implementation information. |
|
33 * |
|
34 * Media types supported by the plug-in are defined in plug-in resource's |
|
35 * default_data. The value must be in hexadecimal format: |
|
36 * |
|
37 * LTEXT8 default_data; |
|
38 * |
|
39 * Example: default_data = "00000003" if both image (0x00000001) and video |
|
40 * (0x00000002) fetchers are supported by the plug-in. |
|
41 * |
|
42 * See MediaFileTypes.hrh for supported media types. |
|
43 * |
|
44 * If multiple plug-ins support the same media type(s) then the plug-in with |
|
45 * the highest version number is selected. |
|
46 * |
|
47 * BYTE version_no; |
|
48 * |
|
49 * See registryinfov2.rh for ECom resource structure information. |
|
50 * |
|
51 * @lib n/a |
|
52 * @since S60 v3.2 |
|
53 */ |
|
54 class CMediaFetchImplementation : public CBase |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 inline static CMediaFetchImplementation* NewL( |
|
60 const TUid& aImplementationUid ); |
|
61 |
|
62 inline virtual ~CMediaFetchImplementation(); |
|
63 |
|
64 /** |
|
65 * Optional feature. |
|
66 * By default fetcher is single selection fetcher. |
|
67 * If multi-selection is enabled then plug-in should display a |
|
68 * multi-selection fetcher and allow user to select several items. |
|
69 * @since S60 v3.2 |
|
70 * @param aMultiSelect if ETrue then multiselection fetcher is enabled |
|
71 */ |
|
72 virtual void SetMultiSelectionL( TBool aMultiSelect ) = 0; |
|
73 |
|
74 /** |
|
75 * Optional feature. |
|
76 * @since S60 v3.2 |
|
77 * @param aMimeTypes plug-in should show only files with given Mime types |
|
78 */ |
|
79 virtual void SetMimeTypesL( const MDesCArray& aMimeTypes ) = 0; |
|
80 |
|
81 /** |
|
82 * Optional feature. |
|
83 * Plug-in should use given text as selection key (SK1) label |
|
84 * @since S60 v3.2 |
|
85 * @param aSelectionSoftkey Custom selection softkey label |
|
86 */ |
|
87 virtual void SetSelectionSoftkeyL( const TDesC& aSelectionSoftkey ) = 0; |
|
88 |
|
89 /** |
|
90 * Optional feature |
|
91 * Plug-in should use given text as heading |
|
92 * @since S60 v3.2 |
|
93 * @param aHeading Custom heading text for fetcher |
|
94 */ |
|
95 virtual void SetHeadingL( const TDesC& aHeading ) = 0; |
|
96 |
|
97 /** |
|
98 * Optional feature. |
|
99 * Plug-in should call this interface before selection is done. |
|
100 * if MMGFetchVerifier::VerifySelectionL() returns ETrue |
|
101 * then the user's selection should be accepted and the fetcher |
|
102 * closed. If EFalse is returned then user should change the current |
|
103 * selection before it can be accepted and the fetcher closed. |
|
104 * @since S60 v3.2 |
|
105 * @param aVerifier See MMGFetchVerifier.h |
|
106 */ |
|
107 virtual void SetVerifierL( MMGFetchVerifier& aVerifier ) = 0; |
|
108 |
|
109 /** |
|
110 * Optional feature. |
|
111 * Plug-in should return canceler interface. |
|
112 * @since S60 v3.2 |
|
113 * @param aCanceler See MMGFetchCanceler.h |
|
114 */ |
|
115 virtual void GetCancelerL( MMGFetchCanceler*& aCanceler ) = 0; |
|
116 |
|
117 /** |
|
118 * Plug-in should launch fetcher popup for given media type. |
|
119 * @since S60 v3.2 |
|
120 * @param aSelectedFiles plug-in appends selected files to this array |
|
121 * @param aMediaType plug-in should display only files with this media type |
|
122 * return ETrue if user selected file(s), EFalse if use cancelled. |
|
123 */ |
|
124 virtual TBool LaunchL( CDesCArray& aSelectedFiles, |
|
125 TMediaFileType aMediaType ) = 0; |
|
126 |
|
127 private: // data |
|
128 |
|
129 // Own: ID key |
|
130 TUid iDtor_ID_Key; |
|
131 |
|
132 }; |
|
133 |
|
134 #include "mediafetchimplementation.inl" |
|
135 |
|
136 #endif // MEDIAFETCHIMPLEMENTATION_H |