epoc32/include/mw/lbttriggerfilterbyarea.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* 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
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Representing filter based on the geographical area
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef LBTTRIGGERFILTERBYAREA_H
williamr@2
    20
#define LBTTRIGGERFILTERBYAREA_H
williamr@2
    21
williamr@2
    22
#include <lbttriggerfilterbase.h>
williamr@2
    23
williamr@2
    24
class CLbtGeoAreaBase;
williamr@2
    25
williamr@2
    26
/**
williamr@2
    27
 * Class representing filter based on the geographical area.
williamr@2
    28
 *
williamr@2
    29
 * This class defines the geographical area filter used in retrieving triggers 
williamr@2
    30
 * from Location Triggering Server. When this filter is used, only triggers that 
williamr@2
    31
 * are inside the defined area will be retrieved. The area can be a geographical
williamr@2
    32
 * circle or rectangle. 
williamr@2
    33
 * 
williamr@2
    34
 * If the area is not set and the filter is used in listing triggers, no trigger 
williamr@2
    35
 * will be returned.
williamr@2
    36
 * 
williamr@2
    37
 * If the center of the geographical circular area is not specified(NaN), 
williamr@2
    38
 * latest acquired location of the Location Triggering Server is 
williamr@2
    39
 * used as the center. If the radius of the geographical circular area is zero, 
williamr@2
    40
 * no triggers will be retrieved.
williamr@2
    41
 *
williamr@2
    42
 * @lib lbt.lib
williamr@2
    43
 * @since S60 5.1
williamr@2
    44
 */
williamr@2
    45
class CLbtTriggerFilterByArea : public CLbtTriggerFilterBase
williamr@2
    46
    {
williamr@2
    47
public:
williamr@2
    48
    /**
williamr@2
    49
     * Returns CLbtTriggerFilterBase::EFilterByArea.
williamr@2
    50
     *
williamr@2
    51
     * @return CLbtTriggerFilterBase::EFilterByArea.
williamr@2
    52
     */
williamr@2
    53
    IMPORT_C virtual TFilterType Type() const;
williamr@2
    54
williamr@2
    55
    /**
williamr@2
    56
     * Constructs a new instance of CLbtTriggerFilterByArea. 
williamr@2
    57
     *
williamr@2
    58
     * @param[in] aArea Pointer to the geographical area object. 
williamr@2
    59
     * Ownership of aArea is transferred to this object. 
williamr@2
    60
     * If the center of the geographical circular area is omitted, 
williamr@2
    61
     * latest acquired location is used when retrieving triggers.
williamr@2
    62
     * @return New instance of CLbtTriggerFilterByArea.
williamr@2
    63
     */
williamr@2
    64
    IMPORT_C static CLbtTriggerFilterByArea* NewL( 
williamr@2
    65
        CLbtGeoAreaBase* aArea );
williamr@2
    66
williamr@2
    67
    /**
williamr@2
    68
     * Constructs a new instance of CLbtTriggerFilterByArea. 
williamr@2
    69
     * The returned object has no geographical area set. 
williamr@2
    70
     *
williamr@2
    71
     * @return New instance of CLbtTriggerFilterByArea.
williamr@2
    72
     */
williamr@2
    73
    IMPORT_C static CLbtTriggerFilterByArea* NewL();
williamr@2
    74
williamr@2
    75
    /**
williamr@2
    76
     * Constructs a new instance of CLbtTriggerFilterByArea
williamr@2
    77
     * and pushes it onto cleanup stack.
williamr@2
    78
     * The returned object has no geographical area set. 
williamr@2
    79
     *
williamr@2
    80
     * @return New instance of CLbtTriggerFilterByArea.
williamr@2
    81
     */
williamr@2
    82
    IMPORT_C static CLbtTriggerFilterByArea* NewLC();
williamr@2
    83
williamr@2
    84
    /**
williamr@2
    85
     * Destructor.
williamr@2
    86
     */
williamr@2
    87
    IMPORT_C virtual ~CLbtTriggerFilterByArea();
williamr@2
    88
    
williamr@2
    89
    /**
williamr@2
    90
     * Gets the geographical area, inside which the triggers are 
williamr@2
    91
     * retrieved.
williamr@2
    92
     *
williamr@2
    93
     * If the area has not been set, this function returns NULL.
williamr@2
    94
     *
williamr@2
    95
     * @return The pointer to the geographical area object. Ownership is not
williamr@2
    96
     * transferred to the client. 
williamr@2
    97
     */
williamr@2
    98
    IMPORT_C CLbtGeoAreaBase* Area();
williamr@2
    99
williamr@2
   100
    /**
williamr@2
   101
     * Sets the geographical area in the filter. Only triggers that have 
williamr@2
   102
     * triggering area inside the defined area are retrieved.
williamr@2
   103
     *
williamr@2
   104
     * @param[in] aArea The pointer to the geographical area object. 
williamr@2
   105
     * Ownership of aArea is transferred to this object.
williamr@2
   106
     * If the area is a geographical circular area and the center of the
williamr@2
   107
     * area is not set, latest acquired location is used by Location 
williamr@2
   108
     * Triggering Server when retrieving triggers. 
williamr@2
   109
     */
williamr@2
   110
    IMPORT_C void SetArea( CLbtGeoAreaBase* aArea );
williamr@2
   111
williamr@2
   112
protected:  
williamr@2
   113
    /**
williamr@2
   114
     * Externalize method that subclass must implement.
williamr@2
   115
     * @param[in] aStream Stream to which the object should be externalized.
williamr@2
   116
     */  
williamr@2
   117
    virtual void DoExternalizeL(RWriteStream& aStream) const ;
williamr@2
   118
    
williamr@2
   119
    /**
williamr@2
   120
     * Internalize method that subclass must implement.
williamr@2
   121
     * @param[in] aStream Stream from which the object should be internalized.
williamr@2
   122
     */
williamr@2
   123
    virtual void DoInternalizeL(RReadStream& aStream)  ;
williamr@2
   124
williamr@2
   125
williamr@2
   126
private:
williamr@2
   127
    /**
williamr@2
   128
     * Default constructor.
williamr@2
   129
     */
williamr@2
   130
    void ConstructL(CLbtGeoAreaBase* aArea);
williamr@2
   131
    
williamr@2
   132
    /**
williamr@2
   133
     * By default, prohibit copy constructor
williamr@2
   134
     */ 
williamr@2
   135
    CLbtTriggerFilterByArea( const CLbtTriggerFilterByArea& );
williamr@2
   136
    
williamr@2
   137
    /**
williamr@2
   138
     * Prohibit assigment operator
williamr@2
   139
     */
williamr@2
   140
    CLbtTriggerFilterByArea& operator= ( const CLbtTriggerFilterByArea& );
williamr@2
   141
    
williamr@2
   142
    /**
williamr@2
   143
     * Constructor.
williamr@2
   144
     */
williamr@2
   145
    CLbtTriggerFilterByArea();
williamr@2
   146
williamr@2
   147
private:
williamr@2
   148
    /**
williamr@2
   149
     * The geographical area that the trigger lies in
williamr@2
   150
     */
williamr@2
   151
    CLbtGeoAreaBase* iGeoArea;
williamr@2
   152
williamr@2
   153
    };
williamr@2
   154
williamr@2
   155
williamr@2
   156
#endif // LBTTRIGGERFILTERBYAREA_H