meetingrequest/mrgui/inc/cesmrcontactmenuurlhandler.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     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 class CESMRContactMenuUrlHandler.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRCONTACTMENUURLHANDLER_H
       
    20 #define CESMRCONTACTMENUURLHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CEikMenuPane;
       
    25 class CFscContactActionMenu;
       
    26 class CGulIcon;
       
    27 class CAiwServiceHandler;
       
    28 class CEikonEnv;
       
    29 
       
    30 NONSHARABLE_CLASS( CESMRContactMenuUrlHandler ) : public CBase
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Two-phase constructor.
       
    35      *
       
    36      * @param aContactActionMenu contact action menu
       
    37      * @return new instance of the class
       
    38      */
       
    39     static CESMRContactMenuUrlHandler* NewL(
       
    40             CFscContactActionMenu& aContactActionMenu );
       
    41 
       
    42     /**
       
    43      * Destructor.
       
    44      */
       
    45     ~CESMRContactMenuUrlHandler( );
       
    46 
       
    47     /**
       
    48      * Resets/disables url contact menu handler.
       
    49      */
       
    50     void Reset( );
       
    51 
       
    52     /**
       
    53      * Enables contact action menu and options menu for given link.
       
    54      *
       
    55      * @param aUrl selected url
       
    56      */
       
    57     void SetUrlL( const TDesC& aUrl );
       
    58 
       
    59     /**
       
    60      * Returns true if options menu / actions is available.
       
    61      * @return TBool
       
    62      */
       
    63     TBool OptionsMenuAvailable( );
       
    64 
       
    65     /**
       
    66      * Initializes options menu / actions submenu.
       
    67      *
       
    68      * @param aActionMenuPane actions submenu
       
    69      */
       
    70     void InitOptionsMenuL( CEikMenuPane* aActionMenuPane );
       
    71 
       
    72     /**
       
    73      * Executes actions submenu selection.
       
    74      *
       
    75      * @param aCommand selected command id
       
    76      */
       
    77     void ExecuteOptionsMenuL( TInt aCommand );
       
    78 
       
    79     /**
       
    80      * Executes contact action menu.
       
    81      */
       
    82     void ShowActionMenuL( );
       
    83 
       
    84 private:
       
    85     /**
       
    86      * Private constructor.
       
    87      *
       
    88      * @param aContactActionMenu contact action menu
       
    89      */
       
    90     CESMRContactMenuUrlHandler( CFscContactActionMenu& aContactActionMenu );
       
    91 
       
    92     /**
       
    93      * Opens selected richtext link in browser.
       
    94      */
       
    95     void OpenUrlInBrowserL( );
       
    96 
       
    97     /**
       
    98      * Opens selected richtext link in intranet browser.
       
    99      */
       
   100     void OpenUrlInIntranetL( );
       
   101 
       
   102     /**
       
   103      * Bookmarks selected richtext link.
       
   104      */
       
   105     void BookmarkUrlL( );
       
   106 
       
   107     /**
       
   108      * Creates a single actionmenu item with selectable command
       
   109      * @param aResourceId
       
   110      * @param aCommandUid
       
   111      */
       
   112     void CreateMenuItemL( TInt aResourceId, TUid aCommandUid );
       
   113 
       
   114     /**
       
   115      * create icons to actionmenu
       
   116      */
       
   117     CGulIcon* CreateIconL(TUid aCommandUid);
       
   118 
       
   119     /**
       
   120      * Is service vailable
       
   121      * @param aResourceId resource id
       
   122      * @return TBool
       
   123      */
       
   124     TBool IsServiceAvailableL(TInt aResourceId);
       
   125     
       
   126     /**
       
   127      * Service handler
       
   128      * @return Reference to CAiwServiceHandler 
       
   129      */
       
   130     CAiwServiceHandler& ServiceHandlerL();
       
   131 private: //data
       
   132 
       
   133     ///Ref: Contact action menu
       
   134     CFscContactActionMenu& iContactActionMenu;
       
   135 
       
   136     /// Own: Current Url.
       
   137     HBufC* iUrl;
       
   138 
       
   139     /// Own: array of actionmenu icons
       
   140     RPointerArray<CGulIcon> iIconArray;
       
   141 
       
   142     /// Own: instance of aiw servicehandler
       
   143     CAiwServiceHandler* iServiceHandler;
       
   144     };
       
   145 
       
   146 #endif