Ignore:
Timestamp:
Jun 9, 2006, 7:53:35 PM (16 years ago)
Author:
joshe
Message:

Add support to libtransmission and the MacOS X GUI for saving private copies of

torrent files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/transmission.h

    r264 r310  
    6060 * tr_getPrefsDirectory
    6161 ***********************************************************************
    62  * Returns the full path to the directory used by libtransmission to
    63  * store the resume files. The string belongs to libtransmission, do
    64  * not free it.
     62 * Returns the full path to a directory which can be used to store
     63 * preferences. The string belongs to libtransmission, do not free it.
    6564 **********************************************************************/
    6665char * tr_getPrefsDirectory();
     
    124123 * valid torrent file, returns an handle and adds it to the list of
    125124 * torrents (but doesn't start it). Returns NULL and sets *error
    126  * otherwise.
     125 * otherwise.  If the TR_FSAVEPRIVATE flag is passed then a private copy
     126 * of the torrent file will be saved.
    127127 **********************************************************************/
    128128#define TR_EINVALID     1
     
    131131#define TR_EOTHER       666
    132132tr_torrent_t * tr_torrentInit( tr_handle_t *, const char * path,
    133                                int * error );
     133                               int flags, int * error );
     134
     135/***********************************************************************
     136 * tr_torrentInitSaved
     137 ***********************************************************************
     138 * Opens and parses a torrent file as with tr_torrentInit, only taking
     139 * the hash string of a saved torrent file instead of a filename.  There
     140 * are currently no valid flags for this function.
     141 **********************************************************************/
     142tr_torrent_t * tr_torrentInitSaved( tr_handle_t *, const char * hashStr,
     143                                    int flags, int * error );
    134144
    135145typedef struct tr_info_s tr_info_t;
     
    202212
    203213/***********************************************************************
     214 * tr_torrentRemoveSaved
     215 ***********************************************************************
     216 * Removes the private saved copy of a torrent file for torrents which
     217 * the TR_FSAVEPRIVATE flag is set.
     218 **********************************************************************/
     219void tr_torrentRemoveSaved( tr_torrent_t * );
     220
     221/***********************************************************************
    204222 * tr_torrentClose
    205223 ***********************************************************************
     
    208226 **********************************************************************/
    209227void tr_torrentClose( tr_handle_t *, tr_torrent_t * );
    210 
    211228
    212229/***********************************************************************
     
    226243    /* General info */
    227244    uint8_t     hash[SHA_DIGEST_LENGTH];
     245    char        hashString[2*SHA_DIGEST_LENGTH+1];
    228246    char        name[MAX_PATH_LENGTH];
     247
     248    /* Flags */
     249#define TR_FSAVEPRIVATE 0x01    /* save a private copy of the torrent */
     250    int         flags;
    229251
    230252    /* Tracker info */
Note: See TracChangeset for help on using the changeset viewer.