2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Representing filter based on the geographical area
19 #ifndef LBTTRIGGERFILTERBYAREA_H
20 #define LBTTRIGGERFILTERBYAREA_H
22 #include <lbttriggerfilterbase.h>
24 class CLbtGeoAreaBase;
27 * Class representing filter based on the geographical area.
29 * This class defines the geographical area filter used in retrieving triggers
30 * from Location Triggering Server. When this filter is used, only triggers that
31 * are inside the defined area will be retrieved. The area can be a geographical
32 * circle or rectangle.
34 * If the area is not set and the filter is used in listing triggers, no trigger
37 * If the center of the geographical circular area is not specified(NaN),
38 * latest acquired location of the Location Triggering Server is
39 * used as the center. If the radius of the geographical circular area is zero,
40 * no triggers will be retrieved.
45 class CLbtTriggerFilterByArea : public CLbtTriggerFilterBase
49 * Returns CLbtTriggerFilterBase::EFilterByArea.
51 * @return CLbtTriggerFilterBase::EFilterByArea.
53 IMPORT_C virtual TFilterType Type() const;
56 * Constructs a new instance of CLbtTriggerFilterByArea.
58 * @param[in] aArea Pointer to the geographical area object.
59 * Ownership of aArea is transferred to this object.
60 * If the center of the geographical circular area is omitted,
61 * latest acquired location is used when retrieving triggers.
62 * @return New instance of CLbtTriggerFilterByArea.
64 IMPORT_C static CLbtTriggerFilterByArea* NewL(
65 CLbtGeoAreaBase* aArea );
68 * Constructs a new instance of CLbtTriggerFilterByArea.
69 * The returned object has no geographical area set.
71 * @return New instance of CLbtTriggerFilterByArea.
73 IMPORT_C static CLbtTriggerFilterByArea* NewL();
76 * Constructs a new instance of CLbtTriggerFilterByArea
77 * and pushes it onto cleanup stack.
78 * The returned object has no geographical area set.
80 * @return New instance of CLbtTriggerFilterByArea.
82 IMPORT_C static CLbtTriggerFilterByArea* NewLC();
87 IMPORT_C virtual ~CLbtTriggerFilterByArea();
90 * Gets the geographical area, inside which the triggers are
93 * If the area has not been set, this function returns NULL.
95 * @return The pointer to the geographical area object. Ownership is not
96 * transferred to the client.
98 IMPORT_C CLbtGeoAreaBase* Area();
101 * Sets the geographical area in the filter. Only triggers that have
102 * triggering area inside the defined area are retrieved.
104 * @param[in] aArea The pointer to the geographical area object.
105 * Ownership of aArea is transferred to this object.
106 * If the area is a geographical circular area and the center of the
107 * area is not set, latest acquired location is used by Location
108 * Triggering Server when retrieving triggers.
110 IMPORT_C void SetArea( CLbtGeoAreaBase* aArea );
114 * Externalize method that subclass must implement.
115 * @param[in] aStream Stream to which the object should be externalized.
117 virtual void DoExternalizeL(RWriteStream& aStream) const ;
120 * Internalize method that subclass must implement.
121 * @param[in] aStream Stream from which the object should be internalized.
123 virtual void DoInternalizeL(RReadStream& aStream) ;
128 * Default constructor.
130 void ConstructL(CLbtGeoAreaBase* aArea);
133 * By default, prohibit copy constructor
135 CLbtTriggerFilterByArea( const CLbtTriggerFilterByArea& );
138 * Prohibit assigment operator
140 CLbtTriggerFilterByArea& operator= ( const CLbtTriggerFilterByArea& );
145 CLbtTriggerFilterByArea();
149 * The geographical area that the trigger lies in
151 CLbtGeoAreaBase* iGeoArea;
156 #endif // LBTTRIGGERFILTERBYAREA_H