simpleengine/presenceprovisioning/inc/presenceprovadapter.h
changeset 0 c8caa15ef882
equal deleted inserted replaced
-1:000000000000 0:c8caa15ef882
       
     1 /*
       
     2 * Copyright (c) 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:    Header for main Adapter class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __PRESPROVADAPTER_H__
       
    22 #define __PRESPROVADAPTER_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <CWPAdapter.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CPresProvItem;
       
    29 class CWPCharacteristic;
       
    30 
       
    31 // CONSTANTS
       
    32 
       
    33 _LIT8( KPresProvisioningAppId8, "ap0002" );
       
    34 _LIT8( KPresProvisioningXdmId,  "ap0003" );
       
    35 _LIT8( KPresProvisioningSipId,  "w9010" );
       
    36 
       
    37 /**
       
    38 * Main Adapter class. Derived from CWPAdapter as recommended by provisioning 
       
    39 * framework
       
    40 *
       
    41 * @since S60 3.2
       
    42 */
       
    43 class CPresProvAdapter : public CWPAdapter
       
    44     {
       
    45     public: // Constructors and destructor
       
    46 
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static CPresProvAdapter* NewL();
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         ~CPresProvAdapter();
       
    56         
       
    57     public: // from CWPAdapter
       
    58         
       
    59         TInt ItemCount() const;
       
    60         const TDesC16& SummaryTitle( TInt aIndex ) const;
       
    61         const TDesC16& SummaryText( TInt aIndex ) const;
       
    62         void SaveL( TInt aItem );
       
    63         TBool CanSetAsDefault( TInt aItem ) const;
       
    64         void SetAsDefaultL( TInt aItem );
       
    65         TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor );
       
    66         void VisitL( CWPCharacteristic& aCharacteristic);       
       
    67         void VisitL( CWPParameter& aParameter );        
       
    68         void VisitLinkL( CWPCharacteristic& aLink );
       
    69         void SettingsSavedL ( const TDesC8& aAppIdOfSavingItem,
       
    70                               const TDesC8& aAppRef, 
       
    71                               const TDesC8& aStorageIdValue);
       
    72         void SavingFinalizedL();
       
    73         
       
    74         void GetSavingInfoL( TInt aIndex,
       
    75                                       RPointerArray<HBufC8>& aSavingInfo );
       
    76 
       
    77     private:
       
    78 
       
    79         /**
       
    80         * C++ default constructor.
       
    81         */
       
    82         CPresProvAdapter();
       
    83 
       
    84         /**
       
    85         * By default Symbian 2nd phase constructor is private.
       
    86         */
       
    87         void ConstructL();
       
    88         
       
    89         /**
       
    90         * Des to Int
       
    91 		*
       
    92 		* @since S60 3.2
       
    93         * @param aSrcDes Descriptor to convert
       
    94         * @return TInt
       
    95         */  
       
    96         TInt DesToInt( const TDesC8& aSrcDes ) const; 
       
    97         
       
    98         
       
    99     private: 
       
   100 
       
   101         // Default name for settings
       
   102         HBufC* iDefaultName;
       
   103 
       
   104         // Title for Presence settings
       
   105         HBufC* iTitle;
       
   106         
       
   107         // Presence items
       
   108         RPointerArray<CPresProvItem> iProvItems;
       
   109 
       
   110     };
       
   111 
       
   112 #endif // __PRESPROVADAPTER_H__   
       
   113             
       
   114 // End of File