source: trunk/libtransmission/platform.h @ 7632

Last change on this file since 7632 was 7632, checked in by charles, 13 years ago

(trunk libT) update the copyrights on some files that no longer have old code in them

  • Property svn:keywords set to Date Rev Author Id
File size: 1.9 KB
Line 
1/*
2 * This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
3 *
4 * This file is licensed by the GPL version 2.  Works owned by the
5 * Transmission project are granted a special exemption to clause 2(b)
6 * so that the bulk of its code can remain under the MIT license.
7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
10 * $Id: platform.h 7632 2009-01-07 06:53:29Z charles $
11 */
12
13#ifndef TR_PLATFORM_H
14#define TR_PLATFORM_H
15
16#if defined( WIN32 )
17 #define TR_PATH_DELIMITER '\\'
18 #define TR_PATH_DELIMITER_STR "\\"
19#else
20 #define TR_PATH_DELIMITER '/'
21 #define TR_PATH_DELIMITER_STR "/"
22#endif
23
24#ifdef WIN32
25 #include <windows.h>
26 #define MAX_PATH_LENGTH  MAX_PATH
27#else
28 #define MAX_PATH_LENGTH  2048
29#endif
30
31#define MAX_STACK_ARRAY_SIZE 7168
32
33typedef struct tr_lock   tr_lock;
34typedef struct tr_thread tr_thread;
35
36void                tr_setConfigDir( tr_session * session,
37                                     const char * configDir );
38
39const char *        tr_getResumeDir( const tr_session * );
40
41const char *        tr_getTorrentDir( const tr_session * );
42
43const char *        tr_getClutchDir( const tr_session * );
44
45
46tr_thread*          tr_threadNew( void   ( *func )(void *),
47                                  void * arg );
48
49int                 tr_amInThread( const tr_thread * );
50
51tr_lock *           tr_lockNew( void );
52
53void                tr_lockFree( tr_lock * );
54
55void                tr_lockLock( tr_lock * );
56
57void                tr_lockUnlock( tr_lock * );
58
59int                 tr_lockHave( const tr_lock * );
60
61tr_lockfile_state_t tr_lockfile( const char * filename );
62
63#ifdef WIN32
64void *              mmap( void *ptr,
65                          long  size,
66                          long  prot,
67                          long  type,
68                          long  handle,
69                          long  arg );
70
71long                munmap( void *ptr,
72                            long  size );
73
74#endif
75
76#endif
Note: See TracBrowser for help on using the repository browser.