omacpadapters/WAPAdapter/Inc/CWPWAPMMSItem.h
changeset 42 aa33c2cb9a50
equal deleted inserted replaced
41:c742e1129640 42:aa33c2cb9a50
       
     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 RCmManagerExt;
       
    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             RCmManagerExt*& aCmManager);
       
    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             RCmManagerExt*& aCmManager);
       
    88 
       
    89         /**
       
    90         * By default Symbian 2nd phase constructor is private.
       
    91         */
       
    92         void ConstructL();
       
    93 
       
    94 
       
    95 
       
    96     private:   // Data
       
    97         // The bookmarks database. Refs.
       
    98         CBookmarkDb* iDb;
       
    99 
       
   100         // The potential links
       
   101         RPointerArray<CWPCharacteristic> iLinks;
       
   102     };
       
   103 
       
   104 #endif  // CWPWAPMMSITEM_H
       
   105             
       
   106 // End of File