Changeset 2104


Ignore:
Timestamp:
Jun 16, 2007, 9:53:43 PM (15 years ago)
Author:
charles
Message:

tighten things up a little to address bmw's complaints and mine

Location:
branches/file_selection
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/cli/transmissioncli.c

    r2103 r2104  
    9696progress_func( const meta_info_builder_t * builder     UNUSED,
    9797               size_t                      pieceIndex,
    98                size_t                      pieceCount,
    9998               int                       * abortFlag   UNUSED,
    10099               void                      * userData    UNUSED )
  • branches/file_selection/gtk/make-meta-ui.c

    r2103 r2104  
    5353progress_cb( const meta_info_builder_t  * builder    UNUSED,
    5454             size_t                       pieceIndex,
    55              size_t                       pieceCount,
    5655             int                        * abortFlag,
    5756             void                       * user_data  UNUSED)
    5857{
    59     g_message ("%lu of %lu", pieceIndex, pieceCount);
     58    g_message ("%lu of %lu", pieceIndex, builder->pieceCount);
    6059
    6160    *abortFlag = *(gboolean*)user_data;
  • branches/file_selection/libtransmission/makemeta.c

    r2103 r2104  
    234234       this will take a little tweaking to ioRecalculateHash,
    235235       probably will get done Sunday or Monday */
    236     (progress_func)( builder, 0, t.info.pieceCount, &abort, progress_func_user_data );
     236    (progress_func)( builder, 0, &abort, progress_func_user_data );
    237237
    238238    for( i=0; i<(size_t)t.info.pieceCount; ++i ) {
  • branches/file_selection/libtransmission/makemeta.h

    r2103 r2104  
    4242tr_metaInfoBuilderCreate( const char * topFile );
    4343
    44 /* set abortFlag to nonzero to abort the checksum generation */
     44/**
     45 * Called periodically during the checksum generation.
     46 *
     47 * 'builder' is the builder passed into tr_makeMetaInfo
     48 * 'pieceIndex' is the current piece having a checksum generated
     49 * 'abortFlag' is an int pointer to set if the user wants to abort
     50 * 'userData' is the data passed into tr_makeMetaInfo
     51 */
    4552typedef
    4653void (*makemeta_progress_func)(const meta_info_builder_t * builder,
    4754                               size_t                      pieceIndex,
    48                                size_t                      pieceCount,
    4955                               int                       * abortFlag,
    5056                               void                      * userData );
     57
     58/**
     59 * Builds a .torrent metainfo file.
     60 *
     61 * 'outputFile' if NULL, builder->top + ".torrent" will be used.
     62 * 'progress_func' a client-implemented callback function (see above)
     63 * 'progress_func_user_data' is passed back to the user in the progress func.
     64 *     It can be used to pass a resource or handle from tr_makeMetaInfo's
     65 *     caller to progress_func, or anything else.  Pass NULL if not needed.
     66 */
    5167int
    5268tr_makeMetaInfo( const meta_info_builder_t  * builder,
    5369                 makemeta_progress_func       progress_func,
    5470                 void                       * progress_func_user_data,
    55                  const char                 * outputFile_or_NULL,
     71                 const char                 * outputFile,
    5672                 const char                 * announce,
    5773                 const char                 * comment,
Note: See TracChangeset for help on using the changeset viewer.