XDMEngine/XdmProvisioning/inc/xdmprovadapter.h
branchGCC_SURGE
changeset 28 d9861ae9169c
parent 23 77cb48a03620
parent 26 04ca1926b01c
equal deleted inserted replaced
23:77cb48a03620 28:d9861ae9169c
     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:    XDM OMA Provisioning Adapter class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __XDMPROVADAPTER_H__
       
    22 #define __XDMPROVADAPTER_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <CWPAdapter.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CXdmProvItem;
       
    29 class CWPCharacteristic;
       
    30 
       
    31 // CONSTANTS
       
    32 #ifdef _DEBUG
       
    33 _LIT( KXdmProvAdapterLogDir,                          "Xdm" );
       
    34 _LIT( KXdmProvAdapterLogFile,                         "XdmProvAdapter.txt" );
       
    35 const TInt KXdmProvAdapterBufferMaxSize               = 2000;
       
    36 #endif
       
    37 
       
    38 const TInt KXdmProvIntMaxLength = 10; // max length of 32bit integer
       
    39 
       
    40 _LIT8( KXdmProvAppId8,          "ap0003" );
       
    41 _LIT8( KXdmProvSipIdentifier,   "w9010" );
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 class CXdmProvAdapter : public CWPAdapter
       
    46     {
       
    47     public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Two-phased constructor.
       
    51         */
       
    52         static CXdmProvAdapter* NewL();
       
    53 
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         ~CXdmProvAdapter();
       
    58         
       
    59 #ifdef _DEBUG        
       
    60         /**
       
    61         * Writes logs to file.
       
    62         */
       
    63         static void WriteToLog( TRefByValue<const TDesC8> aFmt,... );
       
    64 #endif
       
    65         
       
    66     private: // from CWPAdapter
       
    67         
       
    68         TInt ItemCount() const;
       
    69         const TDesC16& SummaryTitle( TInt aIndex ) const;
       
    70         const TDesC16& SummaryText( TInt aIndex ) const;
       
    71         void SaveL( TInt aItem );
       
    72         TBool CanSetAsDefault( TInt aItem ) const;
       
    73         void SetAsDefaultL( TInt aItem );
       
    74         TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor );
       
    75         void VisitL( CWPCharacteristic& aCharacteristic);       
       
    76         void VisitL( CWPParameter& aParameter );        
       
    77         void VisitLinkL( CWPCharacteristic& aLink );
       
    78         void SettingsSavedL ( const TDesC8& aAppIdOfSavingItem,
       
    79                               const TDesC8& aAppRef, 
       
    80                               const TDesC8& aStorageIdValue);
       
    81         void SavingFinalizedL();
       
    82         
       
    83         void GetSavingInfoL( TInt aIndex,
       
    84                              RPointerArray<HBufC8>& aSavingInfo );
       
    85 
       
    86          
       
    87 
       
    88     private:
       
    89 
       
    90         /**
       
    91         * C++ default constructor.
       
    92         */
       
    93         CXdmProvAdapter();
       
    94 
       
    95         /**
       
    96         * By default Symbian 2nd phase constructor is private.
       
    97         */
       
    98         void ConstructL();
       
    99         
       
   100         
       
   101     private: 
       
   102 
       
   103         // Default name for settings
       
   104         HBufC* iDefaultName;
       
   105 
       
   106         // Title for XDM settings
       
   107         HBufC* iTitle;
       
   108         
       
   109         // XdmItems
       
   110         RPointerArray<CXdmProvItem> iProvItems;
       
   111        
       
   112         
       
   113     };
       
   114 
       
   115 #endif // __XDMPROVADAPTER_H__   
       
   116             
       
   117 // End of File