phoneengine/servicehandling/inc/cpeservicehandling.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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:  Provides service enabling implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PESERVICEHANDLING_H
       
    20 #define C_PESERVICEHANDLING_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "mpeservicehandling.h"
       
    24 
       
    25 class  MPEPhoneModelInternal;
       
    26 
       
    27 /**
       
    28  *  CPEServiceHandling implements the intefaces MPEServiceHandling and 
       
    29  *  thus provides the service enabling imlementation for Phone Engine.
       
    30  *  
       
    31  *  @lib peservicehandling.lib
       
    32  *  @since S60 v5.0
       
    33  */
       
    34 NONSHARABLE_CLASS( CPEServiceHandling ): public CBase,
       
    35                                          public MPEServiceHandling
       
    36     {
       
    37 
       
    38     public: // Constructors and destructor
       
    39 
       
    40         /**
       
    41          * Two-phased constructor.
       
    42          */
       
    43         IMPORT_C static CPEServiceHandling* NewL( MPEPhoneModelInternal& aModel );
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          */
       
    48         IMPORT_C static CPEServiceHandling* NewLC( MPEPhoneModelInternal& aModel );
       
    49 
       
    50         /**
       
    51          * Destructors.
       
    52          */
       
    53         IMPORT_C virtual ~CPEServiceHandling();
       
    54 
       
    55     public: // from MPEServiceHandling
       
    56     
       
    57         /**
       
    58          * From MPEServiceHandling.
       
    59          * Enables service defined by the given identifier.
       
    60          * This function does the service enabling and service status error checking.
       
    61          * If service is enabled successfully, send message 
       
    62          * (EPEMessageServiceEnabled) to PhoneEngine. 
       
    63          * 
       
    64          * @since   S60 5.0
       
    65          * @param   aServiceId      Identifier of the service.
       
    66          */                                     
       
    67         void EnableServiceL( TInt aServiceId );
       
    68        
       
    69         /**
       
    70          * From MPEServiceHandling.
       
    71          * Cancel current service.
       
    72          */ 
       
    73         void CancelServiceEnabling() const;
       
    74         
       
    75         /**
       
    76          * From MPEServiceHandling.
       
    77          * Disable service.
       
    78          */ 
       
    79         void DisableService() const;
       
    80     
       
    81     private: // Constructors
       
    82 
       
    83         /**
       
    84          * C++ default constructor.
       
    85          */
       
    86         CPEServiceHandling( MPEPhoneModelInternal& aModel );
       
    87         
       
    88         /**
       
    89          * By default Symbian 2nd phase constructor is private.
       
    90          */
       
    91         void ConstructL();
       
    92                
       
    93     private: // data
       
    94         
       
    95         /**
       
    96          * PhoneModel.
       
    97          * Not own.
       
    98          */
       
    99         MPEPhoneModelInternal& iModel;
       
   100         
       
   101         /**
       
   102          * Current service identifier.
       
   103          */
       
   104         TInt iCurrentServiceId;
       
   105     };
       
   106 
       
   107 #endif // C_PESERVICEHANDLING_H