|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "AnimationDataProvider.h" |
|
17 #include "AnimationMixins.h" |
|
18 |
|
19 |
|
20 /** |
|
21 Constructor |
|
22 */ |
|
23 EXPORT_C CAnimationDataProvider::CAnimationDataProvider() |
|
24 { |
|
25 } |
|
26 |
|
27 /** |
|
28 Sets the destination for data from this data provider. |
|
29 |
|
30 You do not need to call this function unless you are writing a new animation |
|
31 type. |
|
32 |
|
33 @param aObserver The destination to send data to. Usually an animation class. |
|
34 */ |
|
35 EXPORT_C void CAnimationDataProvider::SetObserver(MAnimationDataProviderObserver* aObserver) |
|
36 { |
|
37 iObserver = aObserver; |
|
38 } |
|
39 |
|
40 /** |
|
41 Sends an event with no associated data to the observer. |
|
42 |
|
43 See SendEventL(TInt,TAny*,TInt) for further details. |
|
44 @param aEvent The event to pass. This may be a member of TAnimationEvent, or a |
|
45 user defined value. User defined events must be greater than EAnimationReservedEvents |
|
46 */ |
|
47 EXPORT_C void CAnimationDataProvider::SendEventL(TInt aEvent) |
|
48 { |
|
49 iObserver->DataProviderEventL(aEvent, 0, 0); |
|
50 } |
|
51 |
|
52 /** |
|
53 Sends an event with a single integer data item to the observer. |
|
54 |
|
55 See SendEventL(TInt,TAny*,TInt) for further details. |
|
56 @param aEvent The event to pass. This may be a member of TAnimationEvent, or a |
|
57 user defined value. User defined events must be greater than EAnimationReservedEvents |
|
58 @param aData A pointer to the data to send |
|
59 */ |
|
60 EXPORT_C void CAnimationDataProvider::SendEventL(TInt aEvent, TInt aData) |
|
61 { |
|
62 iObserver->DataProviderEventL(aEvent, &aData, sizeof(TInt)); |
|
63 } |
|
64 |
|
65 /** |
|
66 Sends an event with an arbitrary size data item to the observer. |
|
67 |
|
68 @see TAnimationEvent |
|
69 @param aEvent The event to pass. This may be a member of TAnimationEvent, or a |
|
70 user defined value. User defined events must be greater than EAnimationReservedEvents |
|
71 @param aData A pointer to the data to send |
|
72 @param aDataSize The size of the data item passed in aData |
|
73 */ |
|
74 EXPORT_C void CAnimationDataProvider::SendEventL(TInt aEvent, TAny* aData, TInt aDataSize) |
|
75 { |
|
76 iObserver->DataProviderEventL(aEvent, aData, aDataSize); |
|
77 } |
|
78 |
|
79 /** Reserved for future use */ |
|
80 EXPORT_C void CAnimationDataProvider::CAnimationDataProvider_Reserved1() { } |
|
81 |
|
82 /** Reserved for future use */ |
|
83 EXPORT_C void CAnimationDataProvider::CAnimationDataProvider_Reserved2() { } |
|
84 |
|
85 /** Reserved for future use */ |
|
86 EXPORT_C void MAnimationDataProviderObserver::MAnimationDataProviderObserver_Reserved1() |
|
87 { |
|
88 } |
|
89 |
|
90 /** Reserved for future use */ |
|
91 EXPORT_C void MAnimationDataProviderObserver::MAnimationDataProviderObserver_Reserved2() |
|
92 { |
|
93 } |
|
94 |
|
95 /** Reserved for future use */ |
|
96 EXPORT_C void MAnimationDrawer::MAnimationDrawer_Reserved1() |
|
97 { |
|
98 } |
|
99 |
|
100 /** Reserved for future use */ |
|
101 EXPORT_C void MAnimationDrawer::MAnimationDrawer_Reserved2() |
|
102 { |
|
103 } |
|
104 |
|
105 /** Reserved for future use */ |
|
106 EXPORT_C void MAnimationObserver::MAnimationObserver_Reserved1() |
|
107 { |
|
108 } |
|
109 |
|
110 /** Reserved for future use */ |
|
111 EXPORT_C void MAnimationObserver::MAnimationObserver_Reserved2() |
|
112 { |
|
113 } |
|
114 |
|
115 /** Reserved for future use */ |
|
116 EXPORT_C void MAnimationTickee::MAnimationTickee_Reserved1() |
|
117 { |
|
118 } |
|
119 |
|
120 /** Reserved for future use */ |
|
121 EXPORT_C void MAnimationTickee::MAnimationTickee_Reserved2() |
|
122 { |
|
123 } |