phonebookui/Phonebook2/remotecontactlookup/contactactionservice/inc/cfsccontactaction.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Definition of the class CFscContactAction.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_FSCCONTACTACTION_H
       
    20 #define C_FSCCONTACTACTION_H
       
    21 
       
    22 #include "mfsccontactaction.h"
       
    23 #include "mfscreasoncallback.h"
       
    24 
       
    25 /**
       
    26  *  ContactAction implementation.
       
    27  *
       
    28  *  @lib 
       
    29  *  @since S60 3.1
       
    30  */
       
    31 class CFscContactAction : public CBase, public MFscContactAction
       
    32     {
       
    33     
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      *
       
    39      * @param aReasonCallback is reference to Reason callback interface
       
    40      * @param aContactActionUid is Uid of action
       
    41      * @param aActionType specifies action type
       
    42      * @param aActionMenuTextResourceId action menu text
       
    43      * @param aIcon specifies icon for the action
       
    44      */
       
    45     static CFscContactAction* NewL(
       
    46         MFscReasonCallback& aReasonCallback,
       
    47         TUid aContactActionUid,
       
    48         TUint64 aActionType,
       
    49         TInt aActionMenuTextResourceId,
       
    50         CGulIcon* aIcon );
       
    51                                         
       
    52    
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     virtual ~CFscContactAction();
       
    57     
       
    58 public: // From MFscContactAction
       
    59 
       
    60     /**
       
    61      * @see MFscContactAction::Uid
       
    62      */
       
    63     virtual TUid Uid() const;
       
    64     
       
    65     /**
       
    66      * @see MFscContactAction::Type
       
    67      */
       
    68     virtual TUint64 Type() const;
       
    69 
       
    70     /**
       
    71      * @see MFscContactAction::Icon
       
    72      */
       
    73     virtual const CGulIcon* Icon() const;
       
    74 
       
    75     /**
       
    76      * @see MFscContactAction::ActionMenuText
       
    77      */
       
    78     virtual const TDesC& ActionMenuText() const;
       
    79 
       
    80     /**
       
    81      * @see MFscContactAction::ReasonL
       
    82      */
       
    83     virtual void ReasonL( TInt aReasonId, HBufC*& aReason ) const;
       
    84 
       
    85 public: // methods
       
    86 
       
    87     /**
       
    88      * Sets action icon
       
    89      */
       
    90     virtual void SetIcon( CGulIcon* aIcon );
       
    91     
       
    92 private:
       
    93 
       
    94     /**
       
    95      * Constructor
       
    96      *
       
    97      * @param aReasonCallback is reference to Reason callback interface
       
    98      * @param aContactActionUid is Uid of action
       
    99      * @param aActionType specifies action type
       
   100      * @param aIcon specifies icon for the action   
       
   101      */
       
   102     CFscContactAction(
       
   103         MFscReasonCallback& aReasonCallback,
       
   104         TUid aContactActionUid,
       
   105         TUint64 aActionType,
       
   106         CGulIcon* aIcon );
       
   107 
       
   108     /**
       
   109      * Second phase constructor
       
   110      *
       
   111      * @param aActionMenuTextResourceId action menu text
       
   112      */
       
   113     void ConstructL( TInt aActionMenuTextResourceId );
       
   114 
       
   115 private: // data
       
   116 
       
   117     /**
       
   118      * Uid of action
       
   119      */    
       
   120     TUid iContactActionUid;
       
   121 
       
   122     /**
       
   123      * Type of action
       
   124      */    
       
   125     TUint64 iActionType;
       
   126 
       
   127     /**
       
   128      * Own: Icon for action
       
   129      */    
       
   130     CGulIcon* iIcon;
       
   131 
       
   132     /**
       
   133      * Own: Action menu text of ation
       
   134      */    
       
   135     TDesC* iActionMenuText;
       
   136 
       
   137     /**
       
   138      * Reference to Reason callback interface
       
   139      */    
       
   140     MFscReasonCallback& iReasonCallback;
       
   141 
       
   142     };
       
   143 
       
   144 #endif // C_FSCCONTACTACTION_H