epoc32/include/mw/lbttriggerfilterbyarea.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/lbttriggerfilterbyarea.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,156 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Representing filter based on the geographical area
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef LBTTRIGGERFILTERBYAREA_H
    1.23 +#define LBTTRIGGERFILTERBYAREA_H
    1.24 +
    1.25 +#include <lbttriggerfilterbase.h>
    1.26 +
    1.27 +class CLbtGeoAreaBase;
    1.28 +
    1.29 +/**
    1.30 + * Class representing filter based on the geographical area.
    1.31 + *
    1.32 + * This class defines the geographical area filter used in retrieving triggers 
    1.33 + * from Location Triggering Server. When this filter is used, only triggers that 
    1.34 + * are inside the defined area will be retrieved. The area can be a geographical
    1.35 + * circle or rectangle. 
    1.36 + * 
    1.37 + * If the area is not set and the filter is used in listing triggers, no trigger 
    1.38 + * will be returned.
    1.39 + * 
    1.40 + * If the center of the geographical circular area is not specified(NaN), 
    1.41 + * latest acquired location of the Location Triggering Server is 
    1.42 + * used as the center. If the radius of the geographical circular area is zero, 
    1.43 + * no triggers will be retrieved.
    1.44 + *
    1.45 + * @lib lbt.lib
    1.46 + * @since S60 5.1
    1.47 + */
    1.48 +class CLbtTriggerFilterByArea : public CLbtTriggerFilterBase
    1.49 +    {
    1.50 +public:
    1.51 +    /**
    1.52 +     * Returns CLbtTriggerFilterBase::EFilterByArea.
    1.53 +     *
    1.54 +     * @return CLbtTriggerFilterBase::EFilterByArea.
    1.55 +     */
    1.56 +    IMPORT_C virtual TFilterType Type() const;
    1.57 +
    1.58 +    /**
    1.59 +     * Constructs a new instance of CLbtTriggerFilterByArea. 
    1.60 +     *
    1.61 +     * @param[in] aArea Pointer to the geographical area object. 
    1.62 +     * Ownership of aArea is transferred to this object. 
    1.63 +     * If the center of the geographical circular area is omitted, 
    1.64 +     * latest acquired location is used when retrieving triggers.
    1.65 +     * @return New instance of CLbtTriggerFilterByArea.
    1.66 +     */
    1.67 +    IMPORT_C static CLbtTriggerFilterByArea* NewL( 
    1.68 +        CLbtGeoAreaBase* aArea );
    1.69 +
    1.70 +    /**
    1.71 +     * Constructs a new instance of CLbtTriggerFilterByArea. 
    1.72 +     * The returned object has no geographical area set. 
    1.73 +     *
    1.74 +     * @return New instance of CLbtTriggerFilterByArea.
    1.75 +     */
    1.76 +    IMPORT_C static CLbtTriggerFilterByArea* NewL();
    1.77 +
    1.78 +    /**
    1.79 +     * Constructs a new instance of CLbtTriggerFilterByArea
    1.80 +     * and pushes it onto cleanup stack.
    1.81 +     * The returned object has no geographical area set. 
    1.82 +     *
    1.83 +     * @return New instance of CLbtTriggerFilterByArea.
    1.84 +     */
    1.85 +    IMPORT_C static CLbtTriggerFilterByArea* NewLC();
    1.86 +
    1.87 +    /**
    1.88 +     * Destructor.
    1.89 +     */
    1.90 +    IMPORT_C virtual ~CLbtTriggerFilterByArea();
    1.91 +    
    1.92 +    /**
    1.93 +     * Gets the geographical area, inside which the triggers are 
    1.94 +     * retrieved.
    1.95 +     *
    1.96 +     * If the area has not been set, this function returns NULL.
    1.97 +     *
    1.98 +     * @return The pointer to the geographical area object. Ownership is not
    1.99 +     * transferred to the client. 
   1.100 +     */
   1.101 +    IMPORT_C CLbtGeoAreaBase* Area();
   1.102 +
   1.103 +    /**
   1.104 +     * Sets the geographical area in the filter. Only triggers that have 
   1.105 +     * triggering area inside the defined area are retrieved.
   1.106 +     *
   1.107 +     * @param[in] aArea The pointer to the geographical area object. 
   1.108 +     * Ownership of aArea is transferred to this object.
   1.109 +     * If the area is a geographical circular area and the center of the
   1.110 +     * area is not set, latest acquired location is used by Location 
   1.111 +     * Triggering Server when retrieving triggers. 
   1.112 +     */
   1.113 +    IMPORT_C void SetArea( CLbtGeoAreaBase* aArea );
   1.114 +
   1.115 +protected:  
   1.116 +    /**
   1.117 +     * Externalize method that subclass must implement.
   1.118 +     * @param[in] aStream Stream to which the object should be externalized.
   1.119 +     */  
   1.120 +    virtual void DoExternalizeL(RWriteStream& aStream) const ;
   1.121 +    
   1.122 +    /**
   1.123 +     * Internalize method that subclass must implement.
   1.124 +     * @param[in] aStream Stream from which the object should be internalized.
   1.125 +     */
   1.126 +    virtual void DoInternalizeL(RReadStream& aStream)  ;
   1.127 +
   1.128 +
   1.129 +private:
   1.130 +    /**
   1.131 +     * Default constructor.
   1.132 +     */
   1.133 +    void ConstructL(CLbtGeoAreaBase* aArea);
   1.134 +    
   1.135 +    /**
   1.136 +     * By default, prohibit copy constructor
   1.137 +     */ 
   1.138 +    CLbtTriggerFilterByArea( const CLbtTriggerFilterByArea& );
   1.139 +    
   1.140 +    /**
   1.141 +     * Prohibit assigment operator
   1.142 +     */
   1.143 +    CLbtTriggerFilterByArea& operator= ( const CLbtTriggerFilterByArea& );
   1.144 +    
   1.145 +    /**
   1.146 +     * Constructor.
   1.147 +     */
   1.148 +    CLbtTriggerFilterByArea();
   1.149 +
   1.150 +private:
   1.151 +    /**
   1.152 +     * The geographical area that the trigger lies in
   1.153 +     */
   1.154 +    CLbtGeoAreaBase* iGeoArea;
   1.155 +
   1.156 +    };
   1.157 +
   1.158 +
   1.159 +#endif // LBTTRIGGERFILTERBYAREA_H