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