aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorq5sys <jt@ixsystems.com>2017-09-24 20:25:21 -0400
committerq5sys <jt@ixsystems.com>2017-09-24 20:25:21 -0400
commite92185222ea652436d0f5a36de25cbbd66347ea1 (patch)
tree434fe8fbf8a38f698bdb3cf6dc4248a3057209f5
parentrework video thumbnail code (diff)
downloadlumina-e92185222ea652436d0f5a36de25cbbd66347ea1.tar.gz
lumina-e92185222ea652436d0f5a36de25cbbd66347ea1.tar.bz2
lumina-e92185222ea652436d0f5a36de25cbbd66347ea1.zip
prototype webdav functionality for lumina-fm
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp23
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.h36
2 files changed, 59 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp
new file mode 100644
index 00000000..9c82aa3e
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp
@@ -0,0 +1,23 @@
+#include "fmwebdav.h"
+
+fmwebdav::fmwebdav(QObject *parent) : QNetworkAccessManager(parent) ,wdRootPath(), wdUsername(), wdUassword(), wdBaseUrl(), wdCurrentConnectionType(QWebdav::HTTP){
+// typical Qnetwork connection stuff goes here
+// probably ssl parts too
+}
+
+fmwebdav::~fmwebdav(){
+}
+
+QString fmwebdav::hostname() const{ return wdBaseUrl.host(); }
+
+int fmwebdav::port() const{ return wdBaseUrl.port(); }
+
+QString fmwebdav::rootPath() const{ return wdRootPath;}
+
+QString fmwebdav::username() const{ return wdUsername; }
+
+QString fmwebdav::password() const{ return wdPassword; }
+
+fmwebdav::QWebdavConnectionType : fmwebdav::connectionType() const{ return wdCurrentConnectionType; }
+
+bool fmwebdav::isSSL() const{ return (wdCurrentConnectionType==QWebdav::HTTPS); }
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.h b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.h
new file mode 100644
index 00000000..04d29e3b
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.h
@@ -0,0 +1,36 @@
+#ifndef FMWEBDAV_H
+#define FMWEBDAV_H
+
+#include <QtCore>
+#include <QtNetwork>
+#include <QNetworkAccessManager>
+
+public:
+
+ enum QWebdavConnectionType {HTTP = 1, HTTPS};
+
+ QString hostname() const;
+ int port() const;
+ QString rootPath() const;
+ QString username() const;
+ QString password() const;
+ QWebdavConnectionType connectionType() const;
+ bool isSSL() const;
+
+ void setConnectionSettings( const QWebdavConnectionType connectionType, const QString *hostname, const QString *rootPath = "/", const QString *username = "", const QString *password = "", int *port = 0;
+
+
+private:
+
+ QString wdRootPath;
+ QString wdUsername;
+ QString wdPassword;
+ QUrl wdBaseUrl;
+ QWebdavConnectionType wdCurrentConnectionType;
+
+
+
+
+
+
+#endif // FMWEBDAV
bgstack15