1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/lbtgeohybrid.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,172 @@
1.4 +/*
1.5 +* Copyright (c) 2008 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 "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Geographical hybrid area declaration.
1.18 +*
1.19 +*/
1.20 +
1.21 +#ifndef LBTGEOHYBRID_H
1.22 +#define LBTGEOHYBRID_H
1.23 +
1.24 +#include <lbtgeoareabase.h>
1.25 +
1.26 +
1.27 +/**
1.28 + * Geographical hybrid area class.
1.29 + *
1.30 + * Geographical hybrid area is defined by collection of similar or different
1.31 + * geographical area objects.
1.32 + * These triggers are fired when any of the geographical area info matches the
1.33 + * information obtained by LBT server.
1.34 + *
1.35 + * @lib lbt.lib
1.36 + *
1.37 + * @since S60 5.2
1.38 + */
1.39 +class CLbtGeoHybrid : public CLbtGeoAreaBase
1.40 + {
1.41 +public:
1.42 + /**
1.43 + * Allocates and constructs a new geographical hybrid area object.
1.44 + *
1.45 + * @return Pointer to the new geographical hybrid area object.
1.46 + * @leave Other standard Symbian error code, such as KErrNoMemory
1.47 + */
1.48 + IMPORT_C static CLbtGeoHybrid* NewL();
1.49 +
1.50 + /**
1.51 + * Allocates and constructs a new geographical hybrid area object and
1.52 + * pushes it onto cleanup stack.
1.53 + *
1.54 + * @return Pointer to the new geographical hybrid area object.
1.55 + * @leave Other standard Symbian error code, such as KErrNoMemory
1.56 + */
1.57 + IMPORT_C static CLbtGeoHybrid* NewLC();
1.58 +
1.59 + /**
1.60 + * Allocates and constructs a new geographical hybrid area object.
1.61 + *
1.62 + * @panic ELbtErrArgument If array count is less than two or if one
1.63 + * the input trigger area is other than cellular area.
1.64 + *
1.65 + * @param[in] aHybridArea An array of pointers to geographical
1.66 + * area.
1.67 + * @return Pointer to the new geographical hybrid area object.
1.68 + * @leave Other standard Symbian error code, such as KErrNoMemory
1.69 + */
1.70 + IMPORT_C static CLbtGeoHybrid* NewL( RPointerArray<CLbtGeoAreaBase>&
1.71 + aHybridArea );
1.72 +
1.73 + /**
1.74 + * Allocates and constructs a new geographical hybrid area object and
1.75 + * pushes it onto cleanup stack.
1.76 + *
1.77 + * @panic ELbtErrArgument If array count is less than two or if one
1.78 + * the input trigger area is other than cellular area.
1.79 + *
1.80 + * @param[in] aHybridArea An array of pointers to geographical
1.81 + * area.
1.82 + * @return Pointer to the new geographical hybrid area object.
1.83 + * @leave Other standard Symbian error code, such as KErrNoMemory
1.84 + */
1.85 + IMPORT_C static CLbtGeoHybrid* NewLC( RPointerArray<CLbtGeoAreaBase>&
1.86 + aHybridArea );
1.87 +
1.88 + /**
1.89 + * Destructor
1.90 + */
1.91 + IMPORT_C virtual ~CLbtGeoHybrid();
1.92 +
1.93 + /**
1.94 + * Returns the type of geographical area, CLbtGeoAreaBase::ECellArray
1.95 + *
1.96 + * @return CLbtGeoAreaBase::EHybrid.
1.97 + */
1.98 + virtual TGeoAreaType Type() const;
1.99 +
1.100 + /**
1.101 + * Sets array of pointers to geographical area.
1.102 + *
1.103 + * @panic ELbtErrArgument If array count is less than two or if one
1.104 + * the input trigger area is other than cellular area.
1.105 + *
1.106 + * @param[in] aHybridArea An array of pointers to geographical
1.107 + * area.
1.108 + */
1.109 + IMPORT_C void SetHybridArea( const RPointerArray<CLbtGeoAreaBase>&
1.110 + aHybridArea );
1.111 +
1.112 + /**
1.113 + * Returns An array of pointers to geographical.
1.114 + *
1.115 + * @return An array of pointers to geographical
1.116 + * area.
1.117 + */
1.118 + IMPORT_C const RPointerArray<CLbtGeoAreaBase>& HybridArea();
1.119 +
1.120 + /**
1.121 + * Validates hybrid area information
1.122 + *
1.123 + * @leave KErrArgument if If array count is less than two or
1.124 + * any of the mandatory parameters have not been specified.
1.125 + */
1.126 + void ValidateHybridInformationL();
1.127 +
1.128 +private:
1.129 + /**
1.130 + * default constructor
1.131 + */
1.132 + CLbtGeoHybrid();
1.133 +
1.134 + /**
1.135 + * By default, prohibit copy constructor
1.136 + */
1.137 + CLbtGeoHybrid( const CLbtGeoHybrid& );
1.138 +
1.139 + /**
1.140 + * Prohibit assigment operator
1.141 + */
1.142 + CLbtGeoHybrid& operator= ( const CLbtGeoHybrid& );
1.143 +
1.144 + /**
1.145 + * Symbian 2nd phase constructor.
1.146 + */
1.147 + void ConstructL();
1.148 +
1.149 + /**
1.150 + * Symbian 2nd phase constructor.
1.151 + */
1.152 + void ConstructL( RPointerArray<CLbtGeoAreaBase>&
1.153 + aHybridArea );
1.154 +
1.155 + /**
1.156 + * Externalize method that subclass must implement.
1.157 + * @param[in] aStream Stream to which the object should be externalized.
1.158 + */
1.159 + virtual void DoExternalizeL(RWriteStream& aStream) const;
1.160 +
1.161 + /**
1.162 + * Internalize method that subclass must implement.
1.163 + * @param[in] aStream Stream from which the object should be internalized.
1.164 + */
1.165 + virtual void DoInternalizeL(RReadStream& aStream);
1.166 +
1.167 +
1.168 +private://data
1.169 + /**
1.170 + * Array of cell global identifier
1.171 + */
1.172 + RPointerArray<CLbtGeoAreaBase> iHybridArea;
1.173 + };
1.174 +
1.175 +#endif /*LBTGEOHYBRID_H*/