voipplugins/sipconnectionprovider/inc/scpplugin.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007 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_SCPPLUGIN_H
       
    20 #define C_SCPPLUGIN_H
       
    21 
       
    22 #include <cchservice.h>
       
    23 
       
    24 class CScpServiceManager;
       
    25 
       
    26 /**
       
    27 *  CScpPlugin class
       
    28 *  @lib sipconnectionprovider.dll
       
    29 */
       
    30 class CScpPlugin : public CCchService
       
    31     {
       
    32     
       
    33 public:	// Constructors and destructor
       
    34 
       
    35     /**
       
    36     * Two-phased constructor
       
    37     */
       
    38     static CScpPlugin* NewL( TAny* aParam );  
       
    39 
       
    40     /**
       
    41     * Destructor.
       
    42     */
       
    43     virtual ~CScpPlugin();
       
    44     
       
    45 // from base class CCHService
       
    46     
       
    47     /**
       
    48      * Client enables service. CCHService implementation
       
    49      * should use MCCHServiceObserver for service state notifications.
       
    50      * @see MCCHServiceObserver
       
    51      * @param aServiceSelection Service selection
       
    52      */
       
    53     void EnableServiceL( const TServiceSelection& aServiceSelection );
       
    54                                  
       
    55     /**
       
    56      * Client enables service. CCHService implementation
       
    57      * should use MCCHServiceObserver for service state notifications.
       
    58      * @see MCCHServiceObserver
       
    59      * @param aServiceSelection Service selection
       
    60      * @param aIapId Iap id
       
    61      */
       
    62     void EnableServiceL( const TServiceSelection& aServiceSelection,
       
    63                          TUint aIapId );
       
    64     
       
    65     /**
       
    66      * Client disables service. 
       
    67      * @param aServiceId
       
    68      */
       
    69     void DisableServiceL( const TServiceSelection& aServiceSelection );
       
    70     
       
    71     /**
       
    72      * Client checks is the service available by the IAP id array.
       
    73      * CCHService implementation should return ETrue if service is
       
    74      * registrable by the (some) IAP, array contains. 
       
    75      * @param aServiceSelection Service selection
       
    76      * @param aIapIdArray Id array of the currently available iaps.
       
    77      * @return ETrue if service is available.
       
    78      */
       
    79     TBool IsAvailableL( const TServiceSelection& aServiceSelection,
       
    80                         const RArray<TUint32>& aIapIdArray ) const;
       
    81     
       
    82     /**
       
    83      * Get service state information.
       
    84      * @param aServiceSelection Service selection
       
    85      * @param aState Current service state.
       
    86      * @return General symbian error code.
       
    87      */
       
    88     TInt GetServiceState( const TServiceSelection& aServiceSelection, 
       
    89                           TCCHSubserviceState& aState ) const;
       
    90     
       
    91     /**
       
    92      * Get service network information.
       
    93      * @param aConnectionInfo Connection info
       
    94      * @return General symbian error code.
       
    95      */
       
    96     TInt GetServiceNetworkInfo( TServiceConnectionInfo& aConnectionInfo ) const;
       
    97                                         
       
    98     /**
       
    99      * Set Snap id for service.
       
   100      * @param aServiceSelection Service selection
       
   101      * @return General symbian error code.
       
   102      */
       
   103     TInt SetSnapId( const TServiceSelection& aServiceSelection,
       
   104                     TUint aSnapId );
       
   105                     
       
   106     /**
       
   107      * Set IAP id for service.
       
   108      * @param aServiceSelection Service selection
       
   109      * @param aIapId 
       
   110      * @return General symbian error code.
       
   111      */
       
   112     TInt SetIapId( const TServiceSelection& aServiceSelection,
       
   113                    TUint aIapId );                               
       
   114     
       
   115     /**
       
   116      * Get service specifics information about service and protocol
       
   117      * @param aServiceSelection Service selection
       
   118      * @param aBuffer Info will be inserted to this buffer  
       
   119      */
       
   120     void  GetServiceInfoL( const TServiceSelection& aServiceSelection,
       
   121                            RBuf& aBuffer ) const;
       
   122 
       
   123     /**
       
   124      * Reserves the service for exclusive use
       
   125      * @param aServiceSelection Selected service, ID and type
       
   126      * @return General symbian error code.
       
   127      */
       
   128     TInt ReserveService( const TServiceSelection& aServiceSelection );
       
   129 
       
   130     /**
       
   131      * Frees the exclusive service reservation
       
   132      * @param aServiceSelection Selected service, ID and type
       
   133      * @return General symbian error code.
       
   134      */
       
   135     TInt FreeService( const TServiceSelection& aServiceSelection );
       
   136     
       
   137     /**
       
   138      * Is the service reserved
       
   139      * @param aServiceSelection Selected service, ID and type
       
   140      * @return TBool 
       
   141      */
       
   142     TBool IsReserved( const TServiceSelection& aServiceSelection ) const;
       
   143 
       
   144     /**
       
   145      * Returns the connection parameters
       
   146      * @since S60 3.2.3
       
   147      * @param aServiceSelection Selected service, ID and type
       
   148      * @param aParameter Connection parameter of the service
       
   149      * @param aValue Value of the parameter
       
   150      * @return Symbian error code
       
   151      */
       
   152     TInt GetConnectionParameter( const TServiceSelection& aServiceSelection,
       
   153                                  TCchConnectionParameter aParameter,
       
   154                                  TInt& aValue ) const;
       
   155     
       
   156     /**
       
   157      * Returns the connection parameters
       
   158      * @since S60 3.2.3
       
   159      * @param aServiceSelection Selected service, ID and type
       
   160      * @param aParameter Connection parameter of the service
       
   161      * @param aValue Value of the parameter
       
   162      * @return Symbian error code
       
   163      */
       
   164     TInt GetConnectionParameter( const TServiceSelection& aServiceSelection, 
       
   165                                  TCchConnectionParameter aParameter,
       
   166                                  RBuf& aValue ) const;
       
   167     
       
   168     /**
       
   169      * Sets the connection parameters
       
   170      * @since S60 3.2.3
       
   171      * @param aServiceSelection Selected service, ID and type
       
   172      * @param aParameter Connection parameter of the service
       
   173      * @param aValue Value of the parameter
       
   174      * @return Symbian error code
       
   175      */
       
   176     TInt SetConnectionParameter( const TServiceSelection& aServiceSelection, 
       
   177                                  TCchConnectionParameter aParameter,
       
   178                                  TInt aValue );
       
   179     
       
   180     /**
       
   181      * Sets the connection parameters
       
   182      * @since S60 3.2.3
       
   183      * @param aServiceSelection Selected service, ID and type
       
   184      * @param aParameter Connection parameter of the service
       
   185      * @param aValue Value of the parameter
       
   186      * @return Symbian error code
       
   187      */
       
   188     virtual TInt SetConnectionParameter( 
       
   189                          const TServiceSelection& aServiceSelection, 
       
   190                          TCchConnectionParameter aParameter,
       
   191                          const TDesC& aValue );
       
   192     
       
   193     
       
   194 private:
       
   195 
       
   196     /**
       
   197      * Constructor is hidden
       
   198      */
       
   199     CScpPlugin( MCchServiceObserver& aServiceObserver );
       
   200 
       
   201     /**
       
   202      * 2nd phase constructor
       
   203      */
       
   204     void ConstructL();
       
   205 
       
   206 private:
       
   207 
       
   208     /**
       
   209      * Service manager. Own
       
   210      */
       
   211     CScpServiceManager* iServiceManager;
       
   212     
       
   213     /**
       
   214      * CCH service observer.
       
   215      */ 
       
   216     MCchServiceObserver& iServiceObserver;
       
   217    
       
   218 	};	
       
   219 
       
   220 #endif  // C_SCPPLUGIN_H
       
   221 
       
   222 // End of file
       
   223