messagingappbase/ncnlist/notifinc/RNcnNotification.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *       Implementation of NcnNotification ECom API.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __RNCNNOTIFICATION_H__
       
    22 #define __RNCNNOTIFICATION_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <MNcnInternalNotification.h>
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  * This class implements MNcnInternalNotification API as well as
       
    32  * MNcnNotification API which is on the top of inheritance hierarchy.
       
    33  * This is a RSessionBase class but this is not revealed to the users
       
    34  * of the ECom component.
       
    35  */
       
    36 class RNcnNotification
       
    37 : public RSessionBase,
       
    38   public MNcnInternalNotification
       
    39     {
       
    40     public: // Constructor and destructor
       
    41     
       
    42        /**
       
    43         * Two-phased constructor. Not normally used for R-classes but
       
    44         * since this is an ECom component heap construction is feasible.
       
    45         * @return newly instantiated object
       
    46         */
       
    47         static RNcnNotification* NewL();
       
    48         
       
    49        /**
       
    50         * C++ constructor.
       
    51         */
       
    52         RNcnNotification();
       
    53 
       
    54        /**
       
    55         * Destructor.
       
    56         * Session is closed in destructor since this class is used
       
    57         * via M-class interface.
       
    58         */
       
    59         ~RNcnNotification();
       
    60         
       
    61     public: // New functions
       
    62         
       
    63        /**
       
    64         * Initializes C/S session.
       
    65         */
       
    66         void InitializeSessionL();
       
    67 
       
    68     public: // From MNcnNotification
       
    69         
       
    70         TInt NewMessages( const TMsvId& aMailBox,
       
    71                             MNcnNotification::TIndicationType aIndicationType,
       
    72                             const MDesCArray& aInfo );
       
    73 
       
    74         TInt MarkUnread( const TMsvId& aMailBox );
       
    75         
       
    76         
       
    77         
       
    78     public: // From MNcnInternalNotification
       
    79 
       
    80         TInt NewMessages( const TNcnNotifMessageType aType );
       
    81 
       
    82         TInt NewMessages( const TNcnNotifMessageType aType,
       
    83                           const TMsvId& aMailBox,
       
    84                           const MDesCArray& aInfo );
       
    85 
       
    86         TInt MarkUnread( const TNcnUnreadRequestType aRequest );
       
    87 
       
    88         TInt MarkUnread( const TNcnUnreadRequestType aRequest,
       
    89                          const TMsvId& aMailbox );        
       
    90                          
       
    91         void MarkUnread( const TNcnUnreadRequestType aRequest,
       
    92                          TRequestStatus& aRequestStatus );
       
    93 
       
    94         void MarkUnread( const TNcnUnreadRequestType aRequest,
       
    95                          const TMsvId& aMailbox,
       
    96                          TRequestStatus& aRequestStatus );
       
    97                          
       
    98         void CancelMarkUnread();
       
    99     };
       
   100 
       
   101 #endif // __RNCNNOTIFICATION_H__
       
   102 
       
   103 // End of File