contentstorage/cahandler/app/inc/caapphandler.h
changeset 61 8e5041d13c84
child 66 32469d7d46ff
equal deleted inserted replaced
60:f62f87b200ec 61:8e5041d13c84
       
     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:  ?Description
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef C_CAAPPHANDLER_H
       
    19 #define C_CAAPPHANDLER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 // forward declarations
       
    24 class CEikonEnv;
       
    25 class CCaInnerEntry;
       
    26 class CCaUninstallOperation;
       
    27 
       
    28 /**
       
    29  *  Command handler for application entries.
       
    30  *
       
    31  *  @lib caclient.lib
       
    32  */
       
    33 NONSHARABLE_CLASS( CCaAppHandler )
       
    34     {
       
    35 
       
    36 public:
       
    37     /**
       
    38     * Allocates memory for and initializes CCaAppHandler object
       
    39     */
       
    40     static CCaAppHandler* NewL();
       
    41 
       
    42     /**
       
    43      * Destructor.
       
    44      */
       
    45     virtual ~CCaAppHandler();
       
    46 
       
    47 protected:
       
    48 
       
    49     CCaAppHandler();
       
    50 
       
    51     void ConstructL();
       
    52 
       
    53 public:
       
    54 
       
    55     /**
       
    56      * Handle command.
       
    57      * @param aItem Item of supported type.
       
    58      * @param aCommand Command.
       
    59      * @param aParams. Command parameters.
       
    60      * @param aStatus Observer request status. When the operation completes,
       
    61      * this status will be completed with the resulting error code.
       
    62      * @return Asynchronous operation. Owned by the caller.
       
    63      */
       
    64     void HandleCommandL( CCaInnerEntry& aEntry, const TDesC8& aCommand );
       
    65 
       
    66 private:
       
    67     /**
       
    68      * Launches application
       
    69      * @param aUid UID of the application to launch
       
    70      * @param aParam command parameters
       
    71      * @param aViewId id of the view the application is to start in
       
    72      */
       
    73     void LaunchApplicationL( const TUid aUid, const TDesC8 &aParam,
       
    74             TInt aViewId );
       
    75     
       
    76     /**
       
    77      * Closes application
       
    78      * @param aEntry the entry represeting application to close
       
    79      */
       
    80     void CloseApplicationL( CCaInnerEntry& aEntry );
       
    81 
       
    82 private:
       
    83     // data
       
    84 
       
    85     CEikonEnv* iEikEnv;
       
    86     CCaUninstallOperation* iUninstallOperation;
       
    87     };
       
    88 
       
    89 #endif // C_CAAPPHANDLER_H