phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-2005 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 interface for client to load PhoneCmdHandler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "phonehandlercontrol.h" 
       
    21 #include "phonehandlerdebug.h" 
       
    22 #include "PhoneHandler.h" 
       
    23 
       
    24 // EXTERNAL DATA STRUCTURES
       
    25 
       
    26 // EXTERNAL FUNCTION PROTOTYPES  
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // LOCAL CONSTANTS AND MACROS
       
    33 
       
    34 // MODULE DATA STRUCTURES
       
    35 
       
    36 // LOCAL FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 
       
    40 // ============================= LOCAL FUNCTIONS ===============================
       
    41 
       
    42 
       
    43 // ============================ MEMBER FUNCTIONS ===============================
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CPhoneHandler::CPhoneHandler
       
    47 // C++ default constructor can NOT contain any code, that
       
    48 // might leave.
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 CPhoneHandler::CPhoneHandler()
       
    52     {
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CPhoneHandler::ConstructL
       
    57 // Symbian 2nd phase constructor can leave.
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CPhoneHandler::ConstructL( CRemConInterfaceSelector* aIfSelector )
       
    61     {
       
    62     COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandler::ConstructL() *aIfSelector=%d", aIfSelector );
       
    63         
       
    64     iControl = CPhoneHandlerControl::NewL( aIfSelector );
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CPhoneHandler::NewL
       
    69 // Two-phased constructor.
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 EXPORT_C CPhoneHandler* CPhoneHandler::NewL()
       
    73     {
       
    74     CPhoneHandler* self = new ( ELeave ) CPhoneHandler();
       
    75     
       
    76     CleanupStack::PushL( self );
       
    77     self->ConstructL( NULL );
       
    78     CleanupStack::Pop( self );
       
    79 
       
    80     return self;
       
    81     }
       
    82     
       
    83 // -----------------------------------------------------------------------------
       
    84 // CPhoneHandler::NewL
       
    85 // Two-phased constructor.
       
    86 // -----------------------------------------------------------------------------
       
    87 //    
       
    88 EXPORT_C CPhoneHandler* CPhoneHandler::NewL( 
       
    89                             CRemConInterfaceSelector& aIfSelector )
       
    90     {
       
    91     CPhoneHandler* self = new ( ELeave ) CPhoneHandler();
       
    92     
       
    93     CleanupStack::PushL( self );
       
    94     self->ConstructL( &aIfSelector );
       
    95     CleanupStack::Pop( self );
       
    96 
       
    97     return self;
       
    98     }
       
    99 
       
   100 // Destructor
       
   101 EXPORT_C CPhoneHandler::~CPhoneHandler()
       
   102     {
       
   103     delete iControl;
       
   104     }
       
   105 
       
   106 // ======================== OTHER EXPORTED FUNCTIONS ===========================
       
   107 
       
   108 // End of File