Changeset 12617


Ignore:
Timestamp:
Aug 3, 2011, 11:40:51 PM (10 years ago)
Author:
jordan
Message:

add user_data (void *) to the queue callback

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r12615 r12617  
    35763576                tr_torrentStartNow( tor );
    35773577                if( tor->queue_started_callback != NULL )
    3578                     (*tor->queue_started_callback)( tor );
     3578                    (*tor->queue_started_callback)( tor, tor->queue_started_user_data );
    35793579            }
    35803580        }
  • trunk/libtransmission/torrent.c

    r12615 r12617  
    33243324
    33253325void
    3326 tr_torrentSetQueueStartCallback( tr_torrent * torrent, void (*callback)( tr_torrent * ) )
     3326tr_torrentSetQueueStartCallback( tr_torrent * torrent, void (*callback)( tr_torrent *, void * ), void * user_data )
    33273327{
    33283328    torrent->queue_started_callback = callback;
    3329 }
    3330 
    3331 
     3329    torrent->queue_started_user_data = user_data;
     3330}
     3331
     3332
  • trunk/libtransmission/torrent.h

    r12615 r12617  
    237237    void                            * idle_limit_hit_func_user_data;
    238238
    239     void ( * queue_started_callback )( tr_torrent * );
     239    void * queue_started_user_data;
     240    void ( * queue_started_callback )( tr_torrent *, void * queue_started_user_data );
    240241
    241242    bool                       isRunning;
  • trunk/libtransmission/transmission.h

    r12615 r12617  
    810810
    811811/** @brief Set a callback that is invoked when the queue starts a torrent */
    812 void tr_torrentSetQueueStartCallback( tr_torrent * torrent, void (*callback)( tr_torrent * ) );
     812void tr_torrentSetQueueStartCallback( tr_torrent * torrent, void (*callback)( tr_torrent *, void * ), void * user_data );
    813813
    814814
Note: See TracChangeset for help on using the changeset viewer.