- Timestamp:
- 07/26/07 10:30:11 (1 year ago)
- branch-nick:
- calitko-dev
- 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 62 62 } 63 63 64 //! Reads a bencoded dictionary item.64 //! Reads and loads a bencoded dictionary from the \a reader. 65 65 /*! 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. 71 68 */ 72 69 bool BDictionary::read (BinaryReader &reader) developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.cpp
r130 r193 25 25 #include "Imports.cpp" 26 26 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 */ 27 32 bool BErrorItem::read (BinaryReader &) 28 33 { 29 Q_ASSERT (false); 34 Q_ASSERT (false); // Reading/loading data to an error item is not allowed! 30 35 return true; 31 36 } developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BErrorItem.h
r~130 r193 47 47 48 48 //! Constructs an invalid BItem object. 49 /*!50 */51 49 inline BErrorItem::BErrorItem() 52 50 {} 53 51 52 //! BErrorItem destructor. 54 53 inline BErrorItem::~BErrorItem() 55 54 {} developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.cpp
r130 r193 25 25 #include "Imports.cpp" 26 26 27 //! Reads a bencoded int value.27 //! Reads and loads a bencoded int value from the \a reader. 28 28 /*! 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. 31 30 */ 32 31 bool BInt::read (BinaryReader &reader) developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BInt.h
r145 r193 51 51 52 52 //! Constructs a BInt object with the value \a value. 53 /*!54 */55 53 inline BInt::BInt (qint64 value) 56 54 : value_ (value) 57 55 {} 58 56 57 //! BInt destructor. 59 58 inline BInt::~BInt() 60 59 {} developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BItem.h
r~130 r193 51 51 52 52 //! Constructs a default BItem object. 53 /*!54 */55 53 inline BItem::BItem() 56 54 {} 57 55 58 56 //! BItem destructor. 59 /*!60 */61 57 inline BItem::~BItem() 62 58 {} developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BList.cpp
r139 r193 51 51 } 52 52 53 //! Reads a bencoded list item.53 //! Reads and loads a bencoded list item from the \a reader. 54 54 /*! 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. 59 57 */ 60 58 bool BList::read (BinaryReader &reader) developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.cpp
r130 r193 25 25 #include "Imports.cpp" 26 26 27 //! Reads a bencoded string value.27 //! Reads and loads a bencoded string from the \a reader. 28 28 /*! 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. 31 30 */ 32 31 bool BString::read (BinaryReader &reader) developers/s3rvac/calitko-dev/Protocols/BitTorrent/Bencoding/BString.h
r145 r193 49 49 }; 50 50 51 //! Constructs a BString form QByteArray \a byteArray. 52 /*! 53 */ 51 //! Constructs a BString from QByteArray \a byteArray. 54 52 inline BString::BString (const QByteArray &rawData) 55 53 : value_ (rawData) 56 54 {} 57 55 58 //! BString destructor 59 /*! 60 */ 56 //! BString destructor. 61 57 inline BString::~BString() 62 58 {} 63 59 64 60 //! Returns the string value. 65 /*!66 */67 61 inline QByteArray BString::value() const 68 62 { developers/s3rvac/calitko-dev/Protocols/BitTorrent/Trackers/TrackerRequestUrlCreator.cpp
r187 r193 124 124 } 125 125 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! 129 127 return "unknown"; 130 128 }