meetingrequest/mrservices/inc/cesmrconflictchecker.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  ESMR calendar entry conflict checker
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRCONFLICTCHECKER_H
       
    20 #define CESMRCONFLICTCHECKER_H		
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <calcommon.h>
       
    24 
       
    25 class CCalEntry;
       
    26 class MESMRCalDbMgr;
       
    27 
       
    28 /**
       
    29  *  CESMRConflictChecker is responsible for finding
       
    30  *  conflicting entries from symbian calendar database.
       
    31  *
       
    32  *  @lib esmrentry.lib
       
    33  */
       
    34 NONSHARABLE_CLASS(CESMRConflictChecker) :
       
    35         public CBase
       
    36     {
       
    37 public: // Construction and destruction
       
    38     /**
       
    39      * Two-phased constructor. Creates and initializes
       
    40      * CESMRConflictChecker object.
       
    41      * @param aDbMgr Reference to cal db manager.
       
    42      * @return Pointer to esmr policy checker object.
       
    43      */
       
    44     IMPORT_C static CESMRConflictChecker* NewL(
       
    45             MESMRCalDbMgr& aDbMgr );
       
    46 
       
    47     /**
       
    48      * C++ destructor.
       
    49      */
       
    50     IMPORT_C ~CESMRConflictChecker();
       
    51 
       
    52 public: // Interface
       
    53     /**
       
    54      * Finds conflicting entries. Conflicting entries are
       
    55      * stored to table given as parameter. Ownership of the
       
    56      * conflicting entries are transferred to caller.
       
    57      *
       
    58      * @param aEntry Reference to calendar entry
       
    59      * @param aConflicts Reference to calendar entry table
       
    60      */
       
    61     IMPORT_C void FindConflictsL(
       
    62             const CCalEntry& aEntry,
       
    63             RPointerArray<CCalEntry>& aConflicts );
       
    64 
       
    65     /**
       
    66      * Finds instances for this entry occuring between specified
       
    67      * time range, that are in conflict with given entry. 
       
    68      * Ownership of the conflicting entries are transferred to caller.
       
    69      * @param aStart Start time
       
    70      * @param aEnd End time
       
    71      * @param aEntry Reference to entry
       
    72      * @param aColId Collection id of the entry
       
    73      * @param aInstances On return contains the conflicting instances 
       
    74      * 
       
    75      */
       
    76     IMPORT_C void FindInstancesForEntryL(
       
    77             TTime aStart, 
       
    78             TTime aEnd,
       
    79             const CCalEntry& aEntry,
       
    80             TCalCollectionId aColId,
       
    81             RPointerArray<CCalEntry>& aInstances );
       
    82 
       
    83 private: // Implementation
       
    84     CESMRConflictChecker(
       
    85             MESMRCalDbMgr& aDbMgr );
       
    86 
       
    87 private: // Data
       
    88     /// Ref: Reference to cal db manager
       
    89     MESMRCalDbMgr& iDbMgr;
       
    90     };
       
    91 
       
    92 #endif // CESMRCONFLICTCHECKER_H
       
    93 
       
    94 // EOF