epoc32/include/mw/lbttriggerfilterbase.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/lbttriggerfilterbase.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,123 @@
     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:  Abstract base class for filter when listing triggers.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef LBTTRIGGERFILTERBASE_H
    1.23 +#define LBTTRIGGERFILTERBASE_H
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <s32strm.h>
    1.27 +
    1.28 +/**
    1.29 + * Abstract base class for filter when listing triggers from 
    1.30 + * Location Triggering Server.
    1.31 + *
    1.32 + * @lib lbt.lib
    1.33 + * @since S60 5.1
    1.34 + */
    1.35 +class CLbtTriggerFilterBase : public CBase
    1.36 +    {
    1.37 +public:
    1.38 +    /**
    1.39 +     * Specifies the type of the filter
    1.40 +     */
    1.41 +    enum TFilterType
    1.42 +        {
    1.43 +        /**
    1.44 +         * Filter based on the trigger entry's attribute value.
    1.45 +         */
    1.46 +        EFilterByAttribute = 1,
    1.47 +        /**
    1.48 +         * Filter based on the geographical area.
    1.49 +         */
    1.50 +        EFilterByArea = 2,
    1.51 +        /**
    1.52 +         * Composite filter.
    1.53 +         */
    1.54 +        EFilterComposite = 3
    1.55 +        };
    1.56 +
    1.57 +    /**
    1.58 +     * Returns the type of filter.
    1.59 +     *
    1.60 +     * @return The type of the filter.
    1.61 +     */
    1.62 +    virtual TFilterType Type() const = 0;
    1.63 +
    1.64 +    /**
    1.65 +     * Destructor.
    1.66 +     */
    1.67 +    IMPORT_C virtual ~CLbtTriggerFilterBase();
    1.68 +    
    1.69 +    
    1.70 +    /**
    1.71 +     * Internalizes the trigger condition object's details and attributes 
    1.72 +     * from stream.
    1.73 +     *
    1.74 +     * The presence of this function means that the standard templated 
    1.75 +     * operator>>() ( defined in s32strm.h ) is available to internalize objects 
    1.76 +     * of this class.
    1.77 +     *
    1.78 +     * @param[in] aStream Stream from which the object should be internalized.
    1.79 +     */
    1.80 +    IMPORT_C void InternalizeL( RReadStream& aStream );
    1.81 +    
    1.82 +    /**
    1.83 +     * Externalizes the trigger condition object's details and attributes
    1.84 +     * to stream.
    1.85 +     *
    1.86 +     * The presence of this function means that the standard templated 
    1.87 +     * operator<<() ( defined in s32strm.h ) is available to externalize objects 
    1.88 +     * of this class.
    1.89 +     *
    1.90 +     * @param[in] aStream Stream to which the object should be externalized.
    1.91 +     */
    1.92 +    IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
    1.93 +    
    1.94 +
    1.95 +protected:    
    1.96 +    /**
    1.97 +     * Constructor.
    1.98 +     */
    1.99 +    CLbtTriggerFilterBase();
   1.100 +    
   1.101 +    /**
   1.102 +     * Internalize method that subclass must implement.
   1.103 +     * @param[in] aStream Stream from which the object should be internalized.
   1.104 +     */
   1.105 +    virtual void DoInternalizeL( RReadStream& aStream ) = 0;
   1.106 +    
   1.107 +    /**
   1.108 +     * Externalize method that subclass must implement.
   1.109 +     * @param[in] aStream Stream to which the object should be externalized.
   1.110 +     */
   1.111 +    virtual void DoExternalizeL( RWriteStream& aStream ) const = 0;
   1.112 +    
   1.113 +private:
   1.114 +    /**
   1.115 +     * By default, prohibit copy constructor
   1.116 +     */
   1.117 +    CLbtTriggerFilterBase( const CLbtTriggerFilterBase& );
   1.118 +    
   1.119 +    /**
   1.120 +     * Prohibit assigment operator
   1.121 +     */
   1.122 +    CLbtTriggerFilterBase& operator= ( const CLbtTriggerFilterBase& );
   1.123 +
   1.124 +    };
   1.125 +
   1.126 +#endif // LBTTRIGGERFILTERBASE_H