phoneengine/PhoneCntFinder/src/CPhoneCntPbkOwner.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     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:  Implementation of phonebook management in PhoneCntFinder.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include  "CPhoneCntPbkOwner.h"
       
    21 #include  "CPhCntContactManager.h"
       
    22 
       
    23 #include  <e32property.h>
       
    24 
       
    25 // MACROS
       
    26 #ifndef __WINS__
       
    27 #ifdef _DEBUG
       
    28 #define PHONECNTDEBUG_ON
       
    29 #endif // _DEBUG
       
    30 #endif // __WINS__
       
    31 
       
    32 #ifdef PHONECNTDEBUG_ON
       
    33 #include    <e32svr.h> // class RDebug
       
    34 #define PHONECNTDEBUGPRINT( x ) RDebug::Print( (x) );
       
    35 #else
       
    36 #define PHONECNTDEBUGPRINT( x )
       
    37 #endif // PHONECNTDEBUG_ON
       
    38 
       
    39 
       
    40 // ============================ MEMBER FUNCTIONS ===============================
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CPhoneCntPbkOwner::CPhoneCntPbkOwner
       
    44 // C++ constructor can NOT contain any code, that
       
    45 // might leave.
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CPhoneCntPbkOwner::CPhoneCntPbkOwner( ) 
       
    49     {
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CPhoneCntPbkOwner::ConstructL
       
    54 // Symbian 2nd phase constructor can leave.
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 void CPhoneCntPbkOwner::ConstructL()
       
    58     {
       
    59     iContactManager = CPhCntContactManager::NewL();
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CPhoneCntPbkOwner::NewL
       
    64 // Two-phased constructor.
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 CPhoneCntPbkOwner* CPhoneCntPbkOwner::NewL()
       
    68     {
       
    69     CPhoneCntPbkOwner* self = new (ELeave) CPhoneCntPbkOwner();
       
    70     
       
    71     CleanupStack::PushL( self );
       
    72     self->ConstructL();
       
    73     CleanupStack::Pop();
       
    74 
       
    75     return self;
       
    76     }
       
    77     
       
    78 // -----------------------------------------------------------------------------
       
    79 // CPhoneCntPbkOwner::~CPhoneCntPbkOwner
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 CPhoneCntPbkOwner::~CPhoneCntPbkOwner()
       
    83     {
       
    84     delete iContactManager;
       
    85     }
       
    86 
       
    87 // -----------------------------------------------------------------------------
       
    88 // CPhoneCntPbkOwner::ContactManager
       
    89 // -----------------------------------------------------------------------------
       
    90 CPhCntContactManager* CPhoneCntPbkOwner::ContactManager() const
       
    91     {
       
    92     return iContactManager;
       
    93     }
       
    94 
       
    95 //  End of File