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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Class representing a composite filter.
19 #ifndef LBTTRIGGERFILTERCOMPOSITE_H
20 #define LBTTRIGGERFILTERCOMPOSITE_H
22 #include <lbttriggerfilterbase.h>
25 * Class representing a composite filter. This class is used to combine
28 * All filters combined in this class will be applied when listing
29 * triggers. Currently only ECompositionTypeAnd is
30 * supported to be the composition type. In this case, only
31 * those triggers that fulfill the criteria specified by all the filters
38 class CLbtTriggerFilterComposite : public CLbtTriggerFilterBase
44 * Criteria in all composited filters
51 * Returns CLbtTriggerFilterBase::EFilterComposite.
53 * @return CLbtTriggerFilterBase::EFilterComposite.
55 IMPORT_C virtual TFilterType Type() const;
58 * Consructs a new instance of CLbtTriggerFilterComposite.
60 * @return New instance of CLbtTriggerFilterComposite.
62 IMPORT_C static CLbtTriggerFilterComposite* NewL(
63 TCompositeType aType = ECompositionTypeAnd );
66 * Consructs a new instance of CLbtTriggerFilterComposite
67 * and pushes it onto cleanup stack.
69 * @return New instance of CLbtTriggerFilterComposite.
71 IMPORT_C static CLbtTriggerFilterComposite* NewLC(
72 TCompositeType aType = ECompositionTypeAnd );
77 IMPORT_C virtual ~CLbtTriggerFilterComposite();
82 * @param[in] aFilter Pointer to the filter to be added.
83 * If the pointer is NULL, this function does nothing.
84 * Ownership of aFilter is transferred to this object.
86 IMPORT_C void AddFilterL(
87 CLbtTriggerFilterBase* aFilter );
90 * Gets the number of filters contained in this object.
92 * @return The number of filters contained in this object.
94 IMPORT_C TInt NumberOfFilters() const;
97 * Gets pointer to the filter at the specific position.
99 * @panic USER 130 if aIndex is negative, or greater than
100 * the total number of filters contained in this object.
102 * @param[in] aIndex The position of the filter. The value
103 * shall be in the range of 0 to NumberOfFilters()- 1.
104 * @return The pointer to the filter. Ownership of the
105 * returned object is not transferred to the client.
107 IMPORT_C CLbtTriggerFilterBase* GetFilter(
111 * Remove the specific trigger filter from this object
113 * @panic USER 130 if aIndex is negative, or greater than
114 * the total number of filters contained in this object.
116 * @param[in] aIndex The position of the filter to be removed.
118 IMPORT_C void RemoveFilter(
122 * Remove all trigger filters contained in this object.
124 IMPORT_C void Reset();
128 * Internalize method that subclass must implement.
129 * @param[in] aStream Stream from which the object should be internalized.
131 virtual void DoInternalizeL( RReadStream& aStream ) ;
134 * Externalize method that subclass must implement.
135 * @param[in] aStream Stream to which the object should be externalized.
137 virtual void DoExternalizeL( RWriteStream& aStream ) const ;
144 CLbtTriggerFilterComposite();
147 * By default, prohibit copy constructor
149 CLbtTriggerFilterComposite( const CLbtTriggerFilterComposite& );
152 * Prohibit assigment operator
154 CLbtTriggerFilterComposite& operator= ( const CLbtTriggerFilterComposite& );
157 * Symbian 2nd phase constructor
165 RPointerArray < CLbtTriggerFilterBase > iFilters;
169 #endif // LBTTRIGGERFILTERCOMPOSITE_H