locationcentre/lcservice/inc/lcpopuplistboxmodel.h
branchRCL_3
changeset 16 4721bd00d3da
parent 14 3a25f69541ff
child 21 e15b7f06eba6
equal deleted inserted replaced
14:3a25f69541ff 16:4721bd00d3da
     1 /*
       
     2 * Copyright (c) 2007 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:  List box model for the list-box used to display the Location
       
    15 *                Centre pop-up.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_LCPOPUPLISTBOXMODEL_H
       
    21 #define C_LCPOPUPLISTBOXMODEL_H
       
    22 
       
    23 // SYSTEM INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <bamdesca.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CLcLocationAppInfoArray;
       
    29 
       
    30 /**
       
    31  *  List box model for Location Centre pop-up dialog.
       
    32  *  
       
    33  *  This class provides the implementation of the list-box model for Location
       
    34  *  Centre lists.
       
    35  *  @lib lcservice.lib
       
    36  *  @since S60 v5.0
       
    37  */
       
    38 NONSHARABLE_CLASS( CLcPopupListBoxModel ) : public MDesCArray
       
    39     {
       
    40 public:    
       
    41     /**
       
    42      * Constructs a new instance of Location Centre pop-up list box model.
       
    43      *
       
    44      * @param[in] aAppArray Array of Location based Applicaions and Contents/Services
       
    45      *                      The ownership of the array is transferred.
       
    46      * @return The new instance of Location Centre model object.
       
    47      * @leave System wide error code if the object creation fails.         
       
    48      */
       
    49     static CLcPopupListBoxModel* NewL( CLcLocationAppInfoArray&	aAppArray );        
       
    50 
       
    51     /**
       
    52      * C++ Destructor.
       
    53      * Frees all the resources associated with this Location Centre
       
    54      * model object.
       
    55      */
       
    56     virtual ~CLcPopupListBoxModel();
       
    57     
       
    58     /**
       
    59      * Updates the Listbox model with a new Array of Location based Applications
       
    60      * and Contents/Services.
       
    61      *
       
    62      * @param[in] aAppArray Array of Location based Applicaions and Contents/Services
       
    63      *                      The ownership of the array is transferred.
       
    64      */
       
    65     void UpdateModel( CLcLocationAppInfoArray&	aAppArray );    
       
    66         
       
    67 public: // Inherited from Base classes
       
    68     /**
       
    69      * Inherited from MDesCArray
       
    70      */
       
    71     virtual TInt MdcaCount() const;
       
    72 
       
    73     /**
       
    74      * Inherited from MDesCArray
       
    75      */
       
    76     virtual TPtrC16 MdcaPoint( TInt aIndex ) const;
       
    77 
       
    78 private:
       
    79     /**
       
    80      * Overloaded constructor
       
    81      */
       
    82     CLcPopupListBoxModel(  CLcLocationAppInfoArray&	aAppArray );
       
    83 
       
    84     /**
       
    85      * Second phase of the two phase constructor
       
    86      */
       
    87     void ConstructL();
       
    88 
       
    89 private: // data
       
    90     
       
    91     /**
       
    92      * Buffer for packing the MdcaPoint
       
    93      *
       
    94      * Owns
       
    95      */
       
    96     HBufC16*					iBuffer;
       
    97     
       
    98     /**
       
    99      * Application Information Array
       
   100      */
       
   101     CLcLocationAppInfoArray*	iAppArray;
       
   102     };
       
   103 
       
   104 #endif // C_LCPOPUPLISTBOXMODEL_H