menucontentsrv/handlerinc/menutasklist.h
branchRCL_3
changeset 18 bd874ee5e5e2
equal deleted inserted replaced
9:d0529222e3f0 18:bd874ee5e5e2
       
     1 /*
       
     2 * Copyright (c) 2005 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 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef MENUTASKLIST_H
       
    21 #define MENUTASKLIST_H
       
    22 
       
    23 // INCLUDES
       
    24 
       
    25 #include <w32std.h>
       
    26 #include <apgtask.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  Class for finding out about running applications.
       
    32 *
       
    33 *  This is a modification of the original CAknTaskList class, which
       
    34 *  differs in that it does not discriminate applications based on their
       
    35 *  window group priority.
       
    36 *  @since Series 60 3.0
       
    37 */
       
    38 class CMenuTaskList : public CBase
       
    39     {
       
    40 public:
       
    41     /**
       
    42     * Factory function
       
    43     * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession()
       
    44     * @return a new fully constructed instance of CMenuTaskList
       
    45     */
       
    46     static CMenuTaskList* NewL(RWsSession& aWsSession);
       
    47     /**
       
    48     * Factory function
       
    49     * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession()
       
    50     * @return a new fully constructed instance of CMenuTaskList, which is on the cleanup stack
       
    51     */
       
    52     static CMenuTaskList* NewLC(RWsSession& aWsSession);
       
    53     /**
       
    54     * Destructor.
       
    55     */
       
    56     ~CMenuTaskList();
       
    57     
       
    58     /**
       
    59     * Refresh the window group array
       
    60     */
       
    61     void UpdateListL();
       
    62     /**
       
    63     * Accessor for the window group array
       
    64     * @return an array containing the window groups of running applications.
       
    65     */
       
    66     const RArray<RWsSession::TWindowGroupChainInfo>& WgArray() const;
       
    67 
       
    68     /**
       
    69     * Find an application with the requested UID 3, which is running as a root application
       
    70     * @param aAppUid the UID 3 of the target application.
       
    71     * @return a TApaTask which refers to the running instance of the application.
       
    72     * if the application is not running, the TApaTask's Exists() function will return EFalse.
       
    73     */  
       
    74     TApaTask FindRootApp(TUid aAppUid) const;
       
    75     /**
       
    76     * Query whether an application's window group is running as a root application.
       
    77     * @param aWgId the window group identifier of the target application.
       
    78     * @return ETrue if this window group is running as a root window group.
       
    79     */
       
    80     TBool IsRootWindowGroup(TInt aWgId) const; 
       
    81     
       
    82 private:
       
    83     CMenuTaskList(RWsSession& aWsSession);
       
    84     void ConstructL();
       
    85 
       
    86 private:
       
    87     RWsSession& iWs;
       
    88     RArray<RWsSession::TWindowGroupChainInfo> iWgs;
       
    89     };
       
    90 
       
    91 #endif