|
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 CSAnimPlugin class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SANIMPLUGIN_H |
|
20 #define SANIMPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class RFs; |
|
25 |
|
26 /** |
|
27 * Base class for all start-up animation plug-in interface classes |
|
28 * |
|
29 * @lib None |
|
30 * @since S60 3.2 |
|
31 */ |
|
32 class CSAnimPlugin : public CBase |
|
33 { |
|
34 |
|
35 protected: |
|
36 |
|
37 /** |
|
38 * Constructor. |
|
39 * |
|
40 * @since S60 3.2 |
|
41 */ |
|
42 CSAnimPlugin(); |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Set the repeat count value for the plug-in. |
|
48 * |
|
49 * @since S60 3.2 |
|
50 * |
|
51 * @param aRepeatCount How many times to repeat playing the plug-in content. |
|
52 * Zero indicates infinite. |
|
53 */ |
|
54 IMPORT_C void SetRepeatCount( const TInt aRepeatCount ); |
|
55 |
|
56 /** |
|
57 * Load a file. |
|
58 * |
|
59 * @since S60 3.2 |
|
60 * |
|
61 * @param aFs Fileserver reference. |
|
62 * @param aFileName Name of the file to load. |
|
63 * @param aStatus Request to complete when the contents of the file have |
|
64 * been loaded. |
|
65 */ |
|
66 virtual void Load( |
|
67 RFs& aFs, |
|
68 const TDesC& aFileName, |
|
69 TRequestStatus& aStatus ) = 0; |
|
70 |
|
71 /** |
|
72 * Start the plug-in activity (playing a tone or an animation or showing an |
|
73 * image). |
|
74 * |
|
75 * @since S60 3.2 |
|
76 * |
|
77 * @param aStatus Request to complete when activity has finished. |
|
78 */ |
|
79 virtual void Start( TRequestStatus& aStatus ) = 0; |
|
80 |
|
81 /** |
|
82 * Cancel activity. |
|
83 * |
|
84 * @since S60 3.2 |
|
85 */ |
|
86 virtual void Cancel() = 0; |
|
87 |
|
88 protected: |
|
89 |
|
90 /** |
|
91 * Complete client request with the given status code. |
|
92 * |
|
93 * @since S60 3.2 |
|
94 * |
|
95 * @param aStatusCode KErrNone or one of Symbian error codes. |
|
96 */ |
|
97 IMPORT_C void CompleteClientRequest( const TInt aStatusCode ); |
|
98 |
|
99 /** |
|
100 * Set request pending and store request status to member variable. |
|
101 * |
|
102 * @since S60 3.2 |
|
103 * |
|
104 * @param aStatus Request status from client. |
|
105 */ |
|
106 IMPORT_C void SetClientRequest( TRequestStatus& aStatus ); |
|
107 |
|
108 private: |
|
109 |
|
110 /** Copy constructor. */ |
|
111 CSAnimPlugin( const CSAnimPlugin& ); |
|
112 /** Assignment operator. */ |
|
113 CSAnimPlugin& operator=( const CSAnimPlugin& ); |
|
114 |
|
115 protected: // data |
|
116 |
|
117 /** To be used to inform client about request completion. May be NULL. Not owned. */ |
|
118 TRequestStatus* iClientStatus; |
|
119 |
|
120 /** |
|
121 * Indicates how many times to repeat playing the plug-in content. |
|
122 * Zero indicates infinite. |
|
123 */ |
|
124 TInt iRepeatCount; |
|
125 |
|
126 TAny* iReserved1; /** Reserved for future use. */ |
|
127 TAny* iReserved2; /** Reserved for future use. */ |
|
128 TInt iReserved3; /** Reserved for future use. */ |
|
129 TInt iReserved4; /** Reserved for future use. */ |
|
130 |
|
131 }; |
|
132 |
|
133 #endif // SANIMPLUGIN_H |