ソースを参照

Merge pull request #631 from AndreasFetzer/add-possibility-to-set-proxy-for-xnat

Add possibility to set proxy for xnat
Jean-Christophe Fillion-Robin 9 年 前
コミット
007ecceaa8
共有2 個のファイルを変更した18 個の追加0 個の削除を含む
  1. 8 0
      Libs/XNAT/Core/ctkXnatSession.cpp
  2. 10 0
      Libs/XNAT/Core/ctkXnatSession.h

+ 8 - 0
Libs/XNAT/Core/ctkXnatSession.cpp

@@ -735,3 +735,11 @@ void ctkXnatSession::emitTimeOut()
     emit timedOut();
   }
 }
+
+//----------------------------------------------------------------------------
+void ctkXnatSession::setHttpNetworkProxy(const QNetworkProxy& proxy)
+{
+  Q_D(ctkXnatSession);
+
+  d->xnat->setHttpNetworkProxy(proxy);
+}

+ 10 - 0
Libs/XNAT/Core/ctkXnatSession.h

@@ -32,6 +32,7 @@
 #include <QUuid>
 
 class QDateTime;
+class QNetworkProxy;
 
 class ctkXnatSessionPrivate;
 
@@ -160,6 +161,15 @@ public:
   void setDefaultDownloadDir(const QString& path);
 
   /**
+    * @brief Sets a network proxy that will be used to connect with XNAT
+    *
+    * Tells the qRestAPI to use a network proxy for the connection to XNAT
+    *
+    * @param proxy the network proxy that will be set
+    */
+  void setHttpNetworkProxy(const QNetworkProxy& proxy);
+
+  /**
     * @brief returns the default download location
     * @return the default download directory as string
     */