|
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: class for information for a location based trigger |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LBT_CONTAINER_TRIGGER_INFO_H |
|
20 #define C_LBT_CONTAINER_TRIGGER_INFO_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <lbtcommon.h> |
|
24 |
|
25 /** |
|
26 * This class contains extended trigger information that is used |
|
27 * by the Strategy component. |
|
28 * The information is calculated and stored in the container by the |
|
29 * server logic component. |
|
30 * |
|
31 * @lib lbtcontainer.lib |
|
32 * @since S60 v4.0 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CLbtExtendedTriggerInfo ) : public CBase |
|
35 { |
|
36 public: |
|
37 /** Structure used to store trigger information calculated by the Server Logic |
|
38 */ |
|
39 struct TLbtTriggerRectArea |
|
40 { |
|
41 TReal iTrigAreaSouthLat; |
|
42 TReal iTrigAreaNorthLat; |
|
43 TReal iTrigAreaEastLong; |
|
44 TReal iTrigAreaWestLong; |
|
45 }; |
|
46 |
|
47 public: |
|
48 IMPORT_C static CLbtExtendedTriggerInfo* NewL(); |
|
49 |
|
50 IMPORT_C static CLbtExtendedTriggerInfo* NewL( |
|
51 TLbtTriggerRectArea aArea, |
|
52 TReal aHystRadius, |
|
53 TBool aFired, |
|
54 const TDesC8& aStrategyOpaqueData, |
|
55 TSecureId aOwnerSid, |
|
56 TBool aFireOnCreation = ETrue); |
|
57 |
|
58 IMPORT_C virtual ~CLbtExtendedTriggerInfo(); |
|
59 |
|
60 IMPORT_C const TLbtTriggerRectArea TriggerReactangleArea() const; |
|
61 IMPORT_C void SetTriggerRectangleArea(const TLbtTriggerRectArea& aArea); |
|
62 |
|
63 IMPORT_C const TReal& HysteresisRadius() const; |
|
64 IMPORT_C void SetHysteresisRadius(const TReal& aHystRadius); |
|
65 |
|
66 IMPORT_C TBool IsTriggerFired() const; |
|
67 IMPORT_C void SetTriggerFiredState(TBool aFired); |
|
68 |
|
69 IMPORT_C const TDesC8& StategyData() const; |
|
70 IMPORT_C void SetStrategyDataL(const TDesC8& aStrategyData); |
|
71 |
|
72 IMPORT_C const TSecureId& OwnerSid() const; |
|
73 IMPORT_C void SetOwnerSid(const TSecureId& aOwnerSid); |
|
74 |
|
75 IMPORT_C TLbtTriggerFireInfo GetFiredInfo() const; |
|
76 IMPORT_C void SetFiredInfo(TLbtTriggerFireInfo aFiredInfo); |
|
77 |
|
78 IMPORT_C TBool IsTriggerFireOnCreation() const; |
|
79 IMPORT_C void SetTriggerFireOnCreation(TBool aFireOnCreation); |
|
80 |
|
81 |
|
82 private: |
|
83 CLbtExtendedTriggerInfo(); |
|
84 |
|
85 void ConstructL(); |
|
86 |
|
87 void ConstructL( |
|
88 TLbtTriggerRectArea aArea, |
|
89 TReal aHystRadius, |
|
90 TBool aFired, |
|
91 const TDesC8& aStrategyOpaqueData, |
|
92 TSecureId aOwnerSid, |
|
93 TBool aFireOnCreation); |
|
94 |
|
95 private: // data members |
|
96 TLbtTriggerRectArea iArea; |
|
97 TReal iHystRadius; |
|
98 TBool iFired; |
|
99 TLbtTriggerFireInfo iFiredInfo; |
|
100 HBufC8* iStrategyData; |
|
101 TSecureId iOwnerSid; |
|
102 TBool iFireOnCreation; |
|
103 }; |
|
104 |
|
105 #endif // C_LBT_CONTAINER_TRIGGER_INFO_H |