javaextensions/pim/agnadapter/inc.s60/cpimannivadaptermanager.h
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 anniversary lists and creates
       
    15  *                anniversary list adapters.
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPIMANNIVADAPTERMANAGER_H
       
    21 #define CPIMANNIVADAPTERMANAGER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "cpimeventadaptermanager.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // Supported repeat fields
       
    29 const TPIMRepeatRuleFrequency KPIMSupportedRepeatRuleFrequenciesAnniv[] =
       
    30     { EPIMRepeatRuleYearly };
       
    31 
       
    32 const TInt KPIMSupportedRepeatRuleFrequenciesAnnivCount =
       
    33     sizeof(KPIMSupportedRepeatRuleFrequenciesAnniv)
       
    34     / sizeof(TPIMRepeatRuleFrequency);
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  * PIM Anniv Adapter Manager class
       
    40  */
       
    41 NONSHARABLE_CLASS(CPIMAnnivAdapterManager): public CPIMEventAdapterManager
       
    42 {
       
    43 public: // Constructors and destructor
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     static CPIMAnnivAdapterManager* NewL(const TDesC& aListName);
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     ~CPIMAnnivAdapterManager();
       
    54 
       
    55 public: // MPIMEventAdapterManager
       
    56 
       
    57     /**
       
    58      * Provides access to the \ref MPIMAdapterManager representation of
       
    59      * this object.
       
    60      *
       
    61      * @return The \ref MPIMAdapterManager representation of this object.
       
    62      */
       
    63     MPIMAdapterManager* GetAdapterManager();
       
    64 
       
    65     /**
       
    66      * Provides the supported repeat rule fields for a given frequency.
       
    67      *
       
    68      * @param aFrequency A frequency.
       
    69      *
       
    70      * @return Supported repeat rule fields for \a aFrequency. If no
       
    71      *         fields are supported for the frequency, an empty array
       
    72      *         is returned.
       
    73      *
       
    74      * @par Leaving:
       
    75      * @li \c KErrArgument - \a aFrequency is not a valid frequency.
       
    76      */
       
    77     const CArrayFix< TPIMField>& GetSupportedRepeatRuleFieldsL(
       
    78         const TPIMRepeatRuleFrequency& aFrequency);
       
    79 
       
    80     /**
       
    81      * Provides the supported interval values for given frequency.
       
    82      *
       
    83      * @param aFrequency A frequency.
       
    84      *
       
    85      * @return Supported interval values for given frequency. If the
       
    86      *         interval field is not supported for given frequency,
       
    87      *         an empty array is returned.
       
    88      *
       
    89      * @par Leaving:
       
    90      * @li \c KErrArgument - \a aFrequency is not a valid frequency.
       
    91      */
       
    92     const CArrayFix< TInt>& GetSupportedIntervalsL(
       
    93         const TPIMRepeatRuleFrequency& aFrequency);
       
    94 
       
    95 private:
       
    96 
       
    97     /**
       
    98      * C++ default constructor.
       
    99      */
       
   100     CPIMAnnivAdapterManager();
       
   101 
       
   102     /**
       
   103      * By default Symbian 2nd phase constructor is private.
       
   104      */
       
   105     void ConstructL(const TDesC& aListName);
       
   106 
       
   107 private: // Member data
       
   108 
       
   109     // All the following arrays are owned by CPIMAnnivAdapterManager class
       
   110     CArrayFixFlat< TPIMField>* iRepeatRuleFieldArrayAnniv;
       
   111     CArrayFixFlat< TPIMField>* iRepeatRuleFieldArrayAnnivEmpty;
       
   112     CArrayFixFlat< TInt>* iRepeatRuleIntervalArrayAnnivEmpty;
       
   113 };
       
   114 
       
   115 #endif // CPIMANNIVADAPTERMANAGER_H
       
   116 // End of File
       
   117