tsrc/stubs/phoneuiqtviewadapter/phonevisibilityhandler_stub.cpp
changeset 78 baacf668fe89
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
       
     1 /*
       
     2 * Copyright (c) 2010 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: Adjusts visibility of Phone app in device lock situations.
       
    15 *
       
    16 */
       
    17 #include <xqcallinfo.h>
       
    18 #include <MediatorDomainUIDs.h>
       
    19 #include <callinformation.h>
       
    20 #include <eikenv.h>
       
    21 #include <xqserviceutil.h>
       
    22 #include <devicelockaccessapi.h>
       
    23 #include <qdebug.h>
       
    24 #include <telinformationpskeys.h>
       
    25 #include <coreapplicationuisdomainpskeys.h>
       
    26 #include <apgtask.h>
       
    27 #include "phonevisibilityhandler.h"
       
    28 #include "cphonepubsubproxy.h"
       
    29 #include "phoneconstants.h"
       
    30 #include "phoneuiqtviewif.h"
       
    31 
       
    32 bool m_bringToForegroundCalled;
       
    33 bool m_bringVideoCallToForegroundCalled;
       
    34 bool m_sendToBackgroundCalled;
       
    35 bool m_ordinalPositionCalled;
       
    36 bool m_phoneVisibleReturnValue;
       
    37 
       
    38 /*!
       
    39     PhoneVisibilityHandler::PhoneVisibilityHandler.
       
    40  */
       
    41 PhoneVisibilityHandler::PhoneVisibilityHandler(PhoneUIQtViewIF &view, QObject *parent)
       
    42     : 
       
    43     QObject(parent),
       
    44     m_view(view),
       
    45     m_eikonEnv(0),
       
    46     m_carModeEnabled(false),
       
    47     m_hideDeviceDialogs(false)
       
    48 {
       
    49     m_phoneVisibleReturnValue = false;
       
    50 }
       
    51 
       
    52 
       
    53 /*!
       
    54     PhoneVisibilityHandler::~PhoneVisibilityHandler.
       
    55  */
       
    56 PhoneVisibilityHandler::~PhoneVisibilityHandler()
       
    57 {
       
    58 
       
    59 }
       
    60 
       
    61 /*!
       
    62     PhoneVisibilityHandler::bringToForeground.
       
    63  */
       
    64 void PhoneVisibilityHandler::bringToForeground()
       
    65 {
       
    66     m_bringToForegroundCalled = true;
       
    67 }
       
    68 
       
    69 /*!
       
    70     PhoneVisibilityHandler::bringVideoCallToForeground.
       
    71  */
       
    72 void PhoneVisibilityHandler::bringVideoCallToForeground()
       
    73 {
       
    74     m_bringVideoCallToForegroundCalled = true;
       
    75 }
       
    76 
       
    77 /*!
       
    78     PhoneVisibilityHandler::sendToBackground.
       
    79  */
       
    80 void PhoneVisibilityHandler::sendToBackground()
       
    81 {
       
    82     m_sendToBackgroundCalled = true;
       
    83 }
       
    84 
       
    85 /*!
       
    86     PhoneVisibilityHandler::hideDeviceDialogs.
       
    87  */
       
    88 void PhoneVisibilityHandler::hideDeviceDialogs(bool hide)
       
    89 {
       
    90     Q_UNUSED(hide)
       
    91 }
       
    92 
       
    93 /*!
       
    94     PhoneVisibilityHandler::ordinalPosition.
       
    95  */
       
    96 bool PhoneVisibilityHandler::phoneVisible() const
       
    97 {
       
    98     m_ordinalPositionCalled = true;
       
    99     return m_phoneVisibleReturnValue;
       
   100 }
       
   101 
       
   102 void PhoneVisibilityHandler::windowVisibilityChange(bool isVisible)
       
   103 {
       
   104 
       
   105 }
       
   106 
       
   107 /*!
       
   108     PhoneVisibilityHandler::HandlePropertyChangedL.
       
   109  */
       
   110 void PhoneVisibilityHandler::HandlePropertyChangedL(const TUid& aCategory, 
       
   111     const TUint aKey, const TInt aValue)
       
   112 {
       
   113     Q_UNUSED(aCategory)
       
   114     Q_UNUSED(aKey)
       
   115     Q_UNUSED(aValue)
       
   116 }
       
   117 
       
   118 /*!
       
   119     PhoneVisibilityHandler::adjustVisibility.
       
   120  */
       
   121 void PhoneVisibilityHandler::adjustVisibility(AdjustAction action)
       
   122 {
       
   123     Q_UNUSED(action)
       
   124 }
       
   125 
       
   126 /*!
       
   127     PhoneVisibilityHandler::carModeChanged.
       
   128  */
       
   129 void PhoneVisibilityHandler::carModeChanged()
       
   130 {
       
   131 
       
   132 }
       
   133