Changeset 3337 in ntrip


Ignore:
Timestamp:
Jul 19, 2011, 4:38:34 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r3334 r3337  
    571571    }
    572572    else if (_ntripVersion == "2") {
    573       _query = new bncNetQueryV2();
     573      _query = new bncNetQueryV2(false);
    574574    }
    575575    else if (_ntripVersion == "2s") {
    576       _query = new bncNetQueryV2();
     576      _query = new bncNetQueryV2(true);
    577577    }
    578578    else {
  • trunk/BNC/bncnetqueryv2.cpp

    r3332 r3337  
    2323// Constructor
    2424////////////////////////////////////////////////////////////////////////////
    25 bncNetQueryV2::bncNetQueryV2() {
     25bncNetQueryV2::bncNetQueryV2(bool secure) {
     26  _secure    = secure;
    2627  _manager   = new QNetworkAccessManager(this);
    2728  connect(_manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
     
    9394  _url = url;
    9495  if (_url.scheme().isEmpty()) {
    95     _url.setScheme("http");
     96    if (_secure) {
     97      _url.setScheme("https");
     98    }
     99    else {
     100      _url.setScheme("http");
     101    }
    96102  }
    97103  if (_url.path().isEmpty()) {
  • trunk/BNC/bncnetqueryv2.h

    r3332 r3337  
    88
    99 public:
    10   bncNetQueryV2();
     10  bncNetQueryV2(bool secure);
    1111  virtual ~bncNetQueryV2();
    1212
     
    2828  QEventLoop*            _eventLoop;
    2929  bool                   _firstData;
     30  bool                   _secure;
    3031};
    3132
  • trunk/BNC/bncrinex.cpp

    r3335 r3337  
    5555#include "bnctabledlg.h"
    5656#include "bncgetthread.h"
     57#include "bncnetqueryv1.h"
    5758#include "bncnetqueryv2.h"
    5859#include "bncsettings.h"
     
    160161    }
    161162
    162     bncNetQueryV2 query;
     163    bncNetQuery* query;
     164    if      (_ntripVersion == "2s") {
     165      query = new bncNetQueryV2(true);
     166    }
     167    else if (_ntripVersion == "2") {
     168      query = new bncNetQueryV2(false);
     169    }
     170    else {
     171      query = new bncNetQueryV1;
     172    }
     173
    163174    QByteArray outData;
    164     query.waitForRequestResult(url, outData);
    165     if (query.status() == bncNetQuery::finished) {
     175    query->waitForRequestResult(url, outData);
     176    if (query->status() == bncNetQuery::finished) {
    166177      _headerLines.clear();
    167178      bool firstLineRead = false;
     
    206217    }
    207218    else {
     219      delete query;
    208220      return failure;
    209221    }
    210 
    211   }
     222    delete query;
     223  }
     224
    212225  return irc;
    213226}
  • trunk/BNC/bnctabledlg.cpp

    r3336 r3337  
    199199
    200200  bncNetQuery* query = 0;
    201   if (ntripVersion == "2" || ntripVersion == "2s") {
    202     query = new bncNetQueryV2();
     201  if      (ntripVersion == "2") {
     202    query = new bncNetQueryV2(false);
     203  }
     204  else if (ntripVersion == "2s") {
     205    query = new bncNetQueryV2(true);
    203206  }
    204207  else {
     
    554557
    555558  bncNetQuery* query = 0;
    556   if (ntripVersion == "2" || ntripVersion == "2s") {
    557     query = new bncNetQueryV2();
     559  if (ntripVersion == "2") {
     560    query = new bncNetQueryV2(false);
     561  }
     562  else if (ntripVersion == "2s") {
     563    query = new bncNetQueryV2(true);
    558564  }
    559565  else {
Note: See TracChangeset for help on using the changeset viewer.