|
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: Collection Ui Helper common observer interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MMPXCOLLECTIONUIHELPEROBSERVER_H |
|
20 #define MMPXCOLLECTIONUIHELPEROBSERVER_H |
|
21 |
|
22 #include <mpxmediageneraldefs.h> |
|
23 |
|
24 /** |
|
25 * Different operations handled by the collection helper |
|
26 */ |
|
27 enum TCHelperOperation |
|
28 { |
|
29 EAddOp, |
|
30 EDeleteOp, |
|
31 ESetOp, |
|
32 EEmbeddedOpenOp, |
|
33 EMoveOp, |
|
34 EExportPlaylistOp, |
|
35 ERenameOp, |
|
36 EReorderPlaylistOp, |
|
37 EDeleteStatusOp |
|
38 }; |
|
39 |
|
40 |
|
41 /** |
|
42 * Generic Observer class for the ui helper |
|
43 * A single callback function, but usable for all collection helper callbacks |
|
44 */ |
|
45 NONSHARABLE_CLASS( MMPXCHelperObserver ) |
|
46 { |
|
47 public: |
|
48 // ADD Operation |
|
49 /** |
|
50 * Handles the completion of adding a media event. |
|
51 * @since S60 3.2.3 |
|
52 * @param aOperation = EAddOp. |
|
53 * @param aArgument a media object representing the added media. |
|
54 * If this is the callback for adding a playlist media, |
|
55 * the content of this object is the same as what's |
|
56 * supplied in AddL, except that URI for the playlist |
|
57 * is added to the object upon successful processing |
|
58 * of AddL. Client should take over the ownership of |
|
59 * this object. NULL if an error has occured during |
|
60 * processing of AddL. |
|
61 * @param aErr the error code for AddL processing error. |
|
62 */ |
|
63 |
|
64 // SET Operation |
|
65 /** |
|
66 * Handles the completion of setting a media event. |
|
67 * @since S60 3.2.3 |
|
68 * @param aOperation = ESetOp. |
|
69 * @param aArgument a media object representing the updated media. |
|
70 * Client takes over the ownershop of this object. |
|
71 * @param aErr the error code for SetL processing error. |
|
72 */ |
|
73 |
|
74 // RENAME Operation |
|
75 /** |
|
76 * Handles the completion of renaming a media event. |
|
77 * @since S60 3.2.3 |
|
78 * @param aOperation = EDeleteOp. |
|
79 * @param aArgument a media object representing the renamed media. |
|
80 * @param aErr the error code for RenameL processing error |
|
81 */ |
|
82 virtual void HandleOperationCompleteL( TCHelperOperation aOperation, |
|
83 TInt aErr, |
|
84 void* aArgument ) = 0; |
|
85 }; |
|
86 |
|
87 /** |
|
88 * Observer class for the ui helper, embedded open mode |
|
89 */ |
|
90 NONSHARABLE_CLASS( MMPXCHelperEmbeddedOpenObserver ) |
|
91 { |
|
92 public: |
|
93 /** |
|
94 * Callback to the observer for embedded OpenL() result. |
|
95 * @since S60 3.2.3 |
|
96 * @param aErr error for the operation KErrNone if successful. |
|
97 * @param aCategory category of the file opened |
|
98 */ |
|
99 virtual void HandleEmbeddedOpenL( TInt aErr, TMPXGeneralCategory aCategory ) = 0; |
|
100 }; |
|
101 |
|
102 |
|
103 #endif // MMPXCOLLECTIONUIHELPEROBSERVER_H |