ED2KPacket::FileName Class Reference

FileName is the expected response to ReqFile, and contains the hash, and the file name corresponding to that hash. More...

#include <packets.h>

Inheritance diagram for ED2KPacket::FileName:

ED2KPacket::Packet List of all members.

Public Member Functions

 FileName (const Hash< ED2KHash > &hash, const std::string &filename)
 FileName (std::istream &i)
 operator std::string ()
std::string getName () const
Hash< ED2KHash > getHash () const

Private Attributes

Hash< ED2KHash > m_hash
 File hash.
std::string m_name
 File name.

Detailed Description

FileName is the expected response to ReqFile, and contains the hash, and the file name corresponding to that hash.

Note that this packet also implies that the sender is in fact sharing the file in question.

Definition at line 584 of file packets.h.


Constructor & Destructor Documentation

ED2KPacket::FileName::FileName const Hash< ED2KHash > &  hash,
const std::string &  filename
 

Definition at line 806 of file packets.cpp.

ED2KPacket::FileName::FileName std::istream &  i  ) 
 

Definition at line 808 of file packets.cpp.

References m_hash, and m_name.


Member Function Documentation

ED2KPacket::FileName::operator std::string  ) 
 

Definition at line 813 of file packets.cpp.

References m_hash, m_name, ED2KPacket::Packet::makePacket(), and OP_FILENAME.

std::string ED2KPacket::FileName::getName  )  const [inline]
 

Definition at line 590 of file packets.h.

References m_name.

Hash<ED2KHash> ED2KPacket::FileName::getHash  )  const [inline]
 

Definition at line 591 of file packets.h.

References m_hash.


Member Data Documentation

Hash<ED2KHash> ED2KPacket::FileName::m_hash [private]
 

File hash.

Definition at line 593 of file packets.h.

Referenced by FileName(), getHash(), and operator std::string().

std::string ED2KPacket::FileName::m_name [private]
 

File name.

Definition at line 594 of file packets.h.

Referenced by FileName(), getName(), and operator std::string().


The documentation for this class was generated from the following files: