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

« back to all changes in this revision

Viewing changes to libtransmission/platform.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: platform.h 6319 2008-07-11 04:07:14Z charles $
 
2
 * $Id: platform.h 6903 2008-10-14 17:57:44Z charles $
3
3
 *
4
4
 * Copyright (c) 2005-2008 Transmission authors and contributors
5
5
 *
24
24
#ifndef TR_PLATFORM_H
25
25
#define TR_PLATFORM_H
26
26
 
27
 
#if defined(WIN32)
28
 
#define TR_PATH_DELIMITER '\\'
29
 
#define TR_PATH_DELIMITER_STR "\\"
30
 
#else
31
 
#define TR_PATH_DELIMITER '/'
32
 
#define TR_PATH_DELIMITER_STR "/"
 
27
#if defined( WIN32 )
 
28
 #define TR_PATH_DELIMITER '\\'
 
29
 #define TR_PATH_DELIMITER_STR "\\"
 
30
#else
 
31
 #define TR_PATH_DELIMITER '/'
 
32
 #define TR_PATH_DELIMITER_STR "/"
 
33
#endif
 
34
 
 
35
#ifdef __BEOS__
 
36
 #include <StorageDefs.h>
 
37
 #define MAX_PATH_LENGTH  B_FILE_NAME_LENGTH
 
38
#elif defined(WIN32)
 
39
 #include <windows.h>
 
40
 #define MAX_PATH_LENGTH  MAX_PATH
 
41
#else
 
42
 #define MAX_PATH_LENGTH  1024
33
43
#endif
34
44
 
35
45
typedef struct tr_lock   tr_lock;
37
47
 
38
48
struct tr_handle;
39
49
 
40
 
void tr_setConfigDir  ( struct tr_handle * handle,
41
 
                        const char       * configDir );
42
 
 
43
 
const char * tr_getResumeDir  ( const struct tr_handle * );
44
 
 
45
 
const char * tr_getTorrentDir ( const struct tr_handle * );
46
 
 
47
 
const char * tr_getClutchDir  ( const struct tr_handle * );
48
 
 
49
 
 
50
 
tr_thread*   tr_threadNew  ( void (*func)(void *), void * arg, const char * name );
51
 
int          tr_amInThread ( const tr_thread * );
52
 
 
53
 
tr_lock *    tr_lockNew        ( void );
54
 
void         tr_lockFree       ( tr_lock * );
55
 
void         tr_lockLock       ( tr_lock * );
56
 
void         tr_lockUnlock     ( tr_lock * );
57
 
int          tr_lockHave       ( const tr_lock * );
58
 
 
59
 
 
60
 
enum
61
 
{
62
 
  TR_LOCKFILE_SUCCESS,
63
 
  TR_LOCKFILE_EOPEN,
64
 
  TR_LOCKFILE_ELOCK
65
 
};
66
 
 
67
 
int          tr_lockfile       ( const char * filename );
 
50
void                tr_setConfigDir( struct tr_handle * handle,
 
51
                                     const char *       configDir );
 
52
 
 
53
const char *        tr_getResumeDir( const struct tr_handle * );
 
54
 
 
55
const char *        tr_getTorrentDir( const struct tr_handle * );
 
56
 
 
57
const char *        tr_getClutchDir( const struct tr_handle * );
 
58
 
 
59
 
 
60
tr_thread*          tr_threadNew( void   ( *func )(void *),
 
61
                                  void * arg );
 
62
 
 
63
int                 tr_amInThread( const tr_thread * );
 
64
 
 
65
tr_lock *           tr_lockNew( void );
 
66
 
 
67
void                tr_lockFree( tr_lock * );
 
68
 
 
69
void                tr_lockLock( tr_lock * );
 
70
 
 
71
void                tr_lockUnlock( tr_lock * );
 
72
 
 
73
int                 tr_lockHave( const tr_lock * );
 
74
 
 
75
tr_lockfile_state_t tr_lockfile( const char * filename );
 
76
 
 
77
#ifdef WIN32
 
78
void *              mmap( void *ptr,
 
79
                          long  size,
 
80
                          long  prot,
 
81
                          long  type,
 
82
                          long  handle,
 
83
                          long  arg );
 
84
 
 
85
long                munmap( void *ptr,
 
86
                            long  size );
 
87
 
 
88
#endif
68
89
 
69
90
#endif