# TorrentManager Class Reference

This class is used to store and update the status of the torrents managed by the tracker. More...

`#include <TorrentManager.h>`

List of all members.

## Public Member Functions

void | add_peer_to_torrent (char *info_hash, char *peer_id)
| A method used to add new peer to the list of peers interested in a given torrent.
int | get_number_of_ppers_with_entire_file (string info_hash, string current_id)
| Function used to get the number of peers that has already downloaded the entire torrent files.
int | get_number_of_non_seeder_peers (string info_hash, string current_id)
| Function used to get the number of non-seeder peers.
std::string | get_bencoded_fail_message (std::string &message)
| Function used to translate a failure message to a bencoded message.
int | check_info_hash (std::string info_hash, string peer_id)
| Function used to the presence of a given torrent in the torrents list.
string | get_list_of_interested_peers (string &info_hash, int numwant, int *, string)
| Function used to return the list of interested peers in a given torrent.
string | get_torrents_list ()
| Function used to return the list of torrents maintained by the tracker.
int | get_number_of_torrents ()
| Function used to return the number of torrents maintained by the tracker.
void | delete_peer_from_torrent (string torrent_id, string peer_id)
| Function used to remove a peer from the list of peers interested in a given torrent.
bool | eliminate_confusion (string torrent_id, string peer_id, string ip)
| Function used to eliminate confusion while adding a new peer.
void | DeleteOutOfDatePeers ()
| Delete Peers Out of Date.

## Private Attributes

TorrentPeers | torrent_peers
| Map used to maitain the list of peers interested in a given torrent.

## Detailed Description

This class is used to store and update the status of the torrents managed by the tracker.

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

- Mes documents/Visual Studio 2005/Projects/WM-ADHOC-TRACKER/WM-ADHOC-TRACKER/TorrentManager.h
- Mes documents/Visual Studio 2005/Projects/WM-ADHOC-TRACKER/WM-ADHOC-TRACKER/TorrentManager.cpp