voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlparamhandler.h
changeset 2 7b872347d83b
equal deleted inserted replaced
1:bfb1de3eac8e 2:7b872347d83b
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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:  Class definition of VoIP XML parameter handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VOIPXMLPARAMHANDLER_H
       
    20 #define VOIPXMLPARAMHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CVoipXmlSipHandler;
       
    25 class CVoipXmlVoipHandler;
       
    26 class CVoipXmlXdmHandler;
       
    27 class CVoipXmlPresenceHandler;
       
    28 class CVoipXmlNatFwHandler;
       
    29 class CVoipXmlIapHandler;
       
    30 
       
    31 /**
       
    32 *  CVoipXmlParamHandler 
       
    33 *  Handles parameters and passes them to settings handlers.
       
    34 * 
       
    35 *  @lib voipxmlprocessor.lib
       
    36 *  @since S60 v5.0
       
    37 */
       
    38 NONSHARABLE_CLASS( CVoipXmlParamHandler ) : public CBase
       
    39     {
       
    40 #ifdef _DEBUG
       
    41     friend class UT_CVoipXmlParamHandler;
       
    42     friend class UT_CVoipXmlParser;
       
    43 #endif
       
    44 
       
    45 public:
       
    46 
       
    47     static CVoipXmlParamHandler* NewL();
       
    48     
       
    49     static CVoipXmlParamHandler* NewLC(); 
       
    50 
       
    51     virtual ~CVoipXmlParamHandler();
       
    52 
       
    53     /**
       
    54      * Marks what type of settings are to be deployed.
       
    55      * 
       
    56      * @since S60 v5.0
       
    57      * @param aType Type of settings that are to be deployed.
       
    58      */
       
    59     void SettingsStart( const TDesC& aType );
       
    60 
       
    61     /**
       
    62      * Tells that settings are deployed and previous type should be used. 
       
    63      */
       
    64     void SettingsEnd();
       
    65 
       
    66     /**
       
    67      * Handles XML parameters and passes the handled
       
    68      * ones to settings handlers.
       
    69      * 
       
    70      * @since S60 v5.0
       
    71      * @param aParam Parameter name.
       
    72      * @param avalue Parameter value.
       
    73      */
       
    74     void HandleParameter( const TDesC& aParam, const TDesC& aValue );
       
    75 
       
    76     /**
       
    77      * Stores transiently saved settings.
       
    78      *
       
    79      * @since S60 v5.0
       
    80      * @return KErrNone if successful,
       
    81      *         KErrNotSupported if no SIP or VoIP settings to be stored,
       
    82      *         KErrCompletion if error occurred in storing settings.
       
    83      */
       
    84     TInt StoreSettings();
       
    85 
       
    86     /**
       
    87      * Returns the service tab ID.
       
    88      * 
       
    89      * @since S60 v5.0
       
    90      * @return Service tab ID.
       
    91      */
       
    92     TUint32 ServiceTabId();
       
    93 
       
    94 private:
       
    95 
       
    96     /**
       
    97      * Converts parameter name to enumerated one.
       
    98      *
       
    99      * @since S60 v5.0
       
   100      * @param aParam Parameter name.
       
   101      * @return Enumerated parameter value.
       
   102      */
       
   103     TInt ConvertParameter( const TDesC& aParam );
       
   104 
       
   105 private:
       
   106 
       
   107     CVoipXmlParamHandler();
       
   108 
       
   109     void ConstructL();
       
   110 
       
   111     
       
   112 private: // data
       
   113 
       
   114     /**
       
   115      * Type of settings that are currently being deployed.
       
   116      */
       
   117     TInt iSettingsType;
       
   118 
       
   119     /**
       
   120      * Type of previously deployed settings.
       
   121      */
       
   122     TInt iPreviousSettingsType;
       
   123 
       
   124     /**
       
   125      * SIP settings handler.
       
   126      * Own.
       
   127      */
       
   128     CVoipXmlSipHandler* iSipHandler;
       
   129 
       
   130     /**
       
   131      * VoIP settings handler.
       
   132      * Own.
       
   133      */
       
   134     CVoipXmlVoipHandler* iVoipHandler;
       
   135 
       
   136     /**
       
   137      * XDM settings handler.
       
   138      * Own.
       
   139      */
       
   140     CVoipXmlXdmHandler* iXdmHandler;
       
   141 
       
   142     /**
       
   143      * Presence settings handler.
       
   144      * Own.
       
   145      */
       
   146     CVoipXmlPresenceHandler* iPresenceHandler;
       
   147 
       
   148     /**
       
   149      * NAT/Firewall settings handler.
       
   150      * Own.
       
   151      */
       
   152     CVoipXmlNatFwHandler* iNatFwHandler;
       
   153 
       
   154     /**
       
   155      * Internet Access Point settings handler.
       
   156      * Own.
       
   157      */
       
   158     CVoipXmlIapHandler* iIapHandler;
       
   159     };
       
   160 
       
   161 #endif // VOIPXMLPARAMHANDLER_H
       
   162 
       
   163 // End of File
       
   164