+/*
+ * This file is part of QMAFW
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+ * reserved.
+ *
+ * Contact: Visa Smolander <visa.smolander@nokia.com>
+ *
+ * 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 <QObject>
+#include <QtNetwork/QNetworkConfiguration>
+
+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