taskswitcher/server/src/tsresourcemanagerimp.cpp
changeset 127 7b66bc3c6dc9
parent 125 26079c1bb561
equal deleted inserted replaced
126:efda7c0771b9 127:7b66bc3c6dc9
    14  * Description :
    14  * Description :
    15  *
    15  *
    16  */
    16  */
    17 #include "tsresourcemanagerimp.h"
    17 #include "tsresourcemanagerimp.h"
    18 #include "tswindowgroupsmonitorimp.h"
    18 #include "tswindowgroupsmonitorimp.h"
       
    19 #include "tsiconproviderimp.h"
       
    20 #include "tsidlist.h"
       
    21 
       
    22 const TInt KSkippedApp [] = {0x00000000 /* <-- null/splashscreen*/,
       
    23                              0x20022F35 /* <-- hsapplication */,
       
    24                              0x100058F3 /* <-- sysapp*/};
    19 
    25 
    20 // -----------------------------------------------------------------------------
    26 // -----------------------------------------------------------------------------
    21 //
    27 //
    22 // -----------------------------------------------------------------------------
    28 // -----------------------------------------------------------------------------
    23 //
    29 //
    37 void CTsResourceManager::ConstructL()
    43 void CTsResourceManager::ConstructL()
    38 {
    44 {
    39     User::LeaveIfError(mWsSession.Connect());
    45     User::LeaveIfError(mWsSession.Connect());
    40     User::LeaveIfError(mApaSeesion.Connect());
    46     User::LeaveIfError(mApaSeesion.Connect());
    41     iMonitor = CTsWindowGroupsMonitor::NewL(*this);
    47     iMonitor = CTsWindowGroupsMonitor::NewL(*this);
       
    48     iIconProvider = CTsIconProvider::NewL(*this);
       
    49     
       
    50     const TInt count(sizeof( KSkippedApp ) / sizeof(TInt));
       
    51     iBlackList = CTsIdList::NewL();
       
    52     iBlackList->AppendL(KSkippedApp, count);
    42 }
    53 }
    43 
    54 
    44 // -----------------------------------------------------------------------------
    55 // -----------------------------------------------------------------------------
    45 //
    56 //
    46 // -----------------------------------------------------------------------------
    57 // -----------------------------------------------------------------------------
    47 //
    58 //
    48 CTsResourceManager::~CTsResourceManager()
    59 CTsResourceManager::~CTsResourceManager()
    49 {
    60 {
       
    61     delete iBlackList;
       
    62     delete iIconProvider;
    50     delete iMonitor;
    63     delete iMonitor;
    51     mApaSeesion.Close();
    64     mApaSeesion.Close();
    52     mWsSession.Close();
    65     mWsSession.Close();
    53 }
    66 }
    54 
    67 
    55 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    56 //
    69 //
    57 // -----------------------------------------------------------------------------
    70 // -----------------------------------------------------------------------------
    58 //
    71 //
    59 RWsSession& CTsResourceManager::WsSession()
    72 RWsSession& CTsResourceManager::WsSession()
    60 {
    73     {
    61     return mWsSession;
    74     return mWsSession;
    62 }
    75     }
    63 
    76 
    64 // -----------------------------------------------------------------------------
    77 // -----------------------------------------------------------------------------
    65 //
    78 //
    66 // -----------------------------------------------------------------------------
    79 // -----------------------------------------------------------------------------
    67 //
    80 //
    68 RApaLsSession& CTsResourceManager::ApaSession()
    81 RApaLsSession& CTsResourceManager::ApaSession()
    69 {
    82     {
    70     return mApaSeesion;
    83     return mApaSeesion;
    71 }
    84     }
    72 
    85 
    73 // -----------------------------------------------------------------------------
    86 // -----------------------------------------------------------------------------
    74 MTsWindowGroupsMonitor& CTsResourceManager::WsMonitor()
    87 MTsWindowGroupsMonitor& CTsResourceManager::WsMonitor()
    75     {
    88     {
    76     return *iMonitor;
    89     return *iMonitor;
    77     }
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 /**
       
    94  * @see MTsResourceManager::IconProvider
       
    95  */
       
    96 MTsIconProvider& CTsResourceManager::IconProvider()
       
    97     {
       
    98     return *iIconProvider;
       
    99     }
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 /**
       
   103  * @see MTsResourceManager::ApplicationsBlackList
       
   104  */
       
   105 const CTsIdList& CTsResourceManager::ApplicationsBlackList() const
       
   106     {
       
   107     return *iBlackList;
       
   108     }
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 TBool CTsResourceManager::IsSupported(TInt aFunction) const
       
   112     {
       
   113     return iMonitor->IsSupported(aFunction);
       
   114     }
       
   115 
       
   116 // -----------------------------------------------------------------------------
       
   117 void CTsResourceManager::HandleDataL(TInt aFunction, RReadStream& aDataStream)
       
   118     {
       
   119     iMonitor->HandleDataL(aFunction, aDataStream);
       
   120     }