author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: Geographical hybrid area declaration. |
williamr@4 | 15 |
* |
williamr@4 | 16 |
*/ |
williamr@4 | 17 |
|
williamr@4 | 18 |
#ifndef LBTGEOHYBRID_H |
williamr@4 | 19 |
#define LBTGEOHYBRID_H |
williamr@4 | 20 |
|
williamr@4 | 21 |
#include <lbtgeoareabase.h> |
williamr@4 | 22 |
|
williamr@4 | 23 |
|
williamr@4 | 24 |
/** |
williamr@4 | 25 |
* Geographical hybrid area class. |
williamr@4 | 26 |
* |
williamr@4 | 27 |
* Geographical hybrid area is defined by collection of similar or different |
williamr@4 | 28 |
* geographical area objects. |
williamr@4 | 29 |
* These triggers are fired when any of the geographical area info matches the |
williamr@4 | 30 |
* information obtained by LBT server. |
williamr@4 | 31 |
* |
williamr@4 | 32 |
* @lib lbt.lib |
williamr@4 | 33 |
* |
williamr@4 | 34 |
* @since S60 5.2 |
williamr@4 | 35 |
*/ |
williamr@4 | 36 |
class CLbtGeoHybrid : public CLbtGeoAreaBase |
williamr@4 | 37 |
{ |
williamr@4 | 38 |
public: |
williamr@4 | 39 |
/** |
williamr@4 | 40 |
* Allocates and constructs a new geographical hybrid area object. |
williamr@4 | 41 |
* |
williamr@4 | 42 |
* @return Pointer to the new geographical hybrid area object. |
williamr@4 | 43 |
* @leave Other standard Symbian error code, such as KErrNoMemory |
williamr@4 | 44 |
*/ |
williamr@4 | 45 |
IMPORT_C static CLbtGeoHybrid* NewL(); |
williamr@4 | 46 |
|
williamr@4 | 47 |
/** |
williamr@4 | 48 |
* Allocates and constructs a new geographical hybrid area object and |
williamr@4 | 49 |
* pushes it onto cleanup stack. |
williamr@4 | 50 |
* |
williamr@4 | 51 |
* @return Pointer to the new geographical hybrid area object. |
williamr@4 | 52 |
* @leave Other standard Symbian error code, such as KErrNoMemory |
williamr@4 | 53 |
*/ |
williamr@4 | 54 |
IMPORT_C static CLbtGeoHybrid* NewLC(); |
williamr@4 | 55 |
|
williamr@4 | 56 |
/** |
williamr@4 | 57 |
* Allocates and constructs a new geographical hybrid area object. |
williamr@4 | 58 |
* |
williamr@4 | 59 |
* @panic ELbtErrArgument If array count is less than two or if one |
williamr@4 | 60 |
* the input trigger area is other than cellular area. |
williamr@4 | 61 |
* |
williamr@4 | 62 |
* @param[in] aHybridArea An array of pointers to geographical |
williamr@4 | 63 |
* area. |
williamr@4 | 64 |
* @return Pointer to the new geographical hybrid area object. |
williamr@4 | 65 |
* @leave Other standard Symbian error code, such as KErrNoMemory |
williamr@4 | 66 |
*/ |
williamr@4 | 67 |
IMPORT_C static CLbtGeoHybrid* NewL( RPointerArray<CLbtGeoAreaBase>& |
williamr@4 | 68 |
aHybridArea ); |
williamr@4 | 69 |
|
williamr@4 | 70 |
/** |
williamr@4 | 71 |
* Allocates and constructs a new geographical hybrid area object and |
williamr@4 | 72 |
* pushes it onto cleanup stack. |
williamr@4 | 73 |
* |
williamr@4 | 74 |
* @panic ELbtErrArgument If array count is less than two or if one |
williamr@4 | 75 |
* the input trigger area is other than cellular area. |
williamr@4 | 76 |
* |
williamr@4 | 77 |
* @param[in] aHybridArea An array of pointers to geographical |
williamr@4 | 78 |
* area. |
williamr@4 | 79 |
* @return Pointer to the new geographical hybrid area object. |
williamr@4 | 80 |
* @leave Other standard Symbian error code, such as KErrNoMemory |
williamr@4 | 81 |
*/ |
williamr@4 | 82 |
IMPORT_C static CLbtGeoHybrid* NewLC( RPointerArray<CLbtGeoAreaBase>& |
williamr@4 | 83 |
aHybridArea ); |
williamr@4 | 84 |
|
williamr@4 | 85 |
/** |
williamr@4 | 86 |
* Destructor |
williamr@4 | 87 |
*/ |
williamr@4 | 88 |
IMPORT_C virtual ~CLbtGeoHybrid(); |
williamr@4 | 89 |
|
williamr@4 | 90 |
/** |
williamr@4 | 91 |
* Returns the type of geographical area, CLbtGeoAreaBase::ECellArray |
williamr@4 | 92 |
* |
williamr@4 | 93 |
* @return CLbtGeoAreaBase::EHybrid. |
williamr@4 | 94 |
*/ |
williamr@4 | 95 |
virtual TGeoAreaType Type() const; |
williamr@4 | 96 |
|
williamr@4 | 97 |
/** |
williamr@4 | 98 |
* Sets array of pointers to geographical area. |
williamr@4 | 99 |
* |
williamr@4 | 100 |
* @panic ELbtErrArgument If array count is less than two or if one |
williamr@4 | 101 |
* the input trigger area is other than cellular area. |
williamr@4 | 102 |
* |
williamr@4 | 103 |
* @param[in] aHybridArea An array of pointers to geographical |
williamr@4 | 104 |
* area. |
williamr@4 | 105 |
*/ |
williamr@4 | 106 |
IMPORT_C void SetHybridArea( const RPointerArray<CLbtGeoAreaBase>& |
williamr@4 | 107 |
aHybridArea ); |
williamr@4 | 108 |
|
williamr@4 | 109 |
/** |
williamr@4 | 110 |
* Returns An array of pointers to geographical. |
williamr@4 | 111 |
* |
williamr@4 | 112 |
* @return An array of pointers to geographical |
williamr@4 | 113 |
* area. |
williamr@4 | 114 |
*/ |
williamr@4 | 115 |
IMPORT_C const RPointerArray<CLbtGeoAreaBase>& HybridArea(); |
williamr@4 | 116 |
|
williamr@4 | 117 |
/** |
williamr@4 | 118 |
* Validates hybrid area information |
williamr@4 | 119 |
* |
williamr@4 | 120 |
* @leave KErrArgument if If array count is less than two or |
williamr@4 | 121 |
* any of the mandatory parameters have not been specified. |
williamr@4 | 122 |
*/ |
williamr@4 | 123 |
void ValidateHybridInformationL(); |
williamr@4 | 124 |
|
williamr@4 | 125 |
private: |
williamr@4 | 126 |
/** |
williamr@4 | 127 |
* default constructor |
williamr@4 | 128 |
*/ |
williamr@4 | 129 |
CLbtGeoHybrid(); |
williamr@4 | 130 |
|
williamr@4 | 131 |
/** |
williamr@4 | 132 |
* By default, prohibit copy constructor |
williamr@4 | 133 |
*/ |
williamr@4 | 134 |
CLbtGeoHybrid( const CLbtGeoHybrid& ); |
williamr@4 | 135 |
|
williamr@4 | 136 |
/** |
williamr@4 | 137 |
* Prohibit assigment operator |
williamr@4 | 138 |
*/ |
williamr@4 | 139 |
CLbtGeoHybrid& operator= ( const CLbtGeoHybrid& ); |
williamr@4 | 140 |
|
williamr@4 | 141 |
/** |
williamr@4 | 142 |
* Symbian 2nd phase constructor. |
williamr@4 | 143 |
*/ |
williamr@4 | 144 |
void ConstructL(); |
williamr@4 | 145 |
|
williamr@4 | 146 |
/** |
williamr@4 | 147 |
* Symbian 2nd phase constructor. |
williamr@4 | 148 |
*/ |
williamr@4 | 149 |
void ConstructL( RPointerArray<CLbtGeoAreaBase>& |
williamr@4 | 150 |
aHybridArea ); |
williamr@4 | 151 |
|
williamr@4 | 152 |
/** |
williamr@4 | 153 |
* Externalize method that subclass must implement. |
williamr@4 | 154 |
* @param[in] aStream Stream to which the object should be externalized. |
williamr@4 | 155 |
*/ |
williamr@4 | 156 |
virtual void DoExternalizeL(RWriteStream& aStream) const; |
williamr@4 | 157 |
|
williamr@4 | 158 |
/** |
williamr@4 | 159 |
* Internalize method that subclass must implement. |
williamr@4 | 160 |
* @param[in] aStream Stream from which the object should be internalized. |
williamr@4 | 161 |
*/ |
williamr@4 | 162 |
virtual void DoInternalizeL(RReadStream& aStream); |
williamr@4 | 163 |
|
williamr@4 | 164 |
|
williamr@4 | 165 |
private://data |
williamr@4 | 166 |
/** |
williamr@4 | 167 |
* Array of cell global identifier |
williamr@4 | 168 |
*/ |
williamr@4 | 169 |
RPointerArray<CLbtGeoAreaBase> iHybridArea; |
williamr@4 | 170 |
}; |
williamr@4 | 171 |
|
williamr@4 | 172 |
#endif /*LBTGEOHYBRID_H*/ |