logsui/EngineInc/CLogsCntLinkChecker.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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 *     Check if a Contact Link is valid
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __Logs_Engine_CLogsCntLinkChecker_H__
       
    20 #define __Logs_Engine_CLogsCntLinkChecker_H__
       
    21 
       
    22 //  INCLUDES
       
    23 #include "CLogsBaseUpdater.h"
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 // MACROS
       
    28 
       
    29 // DATA TYPES
       
    30 
       
    31 // FUNCTION PROTOTYPES
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 
       
    38 class CLogsCntLinkChecker : public CLogsBaseUpdater
       
    39     {
       
    40     
       
    41     public:     // Constructors.
       
    42 
       
    43         /**
       
    44          * Standard creation function.
       
    45          *
       
    46          * @param aFsSession        reference to file server session
       
    47          * @param aObserver         pointer to observer
       
    48          *
       
    49          * @return Pointer to the new instance of this class.
       
    50          */     
       
    51         static CLogsCntLinkChecker* NewL( RFs& aFsSession, 
       
    52                                           MLogsObserver* aObserver );
       
    53     private:
       
    54 
       
    55         /**
       
    56          * Default constructor
       
    57          */
       
    58         CLogsCntLinkChecker();
       
    59                                                                        
       
    60 
       
    61         /**
       
    62          * Constructor, second phase. 
       
    63          */
       
    64         void ConstructL( );
       
    65 
       
    66         /**
       
    67          * Constructor
       
    68          *
       
    69          * @param aFsSession        reference to file server session
       
    70          * @param aObserver         pointer to observer
       
    71          */
       
    72         CLogsCntLinkChecker( RFs& aFsSession, 
       
    73                            MLogsObserver* aObserver );
       
    74     
       
    75     public:     
       
    76         /**
       
    77          * Destructor.
       
    78          */
       
    79         virtual ~CLogsCntLinkChecker();
       
    80             
       
    81     protected:     
       
    82 
       
    83         void RunL();
       
    84 
       
    85     private: 
       
    86 
       
    87         void StartRunningL();   //Called from base class when processing can start
       
    88         void ContinueRunningL( TInt aFieldId );//Called from base class when processing can continue
       
    89         void CntLinkDeletedL( );//Called from base class when processing can continue
       
    90     protected:
       
    91 
       
    92         //virtual function from base class     
       
    93         void ProcessVPbkSingleContactOperationCompleteImplL(
       
    94              MVPbkContactOperationBase& aOperation,
       
    95              MVPbkStoreContact* aContact);
       
    96 			 
       
    97     public: // from MLogsReader
       
    98 
       
    99         void ConfigureL( const MLogsReaderConfig* aConfig ); 
       
   100 		
       
   101         IMPORT_C TBool IsSameContactLink( const TDesC8& aContactLink ) const;
       
   102         IMPORT_C TBool IsCntLinkValidSync ( const TDesC8& aContactLink );
       
   103      
       
   104         void Stop();
       
   105    
       
   106         void HandleStoreEventL(
       
   107                         MVPbkContactStore& aContactStore, 
       
   108                         TVPbkContactStoreEvent aStoreEvent); 
       
   109     private: // data
       
   110         
       
   111         /// Own: contact link
       
   112         HBufC8* iContactLink; 
       
   113         
       
   114         TBool iContactLinkValid;
       
   115         
       
   116         CActiveSchedulerWait *iWait;
       
   117         
       
   118     };
       
   119 
       
   120 #endif // __Logs_Engine_CLogsCntLinkChecker_H__
       
   121 
       
   122 // End of File