messagingappbase/ncnlist/inc/MNcnMsgWaitingManager.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 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:   Defines class MNcnMsgWaitingManager.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MNCNMSGWAITINGMANAGER_H
       
    21 #define MNCNMSGWAITINGMANAGER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  * Class is used to define message waiting manager API.
       
    32  * Message waiting manager in turn is responsible of
       
    33  * storing message counts for certain message types 
       
    34  * and handling indicator status flags. Message count
       
    35  * represents number of new messages. Indicator value
       
    36  * in turn tells if indicator icon should be displayed
       
    37  * or not. This M-class is pure virtual so client needs to 
       
    38  * implement following methods to use it:
       
    39  * SetIndicator, SetMessageCount, GetMessageCount
       
    40  * and GetIndicator.
       
    41  */
       
    42 class MNcnMsgWaitingManager
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47          * Destructor.
       
    48          */
       
    49         virtual ~MNcnMsgWaitingManager() { /* EMPTY */ };
       
    50                 
       
    51     public: //
       
    52 
       
    53 		/**
       
    54 		 * Defines indicators that can be enabled / disabled. 
       
    55 		 * Set/GetIndicator method uses this enum. 
       
    56 		 */
       
    57         enum TNcnIndicator
       
    58             {
       
    59             ENcnIndicatorFax,
       
    60             ENcnIndicatorEmail,
       
    61             ENcnIndicatorOther,
       
    62             ENcnIndicatorVMLine1,
       
    63             ENcnIndicatorVMLine2,
       
    64             
       
    65             ENcnIndicatorLast // This must be last            
       
    66             }; // TNcnIndicator
       
    67 
       
    68 		/**
       
    69 		 * Defines message types which message count can be 
       
    70 		 * stored. 
       
    71 		 * Set/GetMessageCount method uses this enum. 
       
    72 		 */
       
    73         enum TNcnMessageType
       
    74             {
       
    75             ENcnMessageTypeFax,
       
    76             ENcnMessageTypeEmail,
       
    77             ENcnMessageTypeOther,
       
    78             ENcnMessageTypeVMLine1,
       
    79             ENcnMessageTypeVMLine2,
       
    80             
       
    81             ENcnMessageTypeLast // This must be last            
       
    82             }; // TNcnMessageType
       
    83 
       
    84         /**
       
    85          * SetIndicator
       
    86          * Method is used to enable / disable indicator. 
       
    87          * @param aIndicator Id of the indicator that should be enabled / disabled. See TNcnIndicator for ids. 
       
    88          * @param aEnable ETrue if indicator should be enabled.
       
    89          * @return error
       
    90          */                      
       
    91         virtual TInt SetIndicator( const TNcnIndicator aIndicator, TBool aEnable ) = 0;
       
    92         
       
    93         /**
       
    94          * SetMessageCount
       
    95          * Method is used to store new message count for certain message types. 
       
    96          * @param aMsgType Message type which count is updated. See TNcnMessageType for ids. 
       
    97          * @param aCount Number of new messages.
       
    98          * @param aEnableIndicator ETrue if indicator should be enabled for certain message type. 
       
    99          * @return error
       
   100          */                        
       
   101         virtual TInt SetMessageCount( const TNcnMessageType aMsgType, TUint aCount, TBool aEnableIndicator ) = 0;
       
   102 
       
   103         /**
       
   104          * GetMessageCount
       
   105          * Method returns new message count for certain message type
       
   106          * @param aMsgType Message type. See MNcnMsgWaitingManager for ids. 
       
   107          * @param aCount Number of new messages.
       
   108          * @return error
       
   109          */                                
       
   110         virtual TInt GetMessageCount( const TNcnMessageType aMsgType, TUint& aCount) = 0;                
       
   111                 
       
   112         /**
       
   113          * GetIndicator
       
   114          * Method returns indicator status (enabled/disabled).  
       
   115          * @param aIndicator Indicator id. See MNcnMsgWaitingManager for ids. 
       
   116          * @param aEnabled ETrue if indicator is enabled. 
       
   117          * @return error
       
   118          */                                                
       
   119         virtual TInt GetIndicator( const TNcnIndicator aIndicator, TBool& aEnabled ) = 0;      
       
   120 
       
   121         virtual TBool ConstructionReady() = 0;
       
   122         
       
   123         virtual void GetFirstIndicatorStatus() = 0;
       
   124                         
       
   125     protected:
       
   126         
       
   127         MNcnMsgWaitingManager() { /* EMPTY */ };
       
   128                         
       
   129                 
       
   130     }; // MNcnMsgWaitingManager
       
   131 
       
   132 #endif    // MNCNMSGWAITINGMANAGER_H
       
   133 
       
   134 // End of File