|
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: Declaration of CSAnimEngine class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SANIMENGINE_H |
|
20 #define SANIMENGINE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <gdi.h> // For TDisplayMode. |
|
24 |
|
25 class MSAnimObserver; |
|
26 class RFs; |
|
27 |
|
28 /** |
|
29 * Start-up Animation Engine interface class. |
|
30 * |
|
31 * @lib None |
|
32 * @since S60 3.2 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CSAnimEngine ) : public CBase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Constructs a CSAnimEngine object. |
|
41 * |
|
42 * @since S60 3.2 |
|
43 * |
|
44 * @param aFs Fileserver reference. |
|
45 * @param aObserver Observer for animation events.. |
|
46 * @return The new object |
|
47 */ |
|
48 IMPORT_C static CSAnimEngine* NewL( RFs& aFs, MSAnimObserver& aObserver ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 * |
|
53 * @since S60 3.2 |
|
54 */ |
|
55 virtual ~CSAnimEngine(); |
|
56 |
|
57 /** |
|
58 * Set the file name identifying the image / animation to show and other |
|
59 * properties that affect how the image / animation is shown. |
|
60 * |
|
61 * @since S60 3.2 |
|
62 * |
|
63 * @param aImageFileName Identifies the image file to use. |
|
64 * @param aDisplayMode Display mode to use, if supported by the image. |
|
65 * @param aSize Requested size for the image. |
|
66 * @param aFrameDelay Frame delay to use. |
|
67 * @param aScalingEnabled Identifies whether to try to scale the image to fit |
|
68 * the screen size or just use the target size of the animation as it is. |
|
69 * @param aRepeatCount How many times to repeat the animation. |
|
70 * Zero indicates infinite. For future use - not currently used. |
|
71 * @return KErrNone if file was found, a plug-in for the file type was found |
|
72 * and successfully loaded. One of the system-wide error codes otherwise. |
|
73 */ |
|
74 virtual TInt SetImageProperties( |
|
75 const TDesC& aImageFileName, |
|
76 const TDisplayMode aDisplayMode, |
|
77 const TSize& aSize, |
|
78 const TTimeIntervalMicroSeconds32& aFrameDelay, |
|
79 const TBool aScalingEnabled, |
|
80 const TInt aRepeatCount ) = 0; |
|
81 |
|
82 /** |
|
83 * Set the file name identifying the tone to play and other properties that |
|
84 * affect how the tone is played. |
|
85 * |
|
86 * @since S60 3.2 |
|
87 * |
|
88 * @param aToneFileName Identifies the tone file to use. |
|
89 * @param aVolume Volume level to use. |
|
90 * @param aVolumeRamp Volume ramp: the period over which the volume level is |
|
91 * to rise smoothly from nothing to the normal volume level. |
|
92 * @param aRepeatCount How many times to repeat the tone. |
|
93 * Zero indicates infinite. For future use - not currently used. |
|
94 * @return KErrNone if file was found, a plug-in for the file type was found |
|
95 * and successfully loaded. One of the system-wide error codes otherwise. |
|
96 */ |
|
97 virtual TInt SetToneProperties( |
|
98 const TDesC& aToneFileName, |
|
99 const TInt aVolume, |
|
100 const TTimeIntervalMicroSeconds& aVolumeRamp, |
|
101 const TInt aRepeatCount ) = 0; |
|
102 |
|
103 /** |
|
104 * Load the parts of the show (image/animation and/or tone) from file(s). |
|
105 * Completes immediately with KErrNone if the show has no parts. |
|
106 * |
|
107 * @since S60 3.2 |
|
108 * |
|
109 * @param aStatus Request to complete when loading is complete. |
|
110 */ |
|
111 virtual void Load( TRequestStatus& aStatus ) = 0; |
|
112 |
|
113 /** |
|
114 * Get the backgroud colour of the image. |
|
115 * Should only be called after successfully loading the image. |
|
116 * |
|
117 * @since S60 3.2 |
|
118 * |
|
119 * @return The backgroud colour requested for the image. |
|
120 */ |
|
121 virtual TRgb BackroundColour() const = 0; |
|
122 |
|
123 /** |
|
124 * Start the show (image/animation and/or tone). |
|
125 * Completes immediately with KErrNone if the show has no parts. |
|
126 * |
|
127 * @since S60 3.2 |
|
128 * |
|
129 * @param aStatus Request to complete when all parts of the show have |
|
130 * finished. |
|
131 */ |
|
132 virtual void Start( TRequestStatus& aStatus ) = 0; |
|
133 |
|
134 /** |
|
135 * Cancel activity. |
|
136 * |
|
137 * @since S60 3.2 |
|
138 */ |
|
139 virtual void Cancel() = 0; |
|
140 |
|
141 protected: |
|
142 |
|
143 /** |
|
144 * Constructor. |
|
145 * |
|
146 * @since S60 3.2 |
|
147 */ |
|
148 CSAnimEngine(); |
|
149 |
|
150 private: |
|
151 |
|
152 /** Copy constructor. */ |
|
153 CSAnimEngine( const CSAnimEngine& ); |
|
154 /** Assignment operator. */ |
|
155 CSAnimEngine& operator=( const CSAnimEngine& ); |
|
156 |
|
157 }; |
|
158 |
|
159 #endif // SANIMENGINE_H |