2009-11-20 04:38:19 +00:00
|
|
|
/*
|
2014-01-18 20:56:57 +00:00
|
|
|
* This file Copyright (C) 2010-2014 Mnemosyne LLC
|
2009-11-20 04:38:19 +00:00
|
|
|
*
|
2014-01-21 03:10:30 +00:00
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
2014-01-19 01:09:44 +00:00
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
2009-11-20 04:38:19 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-11-14 20:21:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
2010-01-14 14:20:49 +00:00
|
|
|
#ifndef __TRANSMISSION__
|
2017-04-19 12:04:45 +00:00
|
|
|
#error only libtransmission should #include this header.
|
2010-01-14 14:20:49 +00:00
|
|
|
#endif
|
|
|
|
|
2020-08-11 18:11:55 +00:00
|
|
|
#include "tr-macros.h"
|
2009-11-20 04:38:19 +00:00
|
|
|
#include "transmission.h"
|
2012-12-14 04:34:42 +00:00
|
|
|
#include "variant.h"
|
2009-11-20 04:38:19 +00:00
|
|
|
|
2021-10-06 14:26:07 +00:00
|
|
|
struct tr_magnet_info
|
2009-11-20 04:38:19 +00:00
|
|
|
{
|
2017-04-19 12:04:45 +00:00
|
|
|
uint8_t hash[20];
|
2009-11-29 17:49:58 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
char* displayName;
|
2009-11-29 17:49:58 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
int trackerCount;
|
|
|
|
char** trackers;
|
2009-11-29 17:49:58 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
int webseedCount;
|
|
|
|
char** webseeds;
|
2021-10-06 14:26:07 +00:00
|
|
|
};
|
2009-11-20 04:38:19 +00:00
|
|
|
|
2017-04-20 16:02:19 +00:00
|
|
|
tr_magnet_info* tr_magnetParse(char const* uri);
|
2009-11-20 04:38:19 +00:00
|
|
|
|
2012-12-14 04:34:42 +00:00
|
|
|
struct tr_variant;
|
2010-02-02 22:45:22 +00:00
|
|
|
|
2017-04-20 16:02:19 +00:00
|
|
|
void tr_magnetCreateMetainfo(tr_magnet_info const*, tr_variant*);
|
2009-11-20 04:38:19 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
void tr_magnetFree(tr_magnet_info* info);
|