phoneuis/ConnectUtil/inc/CCoUtlInterface.h
changeset 0 5f000ab63145
child 9 8871b09be73b
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2003 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 abstract ECOM interface for connection utility.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCOUTLINTERFACE_H
       
    21 #define CCOUTLINTERFACE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *  Abstract ECOM interface for connection termination.
       
    30 *
       
    31 *  @since 2.6
       
    32 */
       
    33 class CCoUtlInterface 
       
    34     : public CBase
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37         
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         */
       
    41         inline static CCoUtlInterface* NewL();
       
    42         
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         virtual ~CCoUtlInterface();
       
    47 
       
    48     public: // New functions
       
    49         
       
    50         /**
       
    51         * Enumerates states.
       
    52         *
       
    53         * EIdle - idle, 
       
    54         * EConfirm - asking for user decision,
       
    55         * ETerminate - terminating
       
    56         */
       
    57         enum TState
       
    58             {
       
    59             EIdle,
       
    60             EConfirm,
       
    61             ETerminate
       
    62             };
       
    63 
       
    64         /**
       
    65         * Returns current state.
       
    66         * @return current state.
       
    67         */
       
    68         virtual TState CurrentState() = 0;
       
    69 
       
    70         /**
       
    71         * Terminates connections.
       
    72         * @param aStatus request status to be completed once
       
    73         *                finished.
       
    74         */
       
    75         virtual void Terminate( TRequestStatus& aStatus ) = 0;
       
    76     
       
    77         /**
       
    78         * Interrupts termination. 
       
    79         */
       
    80         virtual void Cancel() = 0;
       
    81 
       
    82     private:    // Data
       
    83         
       
    84         // Uid required by ECOM.
       
    85         TUid iDtor_ID_Key;
       
    86 
       
    87     };
       
    88 
       
    89 #include    <CCoUtlInterface.inl>
       
    90 
       
    91 #endif      // CCOUTLINTERFACE_H
       
    92             
       
    93 // End of File