javaextensions/pim/agnadapter/inc.s60/cpimeventadapteraccess.h
changeset 21 2a9601315dfc
child 23 98ccebc37403
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     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 access to Agenda Model event adapters
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPIMEVENTADAPTERACCESS_H
       
    20 #define CPIMEVENTADAPTERACCESS_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "mpimadapteraccess.h"
       
    24 #include "functionserver.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 /**
       
    29  * Points to the Calendar in the Agendar Server data cage on C: drive
       
    30  * (Platform Security).
       
    31  */
       
    32 _LIT(KPIMAgendaFileName, "c:Calendar");
       
    33 
       
    34 const TInt KPIMNumberOfEventLists = 3; // 3 lists are: Appt, Anniv and Event
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MPIMLocalizationManager;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 /**
       
    41  * Provides the elementary access the PIM Contact list provided by this
       
    42  * Contacts Model adapter module
       
    43  * Access to the adapter is through the static NewL( ) method.
       
    44  */
       
    45 NONSHARABLE_CLASS(CPIMEventAdapterAccess): public CBase,
       
    46         public MPIMAdapterAccess
       
    47 {
       
    48 public: // Constructors and a destructor
       
    49 
       
    50     /**
       
    51      * Two-phased constructor.
       
    52      *
       
    53      * @param aLocalizationManager Localization Manager.
       
    54      */
       
    55     static CPIMEventAdapterAccess* NewL(
       
    56         MPIMLocalizationManager* aLocalizationManager,
       
    57         java::util::FunctionServer* aFuncServer);  // not owned
       
    58 
       
    59     /**
       
    60      * destructor
       
    61      */
       
    62     ~CPIMEventAdapterAccess();
       
    63 
       
    64 public: // MPIMAdapterAccess
       
    65 
       
    66     const CDesCArray& ListNamesL(
       
    67         const TPIMListType aListType);
       
    68 
       
    69     TBool OpenContactListL(
       
    70         const TDesC* aListName,
       
    71         MPIMContactAdapterManager** aRetAdapterManager,
       
    72         MPIMContactListAdapter** aRetListAdapter,
       
    73         MPIMLocalizationData** aRetLocalizationData);
       
    74 
       
    75     TBool OpenEventListL(
       
    76         const TDesC* aListName,
       
    77         MPIMEventAdapterManager** aRetAdapterManager,
       
    78         MPIMEventListAdapter** aRetListAdapter,
       
    79         MPIMLocalizationData** aRetLocalizationData);
       
    80 
       
    81     TBool OpenToDoListL(
       
    82         const TDesC* aListName,
       
    83         MPIMToDoAdapterManager** aRetAdapterManager,
       
    84         MPIMToDoListAdapter** aRetListAdapter,
       
    85         MPIMLocalizationData** aRetLocalizationData);
       
    86 
       
    87 protected: // Constructors
       
    88 
       
    89     /**
       
    90      * C++ default constructor.
       
    91      */
       
    92     CPIMEventAdapterAccess(
       
    93         MPIMLocalizationManager* aLocalizationManager,
       
    94         java::util::FunctionServer* aFuncServer);
       
    95 
       
    96     /**
       
    97      * 2nd phase constructor.
       
    98      */
       
    99     void ConstructL();
       
   100 
       
   101 protected: // Data
       
   102 
       
   103     /** Owned. */
       
   104     CDesCArray* iEventListNames;
       
   105 
       
   106     /**
       
   107      * An empty array of list names (Contact and ToDo List names).
       
   108      * Owned.
       
   109      */
       
   110     CDesCArray* iNoListNames;
       
   111 
       
   112     /** Appointment Event localization data, owned. */
       
   113     MPIMLocalizationData* iApptLocalizationData;
       
   114 
       
   115     /** Memo Event localization data, owned. */
       
   116     MPIMLocalizationData* iMemoLocalizationData;
       
   117 
       
   118     /** Anniversary Event localization data, owned. */
       
   119     MPIMLocalizationData* iAnnivLocalizationData;
       
   120 
       
   121     /** Not owned. */
       
   122     MPIMLocalizationManager* iLocalizationManager;
       
   123 
       
   124     java::util::FunctionServer* iFuncServer;
       
   125 
       
   126 };
       
   127 
       
   128 #endif // CPIMEVENTADAPTERACCESS_H
       
   129 // End of File