|
1 /* |
|
2 * Copyright (c) 2007 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 * Message Editor interface class for asynchronous controls. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MMSGASYNCCONTROL_H |
|
22 #define MMSGASYNCCONTROL_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <msgasynccontrolobserver.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // DATA TYPES |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class RFile; |
|
38 |
|
39 // DATA TYPES |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 // ========================================================== |
|
44 |
|
45 /** |
|
46 * Message Editor Base common interface class for asynchronous controls |
|
47 * |
|
48 * @since 3.2 |
|
49 * @lib MsgEditorView.lib |
|
50 */ |
|
51 class MMsgAsyncControl |
|
52 { |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Load media to from given file handle to media control. |
|
57 * |
|
58 * @param aFileHandle Valid file handle. |
|
59 */ |
|
60 virtual void LoadL( RFile& aFileHandle ) = 0; |
|
61 |
|
62 /** |
|
63 * Closes control. Closing means freeing file |
|
64 * specific resources that other application can use the file. |
|
65 * This function also takes care of stopping playin, if needed |
|
66 */ |
|
67 virtual void Close() = 0; |
|
68 |
|
69 /** |
|
70 * Cancels the asyncronous operation if it is pending. |
|
71 */ |
|
72 virtual void Cancel() = 0; |
|
73 |
|
74 /** |
|
75 * Return current state. |
|
76 */ |
|
77 virtual TMsgAsyncControlState State() const = 0; |
|
78 |
|
79 /** |
|
80 * Return error code of the operation. |
|
81 */ |
|
82 virtual TInt Error() const = 0; |
|
83 |
|
84 /** |
|
85 * Adds observer. |
|
86 */ |
|
87 virtual void AddObserverL( MMsgAsyncControlObserver& aObserver ) = 0; |
|
88 |
|
89 /** |
|
90 * Removes observer. |
|
91 */ |
|
92 virtual void RemoveObserver( MMsgAsyncControlObserver& aObserver ) = 0; |
|
93 }; |
|
94 |
|
95 #endif // MMSGASYNCCONTROL_H |