

- Make call_download expand $?

- Allow construction of cached command call lookups.

- Add multi commands for the rest of the types.

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

- Fix the on_finished closing issue. When testing this, also test the
  tracker problems.

- Work on proper handling of missing files.


  Index  7 String: 'd_check_hash'
  Index  9 String: 'd_delete_tied'
  Index 14 String: 'd_update_priorities'

  Index 10 String: 'd_erase'
  Index 11 String: 'd_open'
  Index  8 String: 'd_close'
  Index 12 String: 'd_start'
  Index 13 String: 'd_stop'


- Load torrents through XMLRPC.


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

- no mv -n



- 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.


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 ===

- 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.

- 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.

===


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.

! Consider single file multi-file torrents. Add an option for this?

| Configurable tracker request behavior.

- New global torrent class.

- Fix the resume interface.

- Tracker dump does not show failed tracker connects.


// Holds a function_base* object of any type. The user of this class
// holds the responsibility to do the right thing.
class function_unknown {
public:
  function_unknown() : m_base(NULL) {}

  bool                is_valid() const     { return m_base != NULL; }

  template <typename BaseType>
  void                set(BaseType* base)  { m_base = base; }

  template <typename BaseType>
  BaseType*           release()            { void* tmp = m_base; m_base = NULL; return static_cast<BaseType*>(tmp); }

//   Result operator () ()                    { return (*m_base)(); }

private:
  void*               m_base;
};

