diff -r e4f038c420f7 -r 3ac3aaebaee5 homescreenapp/hsapplication/tsrc/t_hsapplication/t_hsapplicationexe/src/hswidgetcomponent_mock.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/tsrc/t_hsapplication/t_hsapplicationexe/src/hswidgetcomponent_mock.cpp Mon Sep 20 10:19:07 2010 +0300 @@ -0,0 +1,114 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "hswidgetcomponent.h" + +/*! + +*/ +HsWidgetComponent::~HsWidgetComponent() +{ +} + +/*! + +*/ +QString HsWidgetComponent::rootPath() const +{ + return mRootPath; +} + +/*! + +*/ +QString HsWidgetComponent::uri() const +{ + return mUri; +} + + +bool HsWidgetComponent::isAvailable() const +{ + return true; +} +/*! + +*/ +HsWidgetComponent::HsWidgetComponent(const QString &uri, QObject *parent) + : QObject(parent), + mUri(uri), + mState(Available) +{ +} + + +/*! + +*/ +void HsWidgetComponent::resolveRootPathAndTranslationFilename() +{ +} + +/*! + +*/ +void HsWidgetComponent::installTranslator() +{ +} + +/*! + +*/ +void HsWidgetComponent::uninstallTranslator() +{ +} + +void HsWidgetComponent::emitAboutToUninstall() +{ + if (mState == Available) { + mState = Uninstalling; + emit aboutToUninstall(); + } +} +void HsWidgetComponent::emitUninstalled() +{ + if (mState == Uninstalling) { + mState = Available; + emit uninstalled(); + } +} +void HsWidgetComponent::emitUpdated() +{ + if (mState == Uninstalling) { + mState = Available; + emit updated(); + } +} +void HsWidgetComponent::emitUnavailable() +{ + if (mState == Available) { + mState = Unavailable; + emit unavailable(); + } +} +void HsWidgetComponent::emitAvailable() +{ + if (mState == Unavailable) { + mState = Available; + emit available(); + } +}