}
}
- h = tr_sessionInit ("cli", configDir, false, &settings);
+ h = tr_sessionInit (configDir, false, &settings);
ctor = tr_ctorNew (h);
tr_formatter_mem_init (MEM_K, MEM_K_STR, MEM_M_STR, MEM_G_STR, MEM_T_STR);
tr_formatter_size_init (DISK_K, DISK_K_STR, DISK_M_STR, DISK_G_STR, DISK_T_STR);
tr_formatter_speed_init (SPEED_K, SPEED_K_STR, SPEED_M_STR, SPEED_G_STR, SPEED_T_STR);
- session = tr_sessionInit ("daemon", configDir, true, settings);
+ session = tr_sessionInit (configDir, true, settings);
tr_sessionSetRPCCallback (session, on_rpc_callback, NULL);
tr_logAddNamedInfo (NULL, "Using settings from \"%s\"", configDir);
tr_sessionSaveSettings (session, configDir, settings);
g_mkdir_with_parents (str, 0777);
/* initialize the libtransmission session */
- session = tr_sessionInit ("gtk", cbdata->config_dir, TRUE, gtr_pref_get_all ());
+ session = tr_sessionInit (cbdata->config_dir, TRUE, gtr_pref_get_all ());
gtr_pref_flag_set (TR_KEY_alt_speed_enabled, tr_sessionUsesAltSpeed (session));
gtr_pref_int_set (TR_KEY_peer_port, tr_sessionGetPeerPort (session));
if (!tr_variantDictFind (settings, q))
tr_variantDictAddInt (settings, q, verbose ? TR_LOG_DEBUG : TR_LOG_ERROR);
- session = tr_sessionInit ("libtransmission-test", sandbox, !verbose, settings);
+ session = tr_sessionInit (sandbox, !verbose, settings);
tr_free (sandbox);
tr_variantFree (&local_settings);
};
tr_session *
-tr_sessionInit (const char * tag,
- const char * configDir,
- bool messageQueuingEnabled,
- tr_variant * clientSettings)
+tr_sessionInit (const char * configDir,
+ bool messageQueuingEnabled,
+ tr_variant * clientSettings)
{
int64_t i;
tr_session * session;
session->udp6_socket = TR_BAD_SOCKET;
session->lock = tr_lockNew ();
session->cache = tr_cacheNew (1024*1024*2);
- session->tag = tr_strdup (tag);
session->magicNumber = SESSION_MAGIC_NUMBER;
tr_bandwidthConstruct (&session->bandwidth, session, NULL);
tr_variantInitList (&session->removedTorrents, 0);
}
tr_device_info_free (session->downloadDir);
tr_free (session->torrentDoneScript);
- tr_free (session->tag);
tr_free (session->configDir);
tr_free (session->resumeDir);
tr_free (session->torrentDir);
char * torrentDoneScript;
- char * tag;
char * configDir;
char * resumeDir;
char * torrentDir;
* tr_variantInitDict (&settings, 0);
* tr_sessionGetDefaultSettings (&settings);
* configDir = tr_getDefaultConfigDir ("Transmission");
- * session = tr_sessionInit ("mac", configDir, true, &settings);
+ * session = tr_sessionInit (configDir, true, &settings);
*
* tr_variantFree (&settings);
* @endcode
*
- * @param tag "gtk", "macosx", "daemon", etc... this is only for pre-1.30 resume files
* @param configDir where Transmission will look for resume files, blocklists, etc.
* @param messageQueueingEnabled if false, messages will be dumped to stderr
* @param settings libtransmission settings
* @see tr_sessionLoadSettings ()
* @see tr_getDefaultConfigDir ()
*/
-tr_session * tr_sessionInit (const char * tag,
- const char * configDir,
+tr_session * tr_sessionInit (const char * configDir,
bool messageQueueingEnabled,
struct tr_variant * settings);
[tbString UTF8String]);
const char * configDir = tr_getDefaultConfigDir("Transmission");
- fLib = tr_sessionInit("macosx", configDir, YES, &settings);
+ fLib = tr_sessionInit(configDir, YES, &settings);
tr_variantFree(&settings);
fConfigDirectory = [[NSString alloc] initWithUTF8String: configDir];
tr_variant settings;
tr_variantInitDict (&settings, 0);
tr_sessionLoadSettings (&settings, myConfigDir.toUtf8 ().constData (), "qt");
- mySession = tr_sessionInit ("qt", myConfigDir.toUtf8 ().constData (), true, &settings);
+ mySession = tr_sessionInit (myConfigDir.toUtf8 ().constData (), true, &settings);
tr_variantFree (&settings);
myRpc.start (mySession);