• Help/Guide
  • About Trac
  • Settings
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Navigation

  • ← Previous Change
  • Next Change →

Changeset developers/s3rvac/calitko-dev,193 for developers/s3rvac/calitko-dev

Show
Ignore:
Timestamp:
07/26/07 10:30:11 (1 year ago)
Author:
Petr Zemek <petr.zemek@calitko.org>
branch-nick:
calitko-dev
Message:

Protocols::BitTorrent::Bencoding package:

  • added comments to Q_ASSERT (false); statements (see http://www.calitko.org/source-talk/861)
  • modified {BInt,BList,BString,BDictionary}::read() docs (they were obsolete)
  • added/modified some other docs

Protocols::BitTorrent::Trackers package:

  • added comments to Q_ASSERT (false); statements (see http://www.calitko.org/source-talk/861)
Files:
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BDictionary.cpp (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.cpp (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.h (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.cpp (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.h (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BItem.h (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BList.cpp (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.cpp (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.h (modified) (1 diff)
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Trackers/TrackerRequestUrlCreator.cpp (modified) (1 diff)

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BDictionary.cpp

    r139 r193  
    6262} 
    6363 
    64 //! Reads a bencoded dictionary item. 
     64//! Reads and loads a bencoded dictionary from the \a reader. 
    6565/*! 
    66     If the data is correct returns a BDictionary object read from the 
    67     data. The dictionary contains key-value pairs, where the keys are of type 
    68     string and the values are pointers to the read bencoded items. 
    69     If at least one of the items in the list are not correctly coded or some 
    70     of the keys are not strings returns an invalid object. 
     66    Returns true if the loaded data is correct (every item of the dictionary), 
     67    false otherwise. 
    7168*/ 
    7269bool BDictionary::read (BinaryReader &reader) 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.cpp

    r130 r193  
    2525#include "Imports.cpp" 
    2626 
     27//! This function must be never called (BErrorItem is an invalid item). 
     28/*! 
     29    This function must be never called since reading/loading data to an error 
     30    item is not allowed. 
     31*/ 
    2732bool BErrorItem::read (BinaryReader &) 
    2833{ 
    29     Q_ASSERT (false); 
     34    Q_ASSERT (false); // Reading/loading data to an error item is not allowed! 
    3035    return true; 
    3136} 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.h

    r~130 r193  
    4747 
    4848//! Constructs an invalid BItem object. 
    49 /*! 
    50 */ 
    5149inline BErrorItem::BErrorItem() 
    5250{} 
    5351 
     52//! BErrorItem destructor. 
    5453inline BErrorItem::~BErrorItem() 
    5554{} 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.cpp

    r130 r193  
    2525#include "Imports.cpp" 
    2626 
    27 //! Reads a bencoded int value. 
     27//! Reads and loads a bencoded int value from the \a reader. 
    2828/*! 
    29     If the data is correct returns a BInt object with the 
    30     read int value. Otherwise an invalid object is returned. 
     29    Returns true if the loaded value is correct, false otherwise. 
    3130*/ 
    3231bool BInt::read (BinaryReader &reader) 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.h

    r145 r193  
    5151 
    5252//! Constructs a BInt object with the value \a value. 
    53 /*! 
    54 */ 
    5553inline BInt::BInt (qint64 value) 
    5654    : value_ (value) 
    5755{} 
    5856 
     57//! BInt destructor. 
    5958inline BInt::~BInt() 
    6059{} 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BItem.h

    r~130 r193  
    5151 
    5252//! Constructs a default BItem object. 
    53 /*! 
    54 */ 
    5553inline BItem::BItem() 
    5654{} 
    5755 
    5856//! BItem destructor. 
    59 /*! 
    60 */ 
    6157inline BItem::~BItem() 
    6258{} 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BList.cpp

    r139 r193  
    5151} 
    5252 
    53 //! Reads a bencoded list item. 
     53//! Reads and loads a bencoded list item from the \a reader. 
    5454/*! 
    55     If the data is correct returns a BList object read from the 
    56     data. The list contains pointers to the read bencoded items. 
    57     If at least one of the items in the list is not correctly 
    58     coded returns an invalid object. 
     55    Returns true if all the loaded data is correct (every item of the list), 
     56    false otherwise. 
    5957*/ 
    6058bool BList::read (BinaryReader &reader) 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.cpp

    r130 r193  
    2525#include "Imports.cpp" 
    2626 
    27 //! Reads a bencoded string value. 
     27//! Reads and loads a bencoded string from the \a reader. 
    2828/*! 
    29     If the data is correct returns a BString object with the 
    30     read string. Otherwise an invalid object is returned. 
     29    Returns true if the loaded string is correct, false otherwise. 
    3130*/ 
    3231bool BString::read (BinaryReader &reader) 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.h

    r145 r193  
    4949}; 
    5050 
    51 //! Constructs a BString  form QByteArray \a byteArray. 
    52 /*! 
    53 */ 
     51//! Constructs a BString from QByteArray \a byteArray. 
    5452inline BString::BString (const QByteArray &rawData) 
    5553    : value_ (rawData) 
    5654{} 
    5755 
    58 //!  BString  destructor 
    59 /*! 
    60 */ 
     56//! BString destructor. 
    6157inline BString::~BString() 
    6258{} 
    6359 
    6460//! Returns the string value. 
    65 /*! 
    66 */ 
    6761inline QByteArray BString::value() const 
    6862{ 
  • developers/s3rvac/calitko-dev/Protocols/BitTorrent/Trackers/TrackerRequestUrlCreator.cpp

    r187 r193  
    124124    } 
    125125 
    126     Q_ASSERT (false && "Unhandled Event value - this could happen if you " 
    127         "forgot to actualize this switch when adding a new Event to " 
    128         "TrackerRequest::Event."); 
     126    Q_ASSERT (false); // Unhandled Event value! 
    129127    return "unknown"; 
    130128} 

Download in other formats:

  • Unified Diff
  • Zip Archive

Copyright © 2007 Peter Dimov.
Powered by Trac.