vtuis/lcvtindicatorplugin/src/lcvtindicatorplugin.cpp
changeset 43 fc383c0181e8
parent 41 f65a18712d2e
equal deleted inserted replaced
42:607cc97c6047 43:fc383c0181e8
    16  */
    16  */
    17 
    17 
    18 #include <QtPlugin>
    18 #include <QtPlugin>
    19 #include <QVariant>
    19 #include <QVariant>
    20 #include <QDebug>
    20 #include <QDebug>
    21 #include <eikenv.h>
    21 #include <QProcess>
    22 #include <apgtask.h>
       
    23 
    22 
    24 #include "lcvtindicatorplugin.h"
    23 #include "lcvtindicatorplugin.h"
    25 
    24 
    26 const static QString IndicatorType = "com.nokia.hb.indicator.lcvtindicatorplugin/1.0";
    25 const static QString IndicatorType = "com.nokia.hb.indicator.lcvtindicatorplugin/1.0";
    27 
    26 
    35 LcVtIndicatorPlugin::LcVtIndicatorPlugin(): 
    34 LcVtIndicatorPlugin::LcVtIndicatorPlugin(): 
    36     HbIndicatorInterface(IndicatorType, NotificationCategory, InteractionActivated),
    35     HbIndicatorInterface(IndicatorType, NotificationCategory, InteractionActivated),
    37     mError(0)
    36     mError(0)
    38 {
    37 {
    39     qDebug() << "LcVtIndicatorPlugin::LcVtIndicatorPlugin()";
    38     qDebug() << "LcVtIndicatorPlugin::LcVtIndicatorPlugin()";
    40     mIndicatorTypes << IndicatorType;
    39     mIndicatorTypes << IndicatorType;    
    41 }
    40 }
    42 
    41 
    43 // -----------------------------------------------------------------------------
    42 // -----------------------------------------------------------------------------
    44 //
    43 //
    45 // -----------------------------------------------------------------------------
    44 // -----------------------------------------------------------------------------
    46 //
    45 //
    47 LcVtIndicatorPlugin::~LcVtIndicatorPlugin()
    46 LcVtIndicatorPlugin::~LcVtIndicatorPlugin()
    48 {
    47 {    
    49 }
    48 }
    50 
    49 
    51 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    52 //
    51 //
    53 // -----------------------------------------------------------------------------
    52 // -----------------------------------------------------------------------------
   158 //
   157 //
   159 // -----------------------------------------------------------------------------
   158 // -----------------------------------------------------------------------------
   160 //
   159 //
   161 bool LcVtIndicatorPlugin::bringVtToForeground()
   160 bool LcVtIndicatorPlugin::bringVtToForeground()
   162 {
   161 {
   163     bool ret = false;
   162     qDebug() << "LcVtIndicatorPlugin::bringVtToForeground()";
   164     RWsSession& wsSession = CEikonEnv::Static()->WsSession();
   163     const QString AppName = "videotelui.exe";
   165     TApaTaskList taskList( wsSession );
   164     return QProcess::startDetached(AppName);
   166     const TUid KUidVtApp = { 0x101F8681 }; 
       
   167     TApaTask task = taskList.FindApp(KUidVtApp);
       
   168     if (task.Exists()) {
       
   169         qDebug() << "-> SwitchBackToVTCall";
       
   170         task.BringToForeground();
       
   171         ret = true;
       
   172     }
       
   173     return ret;
       
   174 }
   165 }
       
   166