* SWEEET
* Cherry
* Mirai Nikki



- Allow construction of cached command call lookups.


- Consolidate the bools in DownloadInfo.


- Remove connection_list set_difference?


- Add a flag to the available address insert that checks if a PeerInfo
  has the 'seeder' flag set. Also, add the flag.


- When collapsed, show the priority of the aggragate of the files
  contained.

- Switch commands to is_pex_active/enabled.

- Convert sorting of views should only use cached commands.


- Make the ElementText list take a single c_str, which will contain a
  list of commands/strings. Some kind of formatting will be provided.



- Fix BSD problems with statfs, etc.

- XMLRPC load_raw should return the hash. Or rather, return a list of hashes?

PeerConnectionBase::send_pex_message() - Need to ensure that we're
'accepting' pex. Also, consider how we can accept handshakes from the
other side.


- ProtocolExtension::generate_handshake_message cache the messages? At least get rid of the unneccesary buffer copy.


- Adjust AvailableList::want_more?


- Look into adding a connected peers list.

- Add a sorted list class that can easily be used by the client? Or should this be handled by rtorrent?


- Path expand for dot-prefixed dirs.

- Add close_direct to xmlrpc and make a note in the wiki.


- Fix start_tied, so it doesn't re-download moved torrents.




! Notes about dns resolution happening at time of call for ip, bind, etc.
http://archives.seul.org/or/cvs/Apr-2007/msg00069.html

- See if we can include SVN rev in the two bytes after peer id.

- Should it be possible to move files and change FileList while a torrent is running?


!!! The 'undead' torrents, are they perhaps caused by watching a
    directory for start_tied or similar?

- Cache the info hash.


- Work on proper handling of missing files.

- Add a flag for pre-allocating files.


- Launch ncurses free rtorrent.

- d.get_base_filename - closed returns empty string.

- Implement a new logging system, where also commands can be used to
  write to 'named' fds.


- Add early check for valid bencode in tracker get and file load.


- Call on_finished when hashing torrent? Add a seperate event for this?


- http://libtorrent.rakshasa.no/ticket/984#comment:9

- http://libtorrent.rakshasa.no/ticket/952 Check if it happens due to
  final hash checking being turned off.


- Look into how libstdc++ optimizes code size by using generic base
  container things. See if this works for rak::function stuff.

- Change TE to use only commands.

- Convert Menu element to use commands.

Man page:

- load_* appended commands.


- Add builtin multi-get commands.


- Write a document of some kind on how to write smaller maps with
  const char*. Search the net too.


- Only create files that are the size of their border when set to
  off. Also, consider not truncating before we get incoming data to a
  file.


- Prune bad peers from full lists.


- Check the tracker id thing.

- un-inline some of the rpc calls.


optimize hexchar_to_value.


=== States ===

- State, the torrent is started/stopped or in the process of doing so.

- Hashing, queued for hashing.

The above should be enough to handle the internal control.

- UserState, e.g:

* off
* scheduled, being controlled by a download scheduler. Includes a priority.
* forced on
* forced off

===


=== API CHANGES ===

- Add even more efficent bencode data -> char buffer functions.

- Make sure a flag for not allocating files is included.

- Change error.h to reflect the style in c++0x.

- Use custom ctor functions for torrent::Object types, and make the
  std::string one uninlined.

- Add a torrent::Object flag in rtorrent that sets if a list is a
  function call or just a normal list. Then change the parse_command
  stuff to recurse into the latter, but not the former.

  Just add support for "()" for list parsing, and set the flag when
  these are used. Then migrate to this scheme, from the string commands.

- Equal, if/else, match substrings.

- Fix the socket limit thing.

- Allow multiple requests to be disabled.

- Enable various 'resonable' defaults. Enc, diskspace, etc.

- Rename const File::path. (Or rather, the mutable one)

- Fix the Tracker* API.

- Move global throttle and div code into libtorrent.

- torrent::set_max_unchoked > torrent::set_max_upload_unchoked

- http://libtorrent.rakshasa.no/ticket/983

- http://libtorrent.rakshasa.no/ticket/72

- Allow info-hash to be set on torrent load.

- Move various stuff into torrent/net/.

- Fix max open sockets API+options. Possibly allow changing the ulimit.

- At least add default list ctor to torrent::Object.

- Fix the peer list.

- Download::info_hash() should return ptr.

- Torrent::Object "insert if not present" function?

- Add support for global settings, with e.g. a dirty bit to decide
  what should be changed along with global settings.

- Rename e_handshake_ to eh_

===


Check the race condition for loading from watch dir.

- Perhaps we're not properly comparing against previously tied paths?
  Might be we try loading the torrents every tick?

- A timeout for the current tied_to_file paths?



- Clearing tied manually doesn't remove the links.



Convert option parser to rak fn.

! Feature: Allow rtorrent to be temporary paused by touching an
  external file.

! When creating dirs/files lazily, only create the first
  file/dir. That should cover most potential errors.


- Implement a character tree.


Handshake, check if INACTIVE before writing in event_read.


Consider the possibility of threading during file close if the files
are larger than a few 100 mb and not done. But first check where OSX
is blocking.

Allow monitoring with stuff like inotify for new files. Make it an
event similar to schedule, but ensure it is slightly delayed that
checks the state of the file to ensure it is finished when we check
it.

Set the proper flags on all fd's used internally in
libtorrent. Possibly make it an option.


- AvailableList::buffer(), is it being used? Figure out what you want to use it for.




<josef> rakshasa: I think when a peer sends a choke, the queued pieces aren't removed from the transfer list, the chunks there still have them marked for the peer
<josef> it fixes itself eventually when they get overwritten with another peer, but it might be a little less efficient that way


- Add the min time between unchokes.

- Check if we do enough checking during receive of unchoke, so as not
  to cause us to use slots when we're not really interested.

- Improve the choking weighing for downloads.


=== The Variable rewrite stuff ===

- Add move on rvalue copy.

- Rewrite to use placement new/delete, and support swap.


- torrent::Object will use the upper 24 bits for flags. 8 of those will
  be internal to libtorrent and/or Object.

- Try to figure out some clever arrangement of the flags so that when
  we check for const vs. non-const is_type thing, it will use
  different masks. Dunno if getting the 8bit border for both is worth
  it.

- We then probably need to rename the non-const accesses to mutable_*
  to avoid bork when we just need a const access.




- Make the self-contained variable storing Variables able to expose
  the variables in some other way, so that we can have two different
  variables doing read and write.

- Split variables into set and get variables. Start by changing all
  users to the respective different variables using the old get/set.

- Add a bencode pool that gets passed with calles to VariableMap.



=== API CHANGES ===

Remove std::string from exceptions.


- what do you think about the DhtStatistics class?

+    torrent::dht_manager()->set_can_receive(false); 
Hmm...

tracker_base
+  const std::string&  status() const                        { return m_status; }
Don't use a string.



*** IDEA ***

Create tools for avoiding std::string use in favor of cstr. Like
autobuild cstr for arguments from std::string and const cstr's and
other known length stuff.



- Set a bad timeout for select... add some kind of sanity check.

- the goto restart might cause write-done to be set after read_peer.

- Remove the interested/choked/etc from PCB and allow const access to PB.

Bad peer: very slow upload, when choked, sends HAVE messages at high rate.


- Do something about the max_memory_usage docs. Make it explicit that
  the user should tweak their ulimit instead of rtorrent's settings?

- Rename max_memory_usage to max_...?

- Add a check that tries to set/unset the soft ulimit if unlimited,
  just to check that the user doesn't fsck us?

  Consider also using this to detect max vmem.


- Add priority to connections, about what kind of rarity pieces, and
  what download they are on.

- Need to fix the pipe-lining code too.

- Might want to require download throttle to be set, though I assume
  it should be possible without it. Anyway, one of the first things I
  need to implement, is a way to detect if we're close to full
  bandwidth usage. This needs to take into account that upload and
  congestion varies.

- Obviously we need to put the 30 second cycles into use.

- Might use an vector of the last N ticks and how our performance was.

- Prefer peers which send rare pieces.


- Add variable(s) for creating new variables.

- preloading should perhaps check the piped requests.

- Move permission, etc, from File to the new OpenFile's value_type?


- Consider if this would benefit from allowing custom open-file
  functions to be defined per File. Not necessarily right now, but in
  the future. Anyway, add a way to make it configurable if we want to
  create the file or throw.



- Move file/dir creation into open_file or similar.

- Later re-add a function for creating all directories in a torrent at
  open.



- Allow flags when starting/opening that do extra error checking or
  ignore them.

- When it does the missing files thing, it actually creates the missing file... bad.



- Add helper functions for setting the various max open stuff.

- Check diskspace before opening a new/incomplete torrent. Should we
  add the start with flags thing now as a renamed function, then add a
  flag that checks for diskspace/existing files.

- Add DownloadList thing to the API. Make the old torrent api use this
  API. This should contain DownloadWrappers for now.

- See if we can embed data in the curl handle, like the curlget pointer.

- Fix HttpQueue?

- Check how many peers we received, and only reconnect if we got less
  than request size. Won't work.

- Fix erasing in HashQueue.

- Allow print_attr to skip lines.

- Move signals to their respective classes in the interface.

- Allow setting the source port. Also move stuff like bind address.

- New global torrent class.

- Fix the resume interface.

- Tracker dump does not show failed tracker connects.
