~sense/ubuntu/lucid/transmission/fix-497882

« back to all changes in this revision

Viewing changes to libtransmission/fdlimit.h

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2008-11-28 15:33:48 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20081128153348-it70trfnxiroblmc
Tags: 1.40-0ubuntu1
* New upstream release (LP: #302672)
  - Tracker communication uses fewer resources
  - More accurate bandwidth limits
  - Reduce disk fragmentation by preallocating files (LP: #287726)
  - Stability, security and performance improvements to the RPC /
    Web UI server (closes LP: #290423)
  - Support compression when serving Web UI and RPC responses
  - Simplify the RPC whitelist
  - Fix bug that prevented handshakes with encrypted BitComet peers
  - Fix 1.3x bug that could re-download some data unnecessarily
    (LP: #295040)
  - Option to automatically update the blocklist weekly
  - Added off-hour bandwidth scheduling
  - Simplify file/priority selection in the details dialog
  - Fix a couple of crashes
  - New / updated translations
  - Don't inhibit hibernation by default (LP: #292929)
  - Use "close" animation when sending to notification area (LP: #130811)
  - Fix resize problems (LP: #269872)
  - Support "--version" option when launching from command line
    (LP: #292011)
  - Correctly parse announce URLs that have leading or trailing
    spaces (LP: #262411)
  - Display an error when "Open Torrent" fails (LP: #281463)
* Dropped 10_fix_crasher_from_upstream.dpatch: Fix is in this
  upstream release.
* debian/control: Don't just build-depend on libcurl-dev, which is
  a virtual package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: fdlimit.h 4734 2008-01-18 19:13:32Z charles $
 
2
 * $Id: fdlimit.h 7051 2008-11-05 05:56:06Z charles $
3
3
 *
4
4
 * Copyright (c) 2005-2008 Transmission authors and contributors
5
5
 *
42
42
 * write to the file at a time.  Callers check out a file, use it,
43
43
 * and then check it back in via tr_fdFileReturn() when done.
44
44
 *
45
 
 * - if `folder' doesn't exist, TR_ERROR_IO_PARENT is returned.
 
45
 * - if `folder' doesn't exist, errno is set to ENOENT.
46
46
 * - if doWrite is true, subfolders in torrentFile are created if necessary.
47
47
 * - if doWrite is true, the target file is created if necessary.
48
48
 *
49
49
 * on success, a file descriptor >= 0 is returned.
50
 
 * on failure, a negative number corresponding to tr_errno is returned.
 
50
 * on failure, a -1 is returned and errno is set.
51
51
 *
52
52
 * @see tr_fdFileReturn
53
53
 * @see tr_fdFileClose
54
 
 * @see tr_errno
55
54
 */
56
 
int tr_fdFileCheckout( const char * folder,
57
 
                       const char * torrentFile,
58
 
                       int          doWrite );
 
55
int  tr_fdFileCheckout( const char * folder,
 
56
                        const char * torrentFile,
 
57
                        int          doWrite,
 
58
                        int          doPreallocate,
 
59
                        uint64_t     desiredFileSize );
59
60
 
60
61
/**
61
62
 * Returns an fd from tr_fdFileCheckout() so that other clients may borrow it.
74
75
 * @see tr_fdFileCheckout
75
76
 * @see tr_fdFileReturn
76
77
 */
77
 
void tr_fdFileClose( const char * filename );
78
 
 
 
78
void     tr_fdFileClose( const char * filename );
79
79
 
80
80
 
81
81
/***********************************************************************
82
82
 * Sockets
83
83
 **********************************************************************/
84
 
int  tr_fdSocketCreate( int type, int priority );
85
 
int  tr_fdSocketAccept( int b, struct in_addr * addr, tr_port_t * port );
86
 
void tr_fdSocketClose( int s );
 
84
int      tr_fdSocketCreate( int type );
 
85
 
 
86
int      tr_fdSocketAccept( int              b,
 
87
                            struct in_addr * addr,
 
88
                            tr_port_t *      port );
 
89
 
 
90
void     tr_fdSocketClose( int s );
87
91
 
88
92
/***********************************************************************
89
93
 * tr_fdClose
90
94
 ***********************************************************************
91
95
 * Frees resources allocated by tr_fdInit.
92
96
 **********************************************************************/
93
 
void tr_fdClose( void );
94
 
 
95
 
 
96
 
void tr_fdSetPeerLimit( uint16_t n );
 
97
void     tr_fdClose( void );
 
98
 
 
99
 
 
100
void     tr_fdSetPeerLimit( uint16_t n );
97
101
 
98
102
uint16_t tr_fdGetPeerLimit( void );
99
103