iptel_plat/cch_server_api/inc/cchservice.h
changeset 0 a4daefaec16c
child 20 65a3ef1d5bd0
equal deleted inserted replaced
-1:000000000000 0:a4daefaec16c
       
     1 /*
       
     2 * Copyright (c) 2006-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_CCHSERVICE_H
       
    20 #define C_CCHSERVICE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <ecom/ecom.h>
       
    26 #include <cchclientserver.h>
       
    27 
       
    28 #include "CCHServiceObserver.h"
       
    29 
       
    30 
       
    31 // CONSTANTS
       
    32 /** Interface UID of this ECOM interface*/
       
    33 const TUid KCCHConnectivityPluginIFUid = { 0x10275457 };
       
    34 
       
    35 // MACROS
       
    36 // None
       
    37 
       
    38 // DATA TYPES
       
    39 // None
       
    40 
       
    41 // FUNCTION PROTOTYPES
       
    42 // None
       
    43 
       
    44 // FORWARD DECLARATIONS
       
    45 // None
       
    46 
       
    47 // CLASS DECLARATION
       
    48     
       
    49 /**
       
    50  *  CCchService declaration.
       
    51  *  CCH service connectivity plug-in API.
       
    52  *  @since S60 3.2
       
    53  */
       
    54 class CCchService : public CBase
       
    55     {
       
    56     
       
    57 public:
       
    58 
       
    59     static CCchService* NewL( TUid aImplementationUid,
       
    60                               MCchServiceObserver& aCCHObserver );
       
    61 
       
    62     
       
    63     virtual inline ~CCchService();
       
    64     
       
    65     /**
       
    66      * Client enables service. CCHService implementation
       
    67      * should use MCCHServiceObserver for service state notifications.
       
    68      * @since S60 3.2
       
    69      * @param aServiceSelection Selected service, ID and type
       
    70      */
       
    71     virtual void EnableServiceL( const TServiceSelection& aServiceSelection ) = 0;
       
    72                                  
       
    73     /**
       
    74      * Client enables service. CCHService implementation
       
    75      * should use MCCHServiceObserver for service state notifications.
       
    76      * @since S60 3.2
       
    77      * @param aServiceSelection Selected service, ID and type
       
    78      * @param aIapId
       
    79      */
       
    80     virtual void EnableServiceL( const TServiceSelection& aServiceSelection, 
       
    81                                  TUint aIapId ) = 0;
       
    82    
       
    83     /**
       
    84      * Client disables service. 
       
    85      * @since S60 3.2
       
    86      * @param aServiceSelection Selected service, ID and type
       
    87      */
       
    88     virtual void DisableServiceL( const TServiceSelection& aServiceSelection  ) = 0;
       
    89     
       
    90     /**
       
    91      * Client checks is the service available by the IAP id array.
       
    92      * CCHService implementation should return ETrue if service is
       
    93      * registrable by the (some) IAP, array contains. 
       
    94      * @since S60 3.2
       
    95      * @param aServiceSelection Selected service, ID and type
       
    96      * @param aIapIdArray Id array of the currently available iaps.
       
    97      * @return ETrue if service is available.
       
    98      */
       
    99     virtual TBool IsAvailableL( const TServiceSelection& aServiceSelection,
       
   100                                 const RArray<TUint32>& aIapIdArray ) const = 0;
       
   101     
       
   102     /**
       
   103      * Get service state information.
       
   104      * @since S60 3.2
       
   105      * @param aServiceSelection Selected service, ID and type
       
   106      * @param aState Current service state.
       
   107      * @return General symbian error code.
       
   108      */
       
   109     virtual TInt GetServiceState( const TServiceSelection& aServiceSelection, 
       
   110                                   TCCHSubserviceState& aState ) const = 0;
       
   111     
       
   112     /**
       
   113      * Get service network information.
       
   114      * @since S60 3.2
       
   115      * @param aConnectionInfo Selected service, ID and type, used 
       
   116      *               SNAP id (should be set as null if not in use),
       
   117      *               used IAP id (should be set as null if not in use),
       
   118      *               SNAP locked indicator
       
   119      * @return General symbian error code.
       
   120      */
       
   121     virtual TInt GetServiceNetworkInfo( TServiceConnectionInfo& aConnectionInfo ) const = 0;
       
   122                                         
       
   123     /**
       
   124      * Set SNAP id for service.
       
   125      * @since S60 3.2
       
   126      * @param aServiceSelection Selected service, ID and type
       
   127      * @param aSnapId 
       
   128      * @return General symbian error code.
       
   129      */
       
   130     virtual TInt SetSnapId( const TServiceSelection& aServiceSelection,
       
   131                             TUint aSnapId ) = 0;
       
   132                             
       
   133     /**
       
   134      * Set IAP id for service.
       
   135      * @since S60 3.2
       
   136      * @param aServiceSelection Selected service, ID and type
       
   137      * @param aIapId 
       
   138      * @return General symbian error code.
       
   139      */
       
   140     virtual TInt SetIapId( const TServiceSelection& aServiceSelection,
       
   141                            TUint aIapId ) = 0;                               
       
   142     
       
   143     /**
       
   144      * Get service specifics information about service and protocol
       
   145      * @since S60 3.2
       
   146      * @param aServiceSelection Selected service, ID and type
       
   147      */
       
   148     virtual void GetServiceInfoL( const TServiceSelection& aServiceSelection,
       
   149                                   RBuf& aBuffer ) const = 0;
       
   150                                   
       
   151     /**
       
   152      * Reserves the service for exclusive use
       
   153      * @since S60 3.2
       
   154      * @param aServiceSelection Selected service, ID and type
       
   155      * @return General symbian error code.
       
   156      */
       
   157     virtual TInt ReserveService( const TServiceSelection& aServiceSelection ) = 0;
       
   158 
       
   159     /**
       
   160      * Frees the exclusive service reservation
       
   161      * @since S60 3.2
       
   162      * @param aServiceSelection Selected service, ID and type
       
   163      * @return General symbian error code.
       
   164      */
       
   165     virtual TInt FreeService( const TServiceSelection& aServiceSelection ) = 0;
       
   166     
       
   167     /**
       
   168      * Is the service reserved
       
   169      * @since S60 3.2
       
   170      * @param aServiceSelection Selected service, ID and type
       
   171      * @return TBool 
       
   172      */
       
   173     virtual TBool IsReserved( const TServiceSelection& aServiceSelection ) const = 0;
       
   174 
       
   175     /**
       
   176      * Returns the connection parameters
       
   177      * @since S60 3.2.3
       
   178      * @param aServiceSelection Selected service, ID and type
       
   179      * @param aParameter Connection parameter of the service
       
   180      * @param aValue Value of the parameter
       
   181      * @return Symbian error code
       
   182      */
       
   183     virtual TInt GetConnectionParameter( 
       
   184                          const TServiceSelection& aServiceSelection,
       
   185                          TCchConnectionParameter aParameter,
       
   186                          TInt& aValue ) const = 0;
       
   187     
       
   188     /**
       
   189      * Returns the connection parameters
       
   190      * @since S60 3.2.3
       
   191      * @param aServiceSelection Selected service, ID and type
       
   192      * @param aParameter Connection parameter of the service
       
   193      * @param aValue Value of the parameter
       
   194      * @return Symbian error code
       
   195      */
       
   196     virtual TInt GetConnectionParameter(  
       
   197                          const TServiceSelection& aServiceSelection, 
       
   198                          TCchConnectionParameter aParameter,
       
   199                          RBuf& aValue ) const = 0;
       
   200     
       
   201     /**
       
   202      * Sets the connection parameters
       
   203      * @since S60 3.2.3
       
   204      * @param aServiceSelection Selected service, ID and type
       
   205      * @param aParameter Connection parameter of the service
       
   206      * @param aValue Value of the parameter
       
   207      * @return Symbian error code
       
   208      */
       
   209     virtual TInt SetConnectionParameter(  
       
   210                          const TServiceSelection& aServiceSelection, 
       
   211                          TCchConnectionParameter aParameter,
       
   212                          TInt aValue ) = 0;
       
   213     
       
   214     /**
       
   215      * Sets the connection parameters
       
   216      * @since S60 3.2.3
       
   217      * @param aServiceSelection Selected service, ID and type
       
   218      * @param aParameter Connection parameter of the service
       
   219      * @param aValue Value of the parameter
       
   220      * @return Symbian error code
       
   221      */
       
   222     virtual TInt SetConnectionParameter(  
       
   223                          const TServiceSelection& aServiceSelection, 
       
   224                          TCchConnectionParameter aParameter,
       
   225                          const TDesC& aValue ) = 0;
       
   226 
       
   227 public: // Data
       
   228 
       
   229     /// Unique key for implementations of this interface.
       
   230     TUid iInstanceKey;
       
   231 
       
   232 protected: // Constructors 
       
   233 
       
   234     inline CCchService();
       
   235     
       
   236     };
       
   237 
       
   238 #include "CCHService.inl"
       
   239 
       
   240 #endif // C_CCHSERVICE_H
       
   241 
       
   242 // End of file