Changeset 1366 in ntrip for trunk/BNC/bncsocket.cpp


Ignore:
Timestamp:
Dec 27, 2008, 11:03:14 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncsocket.cpp

    r1364 r1366  
    3939////////////////////////////////////////////////////////////////////////////
    4040bncSocket::~bncSocket() {
    41   cout << "~bncSocket" << endl;
    4241  delete _socket;
    4342  delete _http;
     
    8180bool bncSocket::canReadLine() const {
    8281  if      (_http) {
    83     cout << "canReadLine " << _buffer.size() << endl;
    8482    if (_buffer.indexOf('\n') != -1) {
    8583      return true;
     
    102100  if      (_http) {
    103101    int ind = _buffer.indexOf('\n');
    104     cout << "readLine " << ind << endl;
    105102    if (ind != -1) {
    106103      QByteArray ret = _buffer.left(ind+1);
    107       cout << ret.data();
    108104      _buffer = _buffer.right(_buffer.size()-ind-1);
    109105      return ret;
     
    156152
    157153  if      (ntripVersion == "AUTO") {
    158     emit newMessage("NTRIP Version AUTO not yet implemented", "true");
     154    emit newMessage("NTRIP Version AUTO not yet implemented", true);
    159155    return failure;
    160156  }
     
    163159  }
    164160  else if (ntripVersion != "1") {
    165     emit newMessage("Unknown NTRIP Version " + ntripVersion, "true");
     161    emit newMessage("Unknown NTRIP Version " + ntripVersion, true);
    166162    return failure;
    167163  }
     
    280276//
    281277////////////////////////////////////////////////////////////////////////////
    282 void bncSocket::slotRequestFinished(int id, bool error) {
    283   cout << "slotRequestFinished " << id << endl;
     278void bncSocket::slotRequestFinished(int /* id */, bool error) {
    284279  if (error) {
    285     cout << "error: " << _http->error() << " "
    286          << _http->errorString().toAscii().data() << endl;
     280    emit newMessage("slotRequestFinished " +
     281                    _http->errorString().toAscii(), true);
    287282  }
    288283}
     
    291286////////////////////////////////////////////////////////////////////////////
    292287void bncSocket::slotReadyRead(const QHttpResponseHeader&) {
    293   cout << "slotReadyRead " << _buffer.size() << " "
    294        << _http->bytesAvailable() << endl;
    295288  _buffer.append(_http->readAll());
    296   cout << _buffer.data();
    297289  emit quitEventLoop();
    298290}
     
    301293////////////////////////////////////////////////////////////////////////////
    302294void bncSocket::slotDone(bool error) {
    303   cout << "slotDone " << endl;
    304295  if (error) {
    305     cout << "error: " << _http->error() << " "
    306          << _http->errorString().toAscii().data() << endl;
    307   }
     296    emit newMessage("slotDone " + _http->errorString().toAscii(), true);
     297  }
     298  emit quitEventLoop();
    308299}
    309300
     
    345336  _http->request(request);
    346337
    347   cout << "before return" << endl;
    348338  return success;
    349339}
Note: See TracChangeset for help on using the changeset viewer.