voipplugins/svtlogging/inc/csvtsettingshandler.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2008 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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CSVTSETTINGSHANDLER_H
       
    20 #define C_CSVTSETTINGSHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <sipprofileregistryobserver.h>
       
    24 
       
    25 class CSPSettings;
       
    26 class CRCSEProfileRegistry;
       
    27 class CSIPManagedProfileRegistry;
       
    28 class CRCSEProfileEntry;
       
    29 
       
    30 /**
       
    31  *  Encapsulates handling of system settings having an effect on plugin.
       
    32  *
       
    33  *  @lib svtlogging.dll
       
    34  *  @since S60 v5.1
       
    35  */
       
    36 class CSvtSettingsHandler : public CBase, public MSIPProfileRegistryObserver
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      * @param aServiceId    The service identifier.
       
    44      * @leave KErrNotFound if service provider settings for given identifier
       
    45      * do not exist.
       
    46      */
       
    47     static CSvtSettingsHandler* NewL( TUint aServiceId );
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      * @param aServiceId    The service identifier.
       
    52      * @leave KErrNotFound if service provider settings for given identifier
       
    53      * do not exist.
       
    54      */
       
    55     static CSvtSettingsHandler* NewLC( TUint aServiceId );
       
    56     
       
    57     /**
       
    58     * Destructor.
       
    59     */
       
    60     virtual ~CSvtSettingsHandler();
       
    61 
       
    62     /**
       
    63      * Returns SIP address domain part clipping setting.
       
    64      *
       
    65      * @since   S60 v5.1
       
    66      * @return  Clipping setting.
       
    67      */
       
    68     TInt DomainPartClippingSetting() const;
       
    69     
       
    70     /**
       
    71      * Returns local user's AOR.
       
    72      *
       
    73      * @since   S60 v5.1
       
    74      * @param   aUserAor      User AOR.
       
    75      */
       
    76     void GetUserAorL( RBuf& aUserAor );
       
    77 
       
    78 // from base class MSIPProfileRegistryObserver.
       
    79 
       
    80     /**
       
    81      * From MSIPProfileRegistryObserver.
       
    82      * @see MSIPProfileRegistryObserver.
       
    83      */
       
    84     void ProfileRegistryEventOccurred( TUint32 aProfileId, TEvent aEvent );
       
    85 
       
    86     /**
       
    87      * From MSIPProfileRegistryObserver.
       
    88      * @see MSIPProfileRegistryObserver.
       
    89      */
       
    90     void ProfileRegistryErrorOccurred( TUint32 aProfileId, TInt aError );
       
    91 
       
    92 private:
       
    93 
       
    94     CSvtSettingsHandler() {};
       
    95     
       
    96     CSvtSettingsHandler( TUint aServiceId );
       
    97 
       
    98     void ConstructL();
       
    99     
       
   100     TBool IsServiceConfiguredL( TUint aServiceId ) const;
       
   101     
       
   102     CSPSettings* CreateServiceProviderSettingsL() const;
       
   103     
       
   104     CRCSEProfileRegistry* CreateRcseProfileRegistryLC() const;
       
   105     
       
   106     CSIPManagedProfileRegistry* CreateSipProfileRegistryLC();
       
   107     
       
   108     CRCSEProfileEntry* RcseProfileForServiceL( TUint aServiceId ) const;
       
   109     
       
   110     TInt SipProfileIdForServiceL( TUint aServiceId ) const;
       
   111     
       
   112 private: // data
       
   113 
       
   114     /**
       
   115      * Service identifier.
       
   116      */
       
   117     TUint iServiceId;
       
   118 
       
   119     };
       
   120 
       
   121 #endif // C_CSVTSETTINGSHANDLER_H