omaprovisioning/provisioning/WAPAdapter/Inc/CWPWAPMMSItem.h
branchRCL_3
changeset 25 b183ec05bd8c
parent 24 13d7c31c74e0
child 26 19bba8228ff0
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
     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 "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 *     Setting item for MMS settings.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CWPWAPMMSITEM_H
       
    21 #define CWPWAPMMSITEM_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <msvapi.h>
       
    26 #include "CWPWAPItemBAse.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CBookmarkDb;
       
    30 class CApAccessPointItem;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * CWPWAPMMSItem contains one MMS setting.
       
    36  *
       
    37  * @lib WPWAPAdapter
       
    38  * @since 2.0
       
    39  */ 
       
    40 class CWPWAPMMSItem : public CWPWAPItemBase, private MMsvSessionObserver
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43 
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         * @param aTitle Title for MMS items
       
    47         * @param aDefaultName Default name for MMS items
       
    48         * @param aCharacteristic The APPLICATION characteristic
       
    49         * @param aCommsDb The CommsDB to use. Created if NULL.
       
    50         * @param aAPHandler The APEngine data handler to use. Created if NULL.
       
    51         */
       
    52         static CWPWAPMMSItem* NewL( const TDesC& aTitle, 
       
    53             const TDesC& aDefaultName, 
       
    54             CWPCharacteristic& aCharacteristic, 
       
    55             CCommsDatabase*& aCommsDb, 
       
    56             CApDataHandler*& aAPHandler );
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         ~CWPWAPMMSItem();
       
    62 
       
    63     public:   // From CWPWAPMMSItemBase
       
    64 
       
    65         TBool CanSetAsDefault() const;
       
    66         void SaveL();
       
    67         void SetAsDefaultL();
       
    68         TBool ValidateL();
       
    69         void ResourceL( CWPCharacteristic& aResource );
       
    70         void AddL( RPointerArray<MWPWAPItemBase>& aShownItems, 
       
    71             RPointerArray<MWPWAPItemBase>& aHiddenItems );
       
    72         void VisitLinkL( CWPCharacteristic& aCharacteristic );
       
    73 
       
    74     private: // from MMsvSessionObserver
       
    75 
       
    76         void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
       
    77 
       
    78     private:  // New functions
       
    79         /**
       
    80         * C++ default constructor.
       
    81         * @see CWPWAPMMSItem::NewL() for description of parameters.
       
    82         */
       
    83         CWPWAPMMSItem(  const TDesC& aTitle, 
       
    84             const TDesC& aDefaultName, 
       
    85             CWPCharacteristic& aCharacteristic, 
       
    86             CCommsDatabase*& aCommsDb, 
       
    87             CApDataHandler*& aAPHandler );
       
    88 
       
    89         /**
       
    90         * By default Symbian 2nd phase constructor is private.
       
    91         */
       
    92         void ConstructL();
       
    93 
       
    94         /**
       
    95         * Check if a NAPDEF characteristic is GPRS.
       
    96         * @param aCharacteristic The NAPDEF characteristic
       
    97         * @return GPRS access point if found
       
    98         */
       
    99         CApAccessPointItem* FindGPRSLC() const;
       
   100 
       
   101     private:   // Data
       
   102         // The bookmarks database. Refs.
       
   103         CBookmarkDb* iDb;
       
   104 
       
   105         // The potential links
       
   106         RPointerArray<CWPCharacteristic> iLinks;
       
   107     };
       
   108 
       
   109 #endif  // CWPWAPMMSITEM_H
       
   110             
       
   111 // End of File