improve Packet Header/Trailer API dox
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sat, 16 Jun 2007 17:15:58 +0200
changeset 7757d6a3f079355
parent 774 d8b27eb4efc5
child 776 34d5715456b3
improve Packet Header/Trailer API dox
src/common/header.h
src/common/trailer.h
     1.1 --- a/src/common/header.h	Fri Jun 15 13:30:40 2007 -0700
     1.2 +++ b/src/common/header.h	Sat Jun 16 17:15:58 2007 +0200
     1.3 @@ -49,6 +49,10 @@
     1.4  
     1.5    /**
     1.6     * \returns the size of the serialized Header.
     1.7 +   *
     1.8 +   * This method is used by Packet::AddHeader to reserve
     1.9 +   * enough room in the packet byte buffer prior to calling
    1.10 +   * Header::Serialize.
    1.11     */
    1.12    virtual uint32_t GetSerializedSize (void) const = 0;
    1.13  
    1.14 @@ -63,6 +67,10 @@
    1.15     *    deserialize itself. This iterator identifies 
    1.16     *    the start of the buffer.
    1.17     * \returns the number of bytes read from the buffer
    1.18 +   *
    1.19 +   * The value returned is used to trim the packet byte buffer of the 
    1.20 +   * corresponding amount when this method is invoked from 
    1.21 +   * Packet::RemoveHeader
    1.22     */
    1.23    virtual uint32_t DeserializeFrom (Buffer::Iterator start) = 0;
    1.24  };
     2.1 --- a/src/common/trailer.h	Fri Jun 15 13:30:40 2007 -0700
     2.2 +++ b/src/common/trailer.h	Sat Jun 16 17:15:58 2007 +0200
     2.3 @@ -75,6 +75,10 @@
     2.4  
     2.5    /**
     2.6     * \returns the size of the serialized Trailer.
     2.7 +   *
     2.8 +   * This method is used by Packet::AddTrailer to reserve
     2.9 +   * enough room in the packet byte buffer prior to calling
    2.10 +   * Trailer::Serialize.
    2.11     */
    2.12    virtual uint32_t GetSerializedSize (void) const = 0;
    2.13  
    2.14 @@ -94,7 +98,9 @@
    2.15     * \returns the number of bytes read from the buffer
    2.16     *
    2.17     * This iterator must be typically moved with the Buffer::Iterator::Prev
    2.18 -   * method before reading any byte in the buffer.
    2.19 +   * method before reading any byte in the buffer. The value returned
    2.20 +   * is used to trim the packet byte buffer of the corresponding
    2.21 +   * amount when this method is invoked from Packet::RemoveTrailer
    2.22     */
    2.23    virtual uint32_t DeserializeFrom (Buffer::Iterator end) = 0;
    2.24  };