taskswitcher/contextengine/hgfswserver/client/inc/hgfswclientimpl.h
changeset 4 4d54b72983ae
parent 3 fb3763350a08
child 5 c743ef5928ba
equal deleted inserted replaced
3:fb3763350a08 4:4d54b72983ae
     1 /*
       
     2  * ===========================================================================
       
     3  *  Name        : hgfswclientimpl.h
       
     4  *  Part of     : Huriganes / Fast Swap Server
       
     5  *  Description : Client API, private implementation
       
     6  *  Version     : %version: 5 %
       
     7  *
       
     8  *  Copyright © 2008 Nokia Corporation.
       
     9  *  This material, including documentation and any related 
       
    10  *  computer programs, is protected by copyright controlled by 
       
    11  *  Nokia Corporation. All rights are reserved. Copying, 
       
    12  *  including reproducing, storing, adapting or translating, any 
       
    13  *  or all of this material requires the prior written consent of 
       
    14  *  Nokia Corporation. This material also contains confidential 
       
    15  *  information which may not be disclosed to others without the 
       
    16  *  prior written consent of Nokia Corporation.
       
    17  * ===========================================================================
       
    18  */
       
    19 
       
    20 #ifndef __HGFSWCLIENTIMPL_H
       
    21 #define __HGFSWCLIENTIMPL_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include "hgfswentry.h"
       
    25 
       
    26 class MHgFswObserver;
       
    27     
       
    28 NONSHARABLE_CLASS( CHgFswClientImpl ) : public CActive
       
    29     {
       
    30 public:
       
    31     static CHgFswClientImpl* NewL();
       
    32     static CHgFswClientImpl* NewLC();
       
    33     ~CHgFswClientImpl();
       
    34     
       
    35     void GetContentL( RHgFswArray& aDst );
       
    36     
       
    37     void Subscribe( MHgFswObserver& aObserver );
       
    38     void CancelSubscribe();
       
    39     
       
    40     void CloseApp( TInt aWgId );
       
    41     void SwitchToApp( TInt aWgId );
       
    42 
       
    43     TUid ForegroundAppUid( TInt aType );
       
    44 
       
    45 private:
       
    46     void RunL();
       
    47     void DoCancel();
       
    48 
       
    49 private:
       
    50     CHgFswClientImpl();
       
    51     void ConstructL();
       
    52 
       
    53     NONSHARABLE_CLASS( RHgFswClient ) : public RSessionBase
       
    54         {
       
    55     public:
       
    56         TInt Connect();
       
    57         void Subscribe( TRequestStatus& aStatus );
       
    58         void CancelSubscribe();
       
    59         void GetContentL( RHgFswArray& aDst );
       
    60         void CloseApp( TInt aWgId );
       
    61         void SwitchToApp( TInt aWgId );
       
    62         TUid ForegroundAppUid( TInt aType );
       
    63         };
       
    64     RHgFswClient iClient;
       
    65     
       
    66     MHgFswObserver* iObserver; // not own
       
    67     };
       
    68 
       
    69 #endif