omaprovisioning/provisioning/WAPAdapter/Inc/WPWAPItemFactory.h
branchRCL_3
changeset 26 19bba8228ff0
parent 0 b497e44ab2fc
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Factory for WAP items.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WPITEMFACTORY_H
       
    20 #define WPITEMFACTORY_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MWPWAPItemBase;
       
    27 class CWPCharacteristic;
       
    28 class CCommsDatabase;
       
    29 class CApDataHandler;
       
    30 class CBookmarkDb;
       
    31 class RFavouritesDb;
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * WPWAPItemFactory is a factory for all WAP items.
       
    36  *
       
    37  * @lib WPWAPAdapter
       
    38  * @since 2.0
       
    39  */ 
       
    40 class WPWAPItemFactory
       
    41     {
       
    42     public:
       
    43         /**
       
    44         * Create an MMS item.
       
    45         * @param aTitle Title for MMS items
       
    46         * @param aDefaultName Default name for MMS items
       
    47         * @param aCharacteristic The APPLICATION characteristic
       
    48         * @param aCommsDb The CommsDB to use. Created if NULL.
       
    49         * @param aAPHandler The APEngine data handler to use. Created if NULL.
       
    50         * @return MWPWAPItemBase instance
       
    51         */
       
    52         static MWPWAPItemBase* CreateMMSLC( const TDesC& aTitle, 
       
    53             const TDesC& aDefaultName, 
       
    54             CWPCharacteristic& aCharacteristic, 
       
    55             CCommsDatabase*& aCommsDb, 
       
    56             CApDataHandler*& aAPHandler );
       
    57 
       
    58 
       
    59         /**
       
    60         * Create a browser item.
       
    61         * @param aFirst ETrue if this browser item is first
       
    62         * @param aTitle Title for browser items
       
    63         * @param aBookmarkTitle Title for bookmark items
       
    64         * @param aDefaultName Default name for browser items
       
    65         * @param aCharacteristic The APPLICATION characteristic
       
    66         * @param aDb The CommsDB to use. Created if NULL.
       
    67         * @param aAPHandler The APEngine data handler to use. Created if NULL.
       
    68         * @param aBookmarkDb The bookmark database to use. Created if NULL.
       
    69         * @return MWPWAPItemBase instance
       
    70         */
       
    71         static MWPWAPItemBase* CreateBrowserLC( TBool aFirst,
       
    72             const TDesC& aTitle, 
       
    73             const TDesC& aBookmarkTitle,
       
    74             const TDesC& aDefaultName, 
       
    75             const TDesC& aDefaultBookmarkName,
       
    76             CWPCharacteristic& aCharacteristic, 
       
    77             CCommsDatabase*& aCommsDb, 
       
    78             CApDataHandler*& aAPHandler,
       
    79             RFavouritesDb aBookmarkDb );
       
    80             
       
    81         /**
       
    82         * Create a bookmark item.
       
    83         * @param aTitle The title to be returned in Name().
       
    84         * @param aDefaultName The default name for bookmarks.
       
    85         * @param aResource The RESOURCE characteristic.
       
    86         * @param aLink Link to NAPDEF
       
    87         * @param aDb The bookmark database to use. Created if NULL.
       
    88         * @return MWPWAPItemBase instance
       
    89         */
       
    90         static MWPWAPItemBase* CreateBookmarkLC( const TDesC& aTitle, 
       
    91             const TDesC& aDefaultName, 
       
    92             CWPCharacteristic& aResource, 
       
    93             CWPCharacteristic*& aNapdef,
       
    94             RFavouritesDb aDb);
       
    95 
       
    96     };
       
    97 
       
    98 
       
    99 #endif  // WPITEMFACTORY_H
       
   100             
       
   101 // End of File