javaextensions/pim/agnadapter/src.s60/cpimapptadaptermanager.cpp
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     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 static information about appointment lists and creates
       
    15  *                appointment list adapters.
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "cpimapptadaptermanager.h"
       
    22 #include "cpimeventlistadapter.h"
       
    23 #include "cpimagnapptadapter.h"
       
    24 #include "logger.h"
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CPIMApptAdapterManager::CPIMApptAdapterManager
       
    28 // C++ default constructor can NOT contain any code, that
       
    29 // might leave.
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CPIMApptAdapterManager::CPIMApptAdapterManager()
       
    33 {
       
    34     JELOG2(EPim);
       
    35 }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CPIMApptAdapterManager::ConstructL
       
    39 // Symbian 2nd phase constructor can leave.
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 void CPIMApptAdapterManager::ConstructL(const TDesC& aListName)
       
    43 {
       
    44     JELOG2(EPim);
       
    45     CPIMEventAdapterManager::ConstructL(aListName);
       
    46 
       
    47     iSupportedFields
       
    48     = new(ELeave) CArrayFixFlat<TPIMField> (KPIMSupportedApptFieldsCount);
       
    49 
       
    50     iSupportedFields->AppendL(KPIMSupportedApptFields,
       
    51                               KPIMSupportedApptFieldsCount);
       
    52 }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CPIMApptAdapterManager::NewL
       
    56 // Two-phased constructor.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 CPIMApptAdapterManager* CPIMApptAdapterManager::NewL(const TDesC& aListName)
       
    60 {
       
    61     JELOG2(EPim);
       
    62     CPIMApptAdapterManager* self = new(ELeave) CPIMApptAdapterManager();
       
    63 
       
    64     CleanupStack::PushL(self);
       
    65     self->ConstructL(aListName);
       
    66     CleanupStack::Pop(self);
       
    67 
       
    68     return self;
       
    69 }
       
    70 
       
    71 // Destructor
       
    72 CPIMApptAdapterManager::~CPIMApptAdapterManager()
       
    73 {
       
    74     JELOG2(EPim);
       
    75     delete iSupportedFields;
       
    76 }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // CPIMApptAdapterManager::GetAdapterManager
       
    80 // Returns: A MPIMAdapterManager representation of this object.
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 MPIMAdapterManager* CPIMApptAdapterManager::GetAdapterManager()
       
    84 {
       
    85     JELOG2(EPim);
       
    86     return this;
       
    87 }
       
    88 
       
    89 //  End of File