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
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
2016-03-29 16:37:21 +00:00
|
|
|
#pragma once
|
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
|
|
|
|
2009-11-22 03:57:36 +00:00
|
|
|
typedef 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;
|
2009-11-20 04:38:19 +00:00
|
|
|
}
|
|
|
|
tr_magnet_info;
|
|
|
|
|
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);
|