Stubs for some QNetwork classes
authorJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 14 Jul 2010 11:30:57 +0000 (14:30 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 14 Jul 2010 11:30:57 +0000 (14:30 +0300)
ut/stubs/QNetworkConfigurationManager [new file with mode: 0644]
ut/stubs/QNetworkRequest [new file with mode: 0644]
ut/stubs/qnetworkconfigurationmanager.cpp [new file with mode: 0644]
ut/stubs/qnetworkconfigurationmanager.h [new file with mode: 0644]
ut/stubs/qnetworkrequest.cpp [new file with mode: 0644]
ut/stubs/qnetworkrequest.h [new file with mode: 0644]

diff --git a/ut/stubs/QNetworkConfigurationManager b/ut/stubs/QNetworkConfigurationManager
new file mode 100644 (file)
index 0000000..9bc22ad
--- /dev/null
@@ -0,0 +1 @@
+#include "qnetworkconfigurationmanager.h"
diff --git a/ut/stubs/QNetworkRequest b/ut/stubs/QNetworkRequest
new file mode 100644 (file)
index 0000000..477436c
--- /dev/null
@@ -0,0 +1 @@
+#include "qnetworkrequest.h"
diff --git a/ut/stubs/qnetworkconfigurationmanager.cpp b/ut/stubs/qnetworkconfigurationmanager.cpp
new file mode 100644 (file)
index 0000000..5ea08c7
--- /dev/null
@@ -0,0 +1,17 @@
+#include "qnetworkconfigurationmanager.h"
+
+bool QNetworkConfigurationManager::online = false;
+
+QNetworkConfigurationManager::QNetworkConfigurationManager()
+{
+}
+
+QNetworkConfigurationManager::~QNetworkConfigurationManager()
+{
+}
+
+bool QNetworkConfigurationManager::isOnline()
+{
+    return online;
+}
+
diff --git a/ut/stubs/qnetworkconfigurationmanager.h b/ut/stubs/qnetworkconfigurationmanager.h
new file mode 100644 (file)
index 0000000..fa65436
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _QNETWORKCONFIGURATIONMANAGER_H_
+#define _QNETWORKCONFIGURATIONMANAGER_H_
+
+#define QTM_PREPEND_NAMESPACE(name) name
+
+class QNetworkConfigurationManager
+{
+public:
+    QNetworkConfigurationManager();
+    ~QNetworkConfigurationManager();
+    bool isOnline();
+
+    static bool online;
+    
+};
+
+#endif // _QNETWORKCONFIGURATIONMANAGER_H_
+
+
diff --git a/ut/stubs/qnetworkrequest.cpp b/ut/stubs/qnetworkrequest.cpp
new file mode 100644 (file)
index 0000000..d272135
--- /dev/null
@@ -0,0 +1,16 @@
+#include "qnetworkrequest.h"
+
+QNetworkRequest::QNetworkRequest(QUrl url)
+    : m_url(url)
+{
+}
+
+QNetworkRequest::~QNetworkRequest()
+{
+}
+
+QUrl QNetworkRequest::url() const
+{
+    return m_url;
+}
+
diff --git a/ut/stubs/qnetworkrequest.h b/ut/stubs/qnetworkrequest.h
new file mode 100644 (file)
index 0000000..2490721
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _QNETWORKREQUEST_H_
+#define _QNETWORKREQUEST_H_
+
+#include <QUrl>
+
+class QNetworkRequest
+{
+public:
+    QNetworkRequest(QUrl);
+    ~QNetworkRequest();
+
+    QUrl url() const;
+
+private:
+    QUrl m_url;
+};
+
+#endif // _QNETWORKREQUEST_H_
+