convergedcallengine/cce/inc/cccespsettingshandler.h
changeset 0 ff3b6d0fd310
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  Contains service settings handling logic
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCCESPSETTINGSHANDLER_H_
       
    20 #define CCCESPSETTINGSHANDLER_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <mspnotifychangeobserver.h>
       
    24 
       
    25 class CCCEPluginManager;
       
    26 class CSPNotifyChange;
       
    27 class CSPSettings;
       
    28 class MCCESPSObserver;
       
    29 
       
    30 /**
       
    31  *  CCE Service provider settings handler
       
    32  *
       
    33  *
       
    34  *
       
    35  *  @lib cce.dll
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 NONSHARABLE_CLASS(CCCESPSettingsHandler) : public CBase, 
       
    39     public MSPNotifyChangeObserver
       
    40     {
       
    41 public:
       
    42     /**
       
    43      * Two-phased constructor.
       
    44      */
       
    45     static CCCESPSettingsHandler* NewL( MCCESPSObserver& aObserver );
       
    46 
       
    47     /**
       
    48      * Destructors.
       
    49      */
       
    50     virtual ~CCCESPSettingsHandler();
       
    51     
       
    52 public:
       
    53     /**
       
    54      * Gets leaves if not supported
       
    55      * 
       
    56      * @param aImplementationUid Implementation uid of plugin
       
    57      */
       
    58     void IsPluginSupportedL( TUid aImplementationUid );
       
    59 
       
    60     /**
       
    61      * Gets services available
       
    62      * 
       
    63      * @param aServices Array of available services
       
    64      */
       
    65     void GetServicesL( RIdArray& aServices );
       
    66 
       
    67     /**
       
    68      * Gets call provider implementation uid for desired service
       
    69      * 
       
    70      * @param aServiceId Service
       
    71      * @return Call provider implementation uid
       
    72      */
       
    73     TUid ImplementationUidL( TInt aServiceId );
       
    74     
       
    75     /**
       
    76      * Gets capablities for desired service
       
    77      * 
       
    78      * @param aServiceId Service
       
    79      * @return Service capablities
       
    80      */
       
    81     TPropertyServiceAttributes CapabilitiesL( TInt aServiceId );
       
    82     
       
    83     /**
       
    84      * Returns ETrue if VoIP atribute is enabled for desired service
       
    85      * 
       
    86      * @param aServiceId Service
       
    87      * @return ETrue if service is enabled
       
    88      */
       
    89     TBool IsEnabledL( TInt aServiceId );
       
    90     
       
    91 private:
       
    92 // from MSPNotifyChangeObserver
       
    93 
       
    94     /** @see MSPNotifyChangeObserver */
       
    95     void HandleNotifyChange( TServiceId aServiceId );
       
    96 
       
    97     /** @see MSPNotifyChangeObserver */
       
    98     void HandleError( TInt aError );
       
    99 
       
   100 private:
       
   101     /**
       
   102      * Handles SPSettings change
       
   103      * 
       
   104      * @param aServiceId Changed service
       
   105      */
       
   106     void HandleServiceChangeL( TInt aServiceId );
       
   107     
       
   108     /**
       
   109      * Start listening SPSettings changes
       
   110      * 
       
   111      */
       
   112     void StartListeningChangesL();
       
   113     
       
   114     /**
       
   115      * Is Plugin on standby state. 
       
   116      * 
       
   117      * @param aImplementationUid Implementation uid of plugin
       
   118      * @return ETrue if plugin is on standby state 
       
   119      */
       
   120     TBool IsPluginOnStandbyL( TUid aImplementationUid );
       
   121     
       
   122     /**
       
   123      * Custom clean up for pointer array
       
   124      */
       
   125     static void CleanupPointerArray(  TAny* aPointer );
       
   126         
       
   127 
       
   128     /**
       
   129      * By default Symbian 2nd phase constructor is private.
       
   130      */
       
   131     void ConstructL();
       
   132 
       
   133     /**
       
   134      * C++ default constructor.
       
   135      */
       
   136     CCCESPSettingsHandler( MCCESPSObserver& aObserver );
       
   137     
       
   138 private:
       
   139     /**
       
   140      * Reference to observer
       
   141      */
       
   142     MCCESPSObserver& iObserver;
       
   143 
       
   144     /**
       
   145      * Notifies service provider setting change
       
   146      * Own
       
   147      */
       
   148     CSPNotifyChange* iNotifier;
       
   149 
       
   150     /**
       
   151      * Contains service provider settings
       
   152      * Own
       
   153      */
       
   154     CSPSettings*  iSettings;
       
   155 
       
   156     };
       
   157 
       
   158 #endif /*CCCESPSETTINGSHANDLER_H_*/
       
   159 
       
   160 // end of file