voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlxdmhandler.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:  XDM handler for VoIP XML processor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef  VOIPXMLXDMHANDLER_H
       
    20 #define  VOIPXMLXDMHANDLER_H
       
    21 
       
    22 
       
    23 class CXdmSettingsCollection;
       
    24 
       
    25 /**
       
    26 *  VoipXmlXdmHandler
       
    27 *  XDM handler class.
       
    28 * 
       
    29 *  @lib voipxmlprocessor.lib
       
    30 *  @since S60 v5.0
       
    31 */
       
    32 class CVoipXmlXdmHandler : public CBase
       
    33     {
       
    34 #ifdef _DEBUG
       
    35     friend class UT_CVoipXmlXdmHandler;
       
    36     friend class UT_CVoipXmlParamHandler;
       
    37 #endif
       
    38 
       
    39 public:
       
    40 
       
    41     static CVoipXmlXdmHandler* NewL();
       
    42     ~CVoipXmlXdmHandler();
       
    43 
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Sets XDM setting.
       
    48      *
       
    49      * @since S60 v5.0
       
    50      * @param aParam Parameter to be set.
       
    51      * @param aValue Value of the setting.
       
    52      */
       
    53     void SetSetting( TInt aParam, const TDesC& aValue );
       
    54 
       
    55     /**
       
    56      * Stores settings to 'XDM registry', i.e. creates an XDM collection.
       
    57      *
       
    58      * @since S60 v5.0
       
    59      * @return KErrNone if successful,
       
    60      *         KErrNotSupported if no settings to be stored,
       
    61      *         KErrCompletion if settings could not be stored.
       
    62      */
       
    63     TInt StoreSettings();
       
    64 
       
    65     /**
       
    66      * Returns the settings ID.
       
    67      *
       
    68      * @since S60 v5.0
       
    69      * @return XDM settings ID.
       
    70      */
       
    71     TUint32 SettingsId();
       
    72 
       
    73 private:
       
    74 
       
    75     /**
       
    76      * Sets XDM setting.
       
    77      *
       
    78      * @since S60 v5.0
       
    79      * @param aParam Parameter to be set.
       
    80      * @param aValue Value of the setting.
       
    81      */
       
    82     void SetSettingL( TInt aParam, const TDesC& aValue );
       
    83 
       
    84     /**
       
    85      * Creates a provider name for XDM profile. aName is used
       
    86      * and replaced with a parenthised ordered number if the name is
       
    87      * already found in XDM storage.
       
    88      *
       
    89      * @since S60 v5.0
       
    90      * @param aName Provider name to be set.
       
    91      */
       
    92     void CreateProviderNameL( TDes& aName );
       
    93 
       
    94 private:
       
    95 
       
    96     CVoipXmlXdmHandler();
       
    97     void ConstructL();
       
    98 
       
    99 private:
       
   100 
       
   101     /**
       
   102      * XDM settings collection object.
       
   103      * Own.
       
   104      */
       
   105     CXdmSettingsCollection* iProfile;
       
   106 
       
   107     /**
       
   108      * Tells if any settings have been set to temporary profile.
       
   109      */
       
   110     TBool iSettingsSet;
       
   111 
       
   112     /**
       
   113      * XDM collection ID.
       
   114      */
       
   115     TUint32 iProfileId;
       
   116     };
       
   117 
       
   118 #endif // VOIPXMLXDMHANDLER_H
       
   119 
       
   120 // End of file.