locationcentre/lcapp/inc/lclistbox.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 defintion for Location System UI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_LCLISTBOX_H
       
    20 #define C_LCLISTBOX_H
       
    21 
       
    22 // SYSTEM INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <aknlists.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CLcLocationAppInfoArray;
       
    28 class CLcListBoxModel;
       
    29 
       
    30 /**
       
    31  *  List box for Location Centre
       
    32  *  
       
    33  *  This class specializes the CAknSingleLargeStyleListBox class for Location
       
    34  *  Centre. This class takes the ownership of the listbox model and exposes
       
    35  *  functions for updation of the list.
       
    36  *
       
    37  *  @lib lcservice.lib
       
    38  *  @since S60 v5.0
       
    39  */
       
    40 class CLcListBox : public CAknSingleLargeStyleListBox
       
    41     {
       
    42 public:    
       
    43     /**
       
    44      * Constructs a new instance of Location Centre list box.
       
    45      *
       
    46      * @param[in] aAppArray Array of Location based Applicaions and Contents/Services
       
    47      *                      The ownership of the array is transferred.
       
    48      * @param[in] aParent	Parent Window.
       
    49      * @return The new instance of Location Centre listbox object.
       
    50      * @leave System wide error code if the object creation fails.         
       
    51      */
       
    52     static CLcListBox* NewL( 	   
       
    53     							   CLcLocationAppInfoArray*  aAppArray,
       
    54     						 const CCoeControl* 		     aParent,
       
    55     						 	   MEikListBoxObserver*	     aObserver );      
       
    56 
       
    57     /**
       
    58      * C++ Destructor.
       
    59      * Frees all the resources associated with this Location Centre listbox object.
       
    60      */
       
    61     virtual ~CLcListBox();
       
    62 
       
    63     /**
       
    64      * Updates the list box contents. This function deletes the previous instance
       
    65      * of the Location based Applications and Contents/Services application
       
    66      * information and replaces it with this new list.
       
    67      *
       
    68      * @param[in] aAppArray Array of Location based Applicaions and Contents/Services
       
    69      *                      The ownership of the array is transferred.
       
    70      */
       
    71     void UpdateListBoxContentsL( CLcLocationAppInfoArray*      aAppArray );
       
    72 
       
    73 private:
       
    74     /**
       
    75      * Overloaded constructor
       
    76      */
       
    77     CLcListBox();
       
    78 
       
    79     /**
       
    80      * Second phase of the two phase constructor
       
    81      */
       
    82     void ConstructL( 	   CLcLocationAppInfoArray*  aAppArray,
       
    83     			 	 const CCoeControl* 		   	 aParent,
       
    84     			 	 	   MEikListBoxObserver*	     aObserver );
       
    85     			 	 	   
       
    86     /**
       
    87      * Updates the Location Centre List-box's Icons array to point to the 
       
    88      * latest set of icons.
       
    89      */
       
    90     void UpdateIconsL();    			 	 	   
       
    91 
       
    92 private: // data
       
    93 	/**
       
    94 	 * Listbox model
       
    95 	 *
       
    96 	 * Owns
       
    97  	 */
       
    98  	CLcListBoxModel*				iListBoxModel;
       
    99     };
       
   100 
       
   101 #endif // C_LCLISTBOX_H