meetingui/meetingrequestutils/inc/CMRUtilsImpl.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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 CMRUtils ECom API.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CMRUTILSIMPL_H__
       
    22 #define __CMRUTILSIMPL_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include "CMRUtilsInternal.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MMRUtilsCalDbMgr;
       
    29 class CMRUtilsUidGenerator;
       
    30 class MMRUtilsUiServices;
       
    31 class CMRMailboxUtils;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * ECom implementation for meeting request utilities.
       
    37 */
       
    38 class CMRUtilsImpl :
       
    39 public CMRUtilsInternal, 
       
    40 public MMRUtilsObserver
       
    41     {
       
    42     public: // Constructors and destructors
       
    43 
       
    44         /**
       
    45         * ECom plug-in instantiation method.
       
    46         * @return instantiated ECom plug-in
       
    47         */
       
    48         static CMRUtilsImpl* NewL();        
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CMRUtilsImpl();
       
    54 
       
    55     protected: // From CMRUtils
       
    56     	
       
    57         TInt DeleteWithUiL( const CCalEntry& aEntry, TMsvId aMailbox );
       
    58                        
       
    59         TInt DeleteWithUiL( CCalInstance* aInstance, TMsvId aMailbox );
       
    60                             
       
    61         void SendWithUiL( const CCalEntry& aEntry, TMsvId aMailbox );
       
    62                             
       
    63         TAny* ExtensionL( TUid aExtensionUid );
       
    64         
       
    65         void SessionSetupL( CCalSession& aCalSession,
       
    66                             CMsvSession* aMsvSession );             
       
    67 
       
    68     protected: // From CMRUtilsInternal
       
    69 
       
    70         TMRUtilsDbResult StoreL( CCalEntry& aCalEntry,
       
    71                                  TBool aResurrect );
       
    72 	
       
    73         void DeleteL( const TDesC8& aUid );
       
    74         
       
    75         void DeleteL( const TCalLocalUid& aLocalUid );
       
    76 		
       
    77         void DeleteL( const CCalEntry& aCalEntry );
       
    78 		
       
    79         void DeleteL( const CalCommon::TCalTimeRange& aCalTimeRange );
       
    80 
       
    81         CCalEntryView* EntryView();
       
    82         
       
    83         CCalInstanceView* InstanceView();
       
    84 
       
    85         void FetchEntriesL( RPointerArray<CCalEntry>& aCalEntryArray,
       
    86                             const CalCommon::TCalTimeRange& aTimeRange );
       
    87           
       
    88         CCalEntry* FetchEntryL( const TDesC8& aUid,
       
    89                                 const TCalTime& aRecurrenceId );
       
    90         
       
    91         TInt UpdateEntryL( const CCalEntry& aCalEntry );
       
    92         
       
    93         void ResetTombsFileL();
       
    94         
       
    95         void DeleteTombstonesL( const CalCommon::TCalTimeRange& aCalTimeRange );
       
    96 
       
    97         TMRUtilsDbResult CheckEntryCondL( const CCalEntry& aCalEntry );
       
    98                             
       
    99         TInt RespondWithUiL( const RPointerArray<CCalEntry>& aEntries,
       
   100                              CCalAttendee::TCalStatus aStatus,
       
   101                              TMsvId aMailbox );
       
   102                             
       
   103         TInt CancelWithUiL( const RPointerArray<CCalEntry>& aEntries,
       
   104                             TMsvId aMailbox );
       
   105     
       
   106         void ReplyToL( TMailRecipients aRecipients,
       
   107                        const CCalEntry& aCalEntry,
       
   108                        const TDesC& aSenderAddr,
       
   109                        TMsvId aMailbox );
       
   110                        
       
   111 		HBufC* MailHeaderFromFieldLC( TMsvId aMessage );
       
   112 		
       
   113 		HBufC* MailHeaderSubjectFieldLC( TMsvId aMessage );       
       
   114         
       
   115     protected: // From MMRUtilsObserver
       
   116     
       
   117     	void HandleCalEngStatus( TMRUtilsCalEngStatus aStatus );
       
   118     	
       
   119     	void HandleOperation( TInt aType,
       
   120                               TInt aPercentageCompleted, 
       
   121                               TInt aStatus );
       
   122         
       
   123     protected: // New functions
       
   124 
       
   125         void LeaveIfEngNotAvailableL() const;
       
   126         
       
   127         void LeaveIfUiExtNotAvailableL() const;
       
   128         
       
   129     protected: // Constructors and destructors
       
   130     
       
   131         /**
       
   132         * C++ default constructor.
       
   133         */
       
   134         CMRUtilsImpl();
       
   135 
       
   136         /**
       
   137         *  Constructor, second phase.
       
   138         */
       
   139         void ConstructL();            
       
   140         
       
   141     protected: // data
       
   142             
       
   143         // Cal eng status
       
   144         MMRUtilsObserver::TMRUtilsCalEngStatus iCalEngStatus;
       
   145     
       
   146         // not own
       
   147         CCalSession* iCalSession;
       
   148         
       
   149         //not own
       
   150         CMsvSession* iMsvSession;                
       
   151         
       
   152         // Database manager, own
       
   153         MMRUtilsCalDbMgr* iCalDbMgr;
       
   154         
       
   155         // Ui extension, own
       
   156         MMRUtilsUiServices* iUiServices;
       
   157                         
       
   158         //Mailbox Utils, own
       
   159         CMRMailboxUtils* iMRMailboxUtils;
       
   160     };
       
   161 
       
   162 #endif // __CMRUTILSIMPL_H__
       
   163 
       
   164 // End of File