epoc32/include/mw/lbtlisttriggeroptions.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/lbtlisttriggeroptions.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,262 @@
     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:  Class of options used in listing triggers
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef LBTLISTTRIGGEROPTIONS_H
    1.23 +#define LBTLISTTRIGGEROPTIONS_H
    1.24 +
    1.25 +#include <lbtcommon.h>
    1.26 +#include <lbtgeoareabase.h>
    1.27 +
    1.28 +class CLbtTriggerFilterBase;
    1.29 +
    1.30 +/**
    1.31 + * Helper class for options used when listing trigger entries 
    1.32 + * from Location Triggering Server.
    1.33 + *
    1.34 + * The following options can be set.
    1.35 + *
    1.36 + * -  <B>Retrieved fields</B>. It specifies what trigger 
    1.37 + * entry attributes field and trigger dynamic information field 
    1.38 + * shall be filled in the returned trigger objects. 
    1.39 + * Default value for trigger entry attribute field is 
    1.40 + * KLbtTriggerAttributeFieldsAll, which means 
    1.41 + * all attributes field shall be filled. Whether the Trigger 
    1.42 + * ID field is specified or not, the trigger ID attribute is always valid
    1.43 + * in returned trigger objects. Default value for trigger dynamic 
    1.44 + * information field is KLbtTriggerDynInfoFieldsAll, which means all 
    1.45 + * dynamic information fields will be filled.
    1.46 + *
    1.47 + * -  <B>Trigger filter</B>. It specifies the filter used in retrieving 
    1.48 + * trigger entries. Retrieved triggers shall fulfill the criteria defined 
    1.49 + * in the filter. By default, the option does not contain a filter
    1.50 + * and all triggers will be retrieved. A composite filter can also be
    1.51 + * used.
    1.52 + *
    1.53 + * -  <B>Sorting option</B>. It specifies in which order the retrieved
    1.54 + * trigger shall be sorted. The default value is ELbtNoSorting. 
    1.55 + * 
    1.56 + * @lib lbt.lib
    1.57 + *
    1.58 + * @since S60 5.1
    1.59 + */
    1.60 +class CLbtListTriggerOptions : public CBase
    1.61 +    {
    1.62 +public:
    1.63 +    /**
    1.64 +     * Sorting order when retrieving triggers
    1.65 +     * from Location Triggering Server.
    1.66 +     */
    1.67 +    enum TLbtListTriggerSorting
    1.68 +        {
    1.69 +        /**
    1.70 +         * Result is not sorted.
    1.71 +         */
    1.72 +        ELbtNoSorting = 1,
    1.73 +
    1.74 +        /**
    1.75 +         * Result is in ascending order according to the trigger name.
    1.76 +         */
    1.77 +        ELbtTriggerNameAscending = 2,
    1.78 +
    1.79 +        /**
    1.80 +         * Result is in descending order according to the trigger name.
    1.81 +         */
    1.82 +        ELbtTriggerNameDescending = 3,
    1.83 +
    1.84 +        /**
    1.85 +         * Result is in ascending order according to the distance from 
    1.86 +         * the trigger area to the latest acquired location by Location
    1.87 +         * Triggering Server.
    1.88 +         */
    1.89 +        ELbtDistanceToLatestLocationAscending = 4
    1.90 +        };
    1.91 +
    1.92 +
    1.93 +public:
    1.94 +
    1.95 +    /**
    1.96 +     * Constructs a new instance of trigger listing option object.
    1.97 +     * In the returned object, retrieved fields is set 
    1.98 +     * to KLbtTriggerAttributeFieldsAll and KLbtTriggerDynInfoFieldsAll, 
    1.99 +     * no trigger filters is set and sorting option is set to 
   1.100 +     * ELbtNoSorting.
   1.101 +     *
   1.102 +     * @return Pointer to the new instance of the trigger 
   1.103 +     * retrieving option object.
   1.104 +     */
   1.105 +    IMPORT_C static CLbtListTriggerOptions* NewL();
   1.106 +
   1.107 +    /**
   1.108 +     * Constructs a new instance of trigger listing option object and 
   1.109 +     * pushes it onto cleanup stack.
   1.110 +     * In the returned object, retrieved fields is set 
   1.111 +     * to KLbtTriggerAttributeFieldsAll and KLbtTriggerDynInfoFieldsAll, 
   1.112 +     * no trigger filters is set and sorting option is set to 
   1.113 +     * ELbtNoSorting.
   1.114 +     *
   1.115 +     * @return Pointer to the new instance of the trigger 
   1.116 +     * retrieving option object.
   1.117 +     */
   1.118 +    IMPORT_C static CLbtListTriggerOptions* NewLC();
   1.119 +    
   1.120 +    /**
   1.121 +     * Destructor
   1.122 +     */
   1.123 +    IMPORT_C ~CLbtListTriggerOptions();
   1.124 +
   1.125 +    /**
   1.126 +     * Gets the fields that Location Triggering Server will fill when
   1.127 +     * list triggers 
   1.128 +     *
   1.129 +     * If the entry fields mask and dynamic information field mask 
   1.130 +     * is not set before, KLbtTriggerAttributeFieldsAll and 
   1.131 +     * KLbtTriggerDynInfoFieldsAll
   1.132 +     * are returned.
   1.133 +     *
   1.134 +     * @param[out] aEntryMask On return contains the field mask defines
   1.135 +     * which trigger entry fields shall be filled.
   1.136 +     * @param[out] aDynInfoMask On return contains the field mask defines
   1.137 +     * which trigger dynamic information field shall be filled.
   1.138 +     */
   1.139 +    IMPORT_C void GetRetrievedFields( 
   1.140 +        TLbtTriggerAttributeFieldsMask &aEntryMask,
   1.141 +        TLbtTriggerDynamicInfoFieldsMask &aDynInfoMask ) const;
   1.142 +
   1.143 +    /**
   1.144 +     * Sets which fields shall be filled by Location
   1.145 +     * Triggering Server when listing triggers.
   1.146 +     *
   1.147 +     * @param[in] aEntryMask Mask defines which trigger entry fields shall 
   1.148 +     * be filled.
   1.149 +     * @param[in] aDynInfoMask The mask defines which dynamic information
   1.150 +     * field shall be filled.
   1.151 +     */
   1.152 +    IMPORT_C void SetRetrievedFields( 
   1.153 +        TLbtTriggerAttributeFieldsMask aEntryMask,
   1.154 +        TLbtTriggerDynamicInfoFieldsMask aDynInfoMask = KLbtTriggerDynInfoFieldsAll );
   1.155 +
   1.156 +    /**
   1.157 +     * Gets the sorting option when listing triggers. This
   1.158 +     * function returns ELbtNoSorting if the sorting option has
   1.159 +     * not been set.
   1.160 +     *
   1.161 +     * @return The sorting option when listing triggers.
   1.162 +     */
   1.163 +    IMPORT_C TLbtListTriggerSorting SortingOption() const;
   1.164 +
   1.165 +    /**
   1.166 +     * Sets the sorting option when listing triggers. 
   1.167 +     *
   1.168 +     * @param[in] aOption The sorting option when retrieving triggers.
   1.169 +     */
   1.170 +    IMPORT_C void SetSortingOption( TLbtListTriggerSorting aOption );
   1.171 +
   1.172 +    /**
   1.173 +     * Sets the filter used for listing triggers.
   1.174 +     *
   1.175 +     * @param[in] aFilter Pointer to the filter used for
   1.176 +     * listing triggers. If the pointer is NULL, previous set 
   1.177 +     * filter is deleted. Ownership of aFilter is transferred to
   1.178 +     * the client application.
   1.179 +     */
   1.180 +    IMPORT_C void SetFilter( 
   1.181 +        CLbtTriggerFilterBase* aFilter );
   1.182 +
   1.183 +    /**
   1.184 +     * Gets pointer to the filter used for listing triggers.
   1.185 +     * The function returns NULL if the filter is not previously set.
   1.186 +     *
   1.187 +     * @return The filter used for listing triggers. Ownership
   1.188 +     * of the returned object is not transferred to the client
   1.189 +     * application.
   1.190 +     */
   1.191 +    IMPORT_C CLbtTriggerFilterBase* Filter();
   1.192 +    
   1.193 +    /**
   1.194 +     * Internalizes the trigger condition object's details and attributes 
   1.195 +     * from stream.
   1.196 +     *
   1.197 +     * The presence of this function means that the standard templated 
   1.198 +     * operator>>() ( defined in s32strm.h ) is available to internalize objects 
   1.199 +     * of this class.
   1.200 +     *
   1.201 +     * @param[in] aStream Stream from which the object should be internalized.
   1.202 +     */
   1.203 +    IMPORT_C void InternalizeL( RReadStream& aStream );
   1.204 +    
   1.205 +    /**
   1.206 +     * Externalizes the trigger condition object's details and attributes
   1.207 +     * to stream.
   1.208 +     *
   1.209 +     * The presence of this function means that the standard templated 
   1.210 +     * operator<<() ( defined in s32strm.h ) is available to externalize objects 
   1.211 +     * of this class.
   1.212 +     *
   1.213 +     * @param[in] aStream Stream to which the object should be externalized.
   1.214 +     */
   1.215 +    IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
   1.216 +    
   1.217 +private:
   1.218 +    /**
   1.219 +     * Default Constructor.
   1.220 +     */
   1.221 +    CLbtListTriggerOptions();
   1.222 +    
   1.223 +    /**
   1.224 +     * By default, prohibit copy constructor
   1.225 +     */
   1.226 +    CLbtListTriggerOptions( const CLbtListTriggerOptions& );
   1.227 +    
   1.228 +    /**
   1.229 +     * Prohibit assigment operator
   1.230 +     */
   1.231 +    CLbtListTriggerOptions& operator= ( const CLbtListTriggerOptions& );
   1.232 +    
   1.233 +    /**
   1.234 +     * Symbian 2nd phase constructor
   1.235 +     */
   1.236 +    void ConstructL();
   1.237 +  
   1.238 +private:
   1.239 +    /**
   1.240 +     * Trigger entry fields mask
   1.241 +     */
   1.242 +    TLbtTriggerAttributeFieldsMask iTriigerAttributeFieldsMask;
   1.243 +
   1.244 +    /**
   1.245 +     * Trigger dynamic information field mask
   1.246 +     */
   1.247 +    TLbtTriggerDynamicInfoFieldsMask  iDynInfoFieldsMask;
   1.248 +
   1.249 +    /**
   1.250 +     * Filter
   1.251 +     */
   1.252 +    CLbtTriggerFilterBase* iFilter;
   1.253 +
   1.254 +    /**
   1.255 +     * Sorting
   1.256 +     */
   1.257 +    TLbtListTriggerSorting iSorting;
   1.258 +    
   1.259 +    /**
   1.260 +     * Reserved
   1.261 +     */
   1.262 +    TUint iReserved[8];
   1.263 +    };
   1.264 +
   1.265 +#endif // LBTLISTTRIGGEROPTIONS_H