phonebookui/Phonebook/App/inc/CPbkGoToURLCmd.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *      Go to URL command object.Opens browser to the URL address
       
    16 *		saved in contact details.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __CPbkGoToURLCmd_H__
       
    22 #define __CPbkGoToURLCmd_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <apparc.h>
       
    27 #include <MPbkCommand.h>
       
    28 #include <aknserverapp.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CPbkContactItem;
       
    32 class TPbkContactItemField;
       
    33 class CSchemeHandler;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Call command object.
       
    39  */
       
    40 class CPbkGoToURLCmd :
       
    41         public CBase,
       
    42 		public MPbkCommand,
       
    43 		public MAknServerAppExitObserver
       
    44     {
       
    45     public: // Interface
       
    46 		/**
       
    47          * Static constructor.
       
    48          * @param aContact      contact to operate with
       
    49          * @param aFocusedField currently focused field. May be NULL if caller
       
    50          *                      doesn't have field-level focus
       
    51          * @return a new go to URL command object.
       
    52          */
       
    53 		static CPbkGoToURLCmd* NewL(const CPbkContactItem& aContact,
       
    54 			const TPbkContactItemField* aFocusedField);
       
    55 
       
    56         /**
       
    57          * Destructor.
       
    58          */
       
    59         ~CPbkGoToURLCmd();
       
    60 
       
    61     public:  // from MPbkCommand
       
    62         void ExecuteLD();
       
    63 
       
    64     private: //MAknServerAppExitObserver    
       
    65         void HandleServerAppExit(TInt aReason);
       
    66 
       
    67     private:  // Implementation
       
    68         CPbkGoToURLCmd(const CPbkContactItem& aContact,
       
    69 			const TPbkContactItemField* aFocusedField);
       
    70         void DoGoToUrlL(const TDesC& aUrl);
       
    71 
       
    72     private:  // Data
       
    73 		/// Ref: the contact to send message to
       
    74 		const CPbkContactItem& iContact;
       
    75 		/// Ref: the currently focused field
       
    76 		const TPbkContactItemField* iFocusedField;
       
    77 		/// Own: scheme handler for do the browser launch
       
    78 		CSchemeHandler* iHandler;
       
    79         /// Ref: Referred boolean is set to ETrue when this object is destroyed.
       
    80         TBool* iDestroyedPtr;
       
    81    };
       
    82 
       
    83 #endif // __CPbkGoToURLCmd_H__
       
    84 
       
    85 // End of File