Ignore:
Timestamp:
Dec 14, 2008, 11:21:11 AM (12 years ago)
Author:
charles
Message:

(trunk libT) more semantic cleanup: tr_handle->tr_session, int->tr_bool, int->tr_port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r7373 r7385  
    353353
    354354static void
    355 migrateFiles( const tr_handle * handle )
     355migrateFiles( const tr_session * session )
    356356{
    357357    static int migrated = FALSE;
     
    364364
    365365        oldDir = getOldTorrentsDir( );
    366         newDir = tr_getTorrentDir( handle );
     366        newDir = tr_getTorrentDir( session );
    367367        moveFiles( oldDir, newDir );
    368368
    369369        oldDir = getOldCacheDir( );
    370         newDir = tr_getResumeDir( handle );
     370        newDir = tr_getResumeDir( session );
    371371        moveFiles( oldDir, newDir );
    372372    }
     
    374374
    375375void
    376 tr_setConfigDir( tr_handle *  handle,
     376tr_setConfigDir( tr_session * session,
    377377                 const char * configDir )
    378378{
    379379    char * path;
    380380
    381     handle->configDir = tr_strdup( configDir );
     381    session->configDir = tr_strdup( configDir );
    382382
    383383    path = tr_buildPath( configDir, RESUME_SUBDIR, NULL );
    384384    tr_mkdirp( path, 0777 );
    385     handle->resumeDir = path;
     385    session->resumeDir = path;
    386386
    387387    path = tr_buildPath( configDir, TORRENT_SUBDIR, NULL );
    388388    tr_mkdirp( path, 0777 );
    389     handle->torrentDir = path;
    390 
    391     migrateFiles( handle );
     389    session->torrentDir = path;
     390
     391    migrateFiles( session );
    392392}
    393393
    394394const char *
    395 tr_sessionGetConfigDir( const tr_handle * handle )
    396 {
    397     return handle->configDir;
     395tr_sessionGetConfigDir( const tr_session * session )
     396{
     397    return session->configDir;
    398398}
    399399
    400400const char *
    401 tr_getTorrentDir( const tr_handle * handle )
    402 {
    403     return handle->torrentDir;
     401tr_getTorrentDir( const tr_session * session )
     402{
     403    return session->torrentDir;
    404404}
    405405
    406406const char *
    407 tr_getResumeDir( const tr_handle * handle )
    408 {
    409     return handle->resumeDir;
     407tr_getResumeDir( const tr_session * session )
     408{
     409    return session->resumeDir;
    410410}
    411411
Note: See TracChangeset for help on using the changeset viewer.