meetingrequest/mrgui/mrfieldbuilderpluginextension/inc/cesmrclsitem.h
branchRCL_3
changeset 64 3533d4323edc
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 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:  CLS list item class definition
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRCLSITEM_H
       
    20 #define CESMRCLSITEM_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <cntdef.h>
       
    25 
       
    26 #include <CPcsDefs.h> // TPsMatchLocation
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MVPbkContactLink;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * list item wrapper for attendee field and its popuplistboxes
       
    34  */
       
    35 NONSHARABLE_CLASS( CESMRClsItem ) : public CBase
       
    36     {
       
    37 public:
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      * Creates a new instance of class
       
    41      * @returns CESMRClsItem instance
       
    42      */
       
    43     static CESMRClsItem* NewL();
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      * Creates a new instance of class
       
    48      * and leaves it on the cleanupstack
       
    49      * @returns CESMRClsItem instance
       
    50      */
       
    51     static CESMRClsItem* NewLC();
       
    52 
       
    53     /**
       
    54      * C++ Destructor.
       
    55      */
       
    56     virtual ~CESMRClsItem();
       
    57 
       
    58 public: // new methods
       
    59     /**
       
    60      * Clones a cls item
       
    61      * @return pointer to new cls item
       
    62      */
       
    63     CESMRClsItem* CloneLC() const;
       
    64 
       
    65     /**
       
    66      * Finds actual match place from the cls item and sets the highlight information to cls item.
       
    67      * @param aHighlights Match list for the item text
       
    68      */
       
    69     void SetHighlightsL( const RArray<TPsMatchLocation>& aHighlights );
       
    70     
       
    71     /**
       
    72      * Sets aDisplayName as new name 
       
    73      * @param aDisplayName New name to be set 
       
    74      */
       
    75     void SetDisplayNameL( const TDesC& aDisplayName );
       
    76     
       
    77     /**
       
    78      * Sets aEmailAddress as new email address 
       
    79      * @param aEmailAddress New email to be set 
       
    80      */
       
    81     void SetEmailAddressL( const TDesC& aEmailAddress );
       
    82     
       
    83     /**
       
    84      * Sets item to be mrui item or not.
       
    85      * @param aIsMruItem ETrue maeining items is mrui item  
       
    86      */
       
    87     void SetIsMruItem( TBool aIsMruItem );
       
    88     
       
    89     /**
       
    90      * Sets aLink as new ContactLink.
       
    91      * Copies information from aLink to member variable
       
    92      * @param aLink contact link to be set 
       
    93      */
       
    94     void SetContactLinkL( MVPbkContactLink& aLink );
       
    95     
       
    96     /**
       
    97      * Sets multiple emails flag true
       
    98      */
       
    99     void SetMultipleEmails( );
       
   100 
       
   101     /**
       
   102      * Returns  highlight locations 
       
   103      */
       
   104     const RArray<TPsMatchLocation>& Highlights() const;
       
   105 
       
   106     /**
       
   107      * Returns  display name 
       
   108      */
       
   109     const TDesC& DisplayName() const;
       
   110     
       
   111     /**
       
   112      * Returns  email address 
       
   113      */
       
   114     const TDesC& EmailAddress() const;
       
   115     
       
   116     /**
       
   117      * Returns  display name and email address
       
   118      */
       
   119     const TDesC& FullTextL();
       
   120     
       
   121     /**
       
   122      * Tells wether this is a mrui item 
       
   123      */
       
   124     TBool IsMruItem() const;
       
   125     
       
   126     /**
       
   127      * Tells wether this item has multiple emails 
       
   128      */
       
   129     TBool MultipleEmails() const;
       
   130 
       
   131     /**
       
   132      * Returns  contact link
       
   133      */
       
   134     MVPbkContactLink* ContactLink() const;
       
   135 
       
   136 protected:
       
   137     /**
       
   138      * C++ default constructor.
       
   139      */
       
   140     CESMRClsItem();
       
   141 
       
   142 private:
       
   143     /**
       
   144      * ConstructL
       
   145      */
       
   146     void ConstructL();
       
   147 
       
   148 private: // data
       
   149     // Highlight positions
       
   150     RArray<TPsMatchLocation> iHighlights;
       
   151     // Display name. Own
       
   152     HBufC*  iDisplayName;
       
   153     // Email address. Own
       
   154     HBufC*  iEMailAddress;
       
   155     // Name/address text. Own
       
   156     HBufC*  iFullText;
       
   157     // Contact item id in which this item refers to. MRU list items
       
   158     // do not have this set.
       
   159     MVPbkContactLink* iLink;
       
   160    
       
   161     TBool iIsMruItem;
       
   162     TBool iMultipleEmails;
       
   163     };
       
   164 
       
   165 #endif  // CESMRCLSITEM_H
       
   166 
       
   167 // End of File