X-Git-Url: http://git.maemo.org/git/?p=mafwsubrenderer;a=blobdiff_plain;f=qmafw-gst-subtitles-renderer%2Funittests%2Fcommon%2FQNetworkStubs.h;fp=qmafw-gst-subtitles-renderer%2Funittests%2Fcommon%2FQNetworkStubs.h;h=4c31744f017e1a2239747986374168940ec7b6b1;hp=0000000000000000000000000000000000000000;hb=226d35244df85a27c332d3a3ded1b25b3c7f4951;hpb=57ba96e291a055f69dbfd4ae9f1ae2390e36986e diff --git a/qmafw-gst-subtitles-renderer/unittests/common/QNetworkStubs.h b/qmafw-gst-subtitles-renderer/unittests/common/QNetworkStubs.h new file mode 100644 index 0000000..4c31744 --- /dev/null +++ b/qmafw-gst-subtitles-renderer/unittests/common/QNetworkStubs.h @@ -0,0 +1,53 @@ +/* + * This file is part of QMAFW + * + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights + * reserved. + * + * Contact: Visa Smolander + * + * This software, including documentation, is protected by copyright controlled + * by Nokia Corporation. All rights are reserved. Copying, including + * reproducing, storing, adapting or translating, any or all of this material + * requires the prior written consent of Nokia Corporation. This material also + * contains confidential information which may not be disclosed to others + * without the prior written consent of Nokia. + * + */ + +#ifndef QNETWORKSTUBS_H +#define QNETWORKSTUBS_H + +#include +#include + +class QNetworkConfigurationManager; + +class NetworkStubHelper : public QObject +{ + Q_OBJECT + + static int networkConfigurationManagerInstances; + + friend class QNetworkConfiguration; + friend class QNetworkConfigurationManager; +public: + static bool currentCreatedConfigIsValid; + + void emitConfigurationChange(const QNetworkConfiguration &config, + QNetworkConfiguration::StateFlags confState) + { + m_currentConfState = confState; + Q_EMIT configurationChange(config); + } + + void changeCurrentConfiguration(int id); + +Q_SIGNALS: + void configurationChange(QNetworkConfiguration config); + +private: + QNetworkConfiguration::StateFlags m_currentConfState; +}; + +#endif // QNETWORKSTUBS_H