convergedconnectionhandler/cchserver/inc/cchspshandler.h
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2007-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:  CCCHSPSHandler declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCHSPSHANDLER_H
       
    20 #define C_CCHSPSHANDLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <cchclientserver.h>
       
    26 #include <spproperty.h>
       
    27 
       
    28 // CONSTANTS
       
    29 // None
       
    30 
       
    31 // MACROS
       
    32 // None
       
    33 
       
    34 // DATA TYPES
       
    35 // None
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 // None
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class CCCHServerBase;
       
    42 class CSPSettings;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47  *  CCCHSPSHandler declaration.
       
    48  *  Service provider settings handler is used to access service and
       
    49  *  sub-service configuration data.
       
    50  *  @lib cchserver.exe
       
    51  *  @since S60 3.2
       
    52  */
       
    53 NONSHARABLE_CLASS( CCCHSPSHandler ) : public CBase
       
    54     {
       
    55 
       
    56 public: // Constructors and destructor
       
    57 
       
    58     /**
       
    59     * Two-phased constructor.
       
    60     */
       
    61     static CCCHSPSHandler* NewL( CCCHServerBase& aServer );
       
    62 
       
    63     /**
       
    64      * Two-phased constructor.
       
    65      */
       
    66     static CCCHSPSHandler* NewLC( CCCHServerBase& aServer );
       
    67 
       
    68     /**
       
    69      * Destructor.
       
    70      */
       
    71     virtual ~CCCHSPSHandler();
       
    72 
       
    73 public: // New functions
       
    74 
       
    75     /**
       
    76      * Get service count
       
    77      * @since S60 3.2
       
    78      * @return TInt Count of services
       
    79      */
       
    80     TInt GetServicesCountL() const;
       
    81     
       
    82     /**
       
    83      * Get service ids
       
    84      * @since S60 3.2
       
    85      * @param aServiceIds On completion contains service ids
       
    86      */
       
    87     void GetServiceIdsL( RArray<TUint>& aServiceIds ) const;
       
    88     
       
    89     /**
       
    90      * Get service's information
       
    91      * @since S60 3.2
       
    92      * @param aServiceId Used Service
       
    93      * @param aService On completion, contains service information
       
    94      */
       
    95     void GetServiceInfoL( const TUint32 aServiceId, TCCHService& aService ) const;
       
    96     
       
    97     /**
       
    98      * Get connectivity Plug-in's Uid
       
    99      * @since S60 3.2
       
   100      * @param aSerivceId Used Service
       
   101      * @param aType Subservice's type
       
   102      * @param aUid On completion, contains Plug-ins Uid
       
   103      */
       
   104     void GetConnectivityPluginUidL( TUint32 aServiceId,
       
   105         TCCHSubserviceType aType, 
       
   106         TUid& aUid ) const;
       
   107         
       
   108     /**
       
   109      * Get Service's load at startup information
       
   110      * @since S60 3.2
       
   111      * @param aServiceId Used Service
       
   112      * @param aType Subservice's type
       
   113      * @param aOnOff On completion, contains Service's startup info
       
   114      */                
       
   115     void LoadAtStartUpL( TUint32 aServiceId,
       
   116         TCCHSubserviceType aType,
       
   117         TBool& aOnOff ) const;
       
   118     
       
   119     /**
       
   120      * Set Service's load at startup information to service table
       
   121      * @since S60 3.2
       
   122      * @param aServiceId Used Service
       
   123      * @param aType Subservice's type
       
   124      * @param aOnOff 
       
   125      */    
       
   126     void SetLoadAtStartUpL( const TUint32 aServiceId,
       
   127         const TCCHSubserviceType aType,
       
   128         const TBool aOnOff ) const;
       
   129         
       
   130 private:
       
   131 
       
   132     /**
       
   133      * Changes Subservice's type to property type and name
       
   134      * @since S60 3.2
       
   135      * @param aType Subservice's type
       
   136      * @param aPropertyType On completion, contains property's type
       
   137      * @param aPropertyName On completion, contains property's name
       
   138      */                
       
   139     void ChangeToPropertyStyleL( TCCHSubserviceType aType,
       
   140         TSPItemType& aPropertyType,
       
   141         TServicePropertyName& aPropertyName ) const;
       
   142        
       
   143     /**
       
   144      * Checks is given subservice valid.
       
   145      * @since S60 3.2
       
   146      * aServiceId Used Service
       
   147      * @param aPropertyName Property's name
       
   148      * @return ETrue if subservice is valid, otherwise EFalse.
       
   149      */  
       
   150     TBool ValidSubserviceL( const TUint32 aServiceId, 
       
   151         TServicePropertyName aPropertyName ) const;
       
   152         
       
   153 private:
       
   154 
       
   155     /**
       
   156      * C++ default constructor.
       
   157      */
       
   158     CCCHSPSHandler( CCCHServerBase& aServer );
       
   159 
       
   160     /**
       
   161      * By default Symbian 2nd phase constructor is private.
       
   162      */
       
   163     void ConstructL();
       
   164 
       
   165 private: // data
       
   166 
       
   167     /**
       
   168      * Handle to server
       
   169      */
       
   170     CCCHServerBase&                 iServer;
       
   171 
       
   172     /**
       
   173      * CSPSettings. Own
       
   174      */
       
   175     CSPSettings*                    iSettings;
       
   176     
       
   177     };
       
   178 
       
   179 #endif // C_CCHSPSHANDLER_H
       
   180 
       
   181 // End of file