idlefw/plugins/shortcutplugin/inc/caiscuttargethttp.h
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Class for http shortcut target.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAISCUTTARGETHTTP_H
       
    20 #define CAISCUTTARGETHTTP_H
       
    21 
       
    22 #include "caiscuttarget.h"
       
    23 
       
    24 /**
       
    25  * Command line parameter for browser to open an url
       
    26  */
       
    27 _LIT( KOpenUrlParam, "4 " );
       
    28 
       
    29 /**
       
    30  *  Implements an http shortcut target
       
    31  *
       
    32  *  Handles parsing and launching an http shortcut target
       
    33  *
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 class CAiScutTargetHttp : public CAiScutTarget
       
    37 {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * First phase constructor
       
    43      *
       
    44      * @since S60 v3.2
       
    45      * @param aEngine Reference to the plug-in engine
       
    46      * @param aTarget The shortcut definition string
       
    47      */
       
    48     static CAiScutTargetHttp* NewL(
       
    49         CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser );
       
    50 
       
    51     virtual ~CAiScutTargetHttp();
       
    52 
       
    53     /**
       
    54      * Returns the shortcut definition string
       
    55      *
       
    56      * @since S60 v3.2
       
    57      * @return Shortcut definition string
       
    58      */
       
    59     TPtrC Definition() const;
       
    60 
       
    61     /**
       
    62      * See base class
       
    63      */
       
    64     TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
       
    65 
       
    66     /**
       
    67      * See base class
       
    68      */
       
    69     TInt GetIcon(CGulIcon*& aIcon) const;
       
    70 
       
    71     /**
       
    72      * See base class
       
    73      */
       
    74     TBool IsAccessibleL(TInt aCheckType);
       
    75 
       
    76     /**
       
    77      * Launches the shortcut
       
    78      *
       
    79      * @since S60 v3.2
       
    80      */
       
    81     void LaunchL();
       
    82 
       
    83     /**
       
    84      * Return application uid this target launches.
       
    85      *
       
    86      * @since S60 v3.2
       
    87      */
       
    88     TUid AppUid() const;
       
    89 
       
    90     /**
       
    91      * Return additional UID this target refers to. In 
       
    92      * URL case this is a unique identifer created from the URL
       
    93      * 
       
    94      * @since S60 v3.2
       
    95      */
       
    96     TUid AdditionalUid() const;
       
    97 protected:
       
    98 
       
    99 private:
       
   100 
       
   101     CAiScutTargetHttp( CAiScutEngine& aEngine, TShortcutType aType );
       
   102 
       
   103     void ConstructL( const TAiScutParser& aParser );
       
   104 
       
   105 private:  // data
       
   106 
       
   107     /**
       
   108      * Target caption, part of the http address or
       
   109      * custom title given with the URL string
       
   110      */
       
   111     mutable HBufC*       iCaption;
       
   112 
       
   113     /**
       
   114      * Holds the shortcut definition string
       
   115      * Owned.
       
   116      */
       
   117     HBufC*              iDefinition;
       
   118     
       
   119     /**
       
   120      * Checksum for the URL
       
   121      */
       
   122     TUid                iChecksum;
       
   123 
       
   124 };
       
   125 
       
   126 #endif // CAISCUTTARGETHTTP_H
       
   127 
       
   128 // End of File.