browserui/browser/FavouritesInc/BrowserBookmarksEditFormApModel.h
branchRCL_3
changeset 65 8e6fa1719340
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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: 
       
    15 *      Declaration of class CWmlBrowserBookmarksEditFormApModel.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSER_BOOKMARKS_EDIT_FORM_AP_MODEL_H
       
    22 #define BROWSER_BOOKMARKS_EDIT_FORM_AP_MODEL_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <bamdesca.h>
       
    28 #include <favouriteswapap.h>
       
    29 
       
    30 // FORWARD DECLARATION
       
    31 
       
    32 class CAknQueryValueText;
       
    33 class CAknQueryValueTextArray;
       
    34 class MCommsModel;
       
    35 class CApListItemList;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 * Model for the WAP AP pop-up field in the Edit Bookmark form. It owns a list
       
    41 * of Access Points, gotten from the AP Model; and also holds a descriptor
       
    42 * array containing names of access points. The descriptor array always contains
       
    43 * string "Default" as first, unless there are no AP-s at all. In that case,
       
    44 * the array is empty.
       
    45 */
       
    46 class CBrowserBookmarksEditFormApModel : public CBase
       
    47 	{
       
    48 	public:     // construction
       
    49 
       
    50         /**
       
    51         * Two-phased constructor. Leaves on failure.
       
    52         * @param aCOmmsModel Comms model to use for accessing AP-s. Not owned.
       
    53         * @return The constructed model.
       
    54         */
       
    55         static CBrowserBookmarksEditFormApModel* NewL
       
    56             ( MCommsModel& aCommsModel );
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~CBrowserBookmarksEditFormApModel();
       
    62 
       
    63     public:     // new methods
       
    64 
       
    65         /**
       
    66         * Get the query value.
       
    67         * @return The query value.
       
    68         */
       
    69         inline CAknQueryValueText* QueryValue();
       
    70 
       
    71         /**
       
    72         * Get and store Access Point data from the AP Model.
       
    73         */
       
    74 		void ReadApDataL();
       
    75 
       
    76         /**
       
    77         * Set the current WAP Access point.
       
    78         * @param aAp Access Point to set as current.
       
    79         */
       
    80         void SetCurrentWapApL( const TFavouritesWapAp& aAp );
       
    81 
       
    82         /**
       
    83         * Get the current WAP Access point.
       
    84         * @return The current WAP Access point.
       
    85         */
       
    86         TFavouritesWapAp CurrentWapAp() const;
       
    87 
       
    88         /**
       
    89         * Count WAP Access points.
       
    90         * @return Number of WAP Access points.
       
    91         */
       
    92         TInt ApCount();
       
    93 
       
    94 
       
    95     protected:  // construction
       
    96 
       
    97         /**
       
    98         * Constructor.
       
    99         * @param aCommsModel Comms model to use for accessing AP-s.
       
   100         * Not owned.
       
   101         */
       
   102         CBrowserBookmarksEditFormApModel( MCommsModel& aCommsModel );
       
   103 
       
   104         /**
       
   105         * Second phase constructor. Leaves on failure.
       
   106         * @return The constructed model.
       
   107         */
       
   108 		void ConstructL();
       
   109 
       
   110     private:    // data
       
   111 
       
   112         CDesCArrayFlat* iDesCArrayText;     ///< AP names as strings.
       
   113         CAknQueryValueTextArray* iTextArray;///< Text array for the value.
       
   114         CAknQueryValueText* iTextValue;     ///< Value for pop-up query.
       
   115         MCommsModel* iCommsModel;           ///< AP data source. Not owned.
       
   116         CApListItemList* iApList;           ///< List of access points. Owned.
       
   117     };
       
   118 
       
   119 #include "BrowserBookmarksEditFormApModel.inl"
       
   120 
       
   121 #endif
       
   122 
       
   123 // End of file