|
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: Data class for trigger information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef LBTTRIGGERINFO_H |
|
20 #define LBTTRIGGERINFO_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <lbtcommon.h> |
|
24 #include <s32strm.h> |
|
25 |
|
26 class CLbtTriggerEntry; |
|
27 struct TLbtTriggerDynamicInfo; |
|
28 |
|
29 |
|
30 /** |
|
31 * Data class for trigger information. The trigger information contains trigger |
|
32 * entry and trigger dynamic information. |
|
33 * |
|
34 * @lib lbt.lib |
|
35 * |
|
36 * @since S60 5.1 |
|
37 */ |
|
38 class CLbtTriggerInfo : public CBase |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Constructs a new instance of trigger information object. |
|
43 * |
|
44 * @return The new instance of trigger information object. |
|
45 */ |
|
46 IMPORT_C static CLbtTriggerInfo* NewL(); |
|
47 |
|
48 /** |
|
49 * Constructs a new instance of trigger information object |
|
50 * and pushes it onto cleanup stack. |
|
51 * |
|
52 * @return The new instance of trigger information object. |
|
53 */ |
|
54 IMPORT_C static CLbtTriggerInfo* NewLC(); |
|
55 |
|
56 /** |
|
57 * Constructs a new instance of trigger information object. |
|
58 * |
|
59 * @param[in] aEntry The pointer to the trigger entry. |
|
60 * Ownership is transferred to this object. |
|
61 * @param[in] aDynInfo The pointer to the trigger dynamic |
|
62 * information object. Ownership is transferred to this object. |
|
63 * @return The new instance of trigger information object. |
|
64 */ |
|
65 IMPORT_C static CLbtTriggerInfo* NewL( |
|
66 CLbtTriggerEntry* aEntry, |
|
67 TLbtTriggerDynamicInfo* aDynInfo ); |
|
68 |
|
69 /** |
|
70 * Destructor |
|
71 */ |
|
72 IMPORT_C virtual ~CLbtTriggerInfo(); |
|
73 |
|
74 /** |
|
75 * Gets trigger entry object. |
|
76 * |
|
77 * @return Pointer to the trigger entry object. Ownership is |
|
78 * not transferred to the client. |
|
79 */ |
|
80 IMPORT_C CLbtTriggerEntry* TriggerEntry(); |
|
81 |
|
82 /** |
|
83 * Sets trigger entry. |
|
84 * |
|
85 * @param[in] aEntry The trigger entry object. Ownership is |
|
86 * transferred to this object. |
|
87 */ |
|
88 IMPORT_C void SetTriggerEntry( CLbtTriggerEntry* aEntry ); |
|
89 |
|
90 /** |
|
91 * Gets trigger dynamic information object. |
|
92 * |
|
93 * @return Pointer to the trigger dynamic information object. |
|
94 * Ownership is not transferred to the client. |
|
95 */ |
|
96 IMPORT_C TLbtTriggerDynamicInfo* DynInfo(); |
|
97 |
|
98 /** |
|
99 * Sets trigger dynamic information object. |
|
100 * |
|
101 * @param[in] aDynInfo Pointer to the trigger dynamic |
|
102 * information object. Ownership is transferred to this object. |
|
103 */ |
|
104 IMPORT_C void SetDynInfo( TLbtTriggerDynamicInfo* aDynInfo ); |
|
105 |
|
106 |
|
107 /** |
|
108 * Internalizes the trigger object's details and attributes |
|
109 * from stream. |
|
110 * |
|
111 * The presence of this function means that the standard template |
|
112 * operator>>() ( defined in s32strm.h ) is available to internalize objects |
|
113 * of this class. |
|
114 * |
|
115 * @param[in] aStream Stream from which the object should be internalized. |
|
116 */ |
|
117 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
118 |
|
119 /** |
|
120 * Externalizes the trigger object's details and attributes |
|
121 * to stream. |
|
122 * |
|
123 * The presence of this function means that the standard template |
|
124 * operator<<() ( defined in s32strm.h ) is available to externalize objects |
|
125 * of this class. |
|
126 * |
|
127 * @param[in] aStream Stream to which the object should be externalized. |
|
128 */ |
|
129 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
130 |
|
131 protected: |
|
132 /** |
|
133 * Default constructor. |
|
134 */ |
|
135 CLbtTriggerInfo(); |
|
136 |
|
137 private: |
|
138 /** |
|
139 * Symbian 2nd phase constructor. |
|
140 */ |
|
141 void ConstructL(CLbtTriggerEntry* aEntry, |
|
142 TLbtTriggerDynamicInfo* aDynInfo); |
|
143 |
|
144 /** |
|
145 * Symbian 2nd phase constructor. |
|
146 */ |
|
147 void ConstructL(); |
|
148 |
|
149 /** |
|
150 * By default, prohibit copy constructor |
|
151 */ |
|
152 CLbtTriggerInfo( const CLbtTriggerInfo& ); |
|
153 |
|
154 /** |
|
155 * Prohibit assigment operator |
|
156 */ |
|
157 CLbtTriggerInfo& operator= ( const CLbtTriggerInfo& ); |
|
158 |
|
159 |
|
160 private:// data |
|
161 /** |
|
162 * Trigger entry |
|
163 */ |
|
164 CLbtTriggerEntry* iEntry; |
|
165 |
|
166 /** |
|
167 * Trigger dynamic info |
|
168 */ |
|
169 TLbtTriggerDynamicInfo* iDynInfo; |
|
170 }; |
|
171 |
|
172 #endif // LBTTRIGGERINFO_H |