Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

magnet.h File Reference


Detailed Description

Handling of magnet links.

Author:
Christian Biere
Date:
2006

#include "common.h"
#include "lib/host_addr.h"
#include "lib/misc.h"

Go to the source code of this file.

Data Structures

struct  magnet_source
struct  magnet_resource

Functions

magnet_resourcemagnet_parse (const gchar *url, const gchar **error_str)
magnet_sourcemagnet_parse_exact_source (const gchar *uri, const gchar **error_str)
void magnet_source_free (struct magnet_source **ms_ptr)
void magnet_resource_free (struct magnet_resource **res_ptr)
magnet_resourcemagnet_resource_new (void)
magnet_sourcemagnet_source_new (void)
gchar * magnet_to_string (struct magnet_resource *res)
void magnet_set_filesize (struct magnet_resource *res, filesize_t size)
void magnet_set_display_name (struct magnet_resource *res, const gchar *name)
gboolean magnet_set_exact_topic (struct magnet_resource *res, const gchar *topic)
void magnet_set_sha1 (struct magnet_resource *res, const struct sha1 *sha1)
void magnet_set_tth (struct magnet_resource *res, const struct tth *tth)
void magnet_add_search (struct magnet_resource *res, const gchar *search)
void magnet_add_source_by_url (struct magnet_resource *res, const gchar *url)
void magnet_add_sha1_source (struct magnet_resource *res, const struct sha1 *sha1, const host_addr_t addr, const guint16 port, const gchar *guid)
void magnet_set_parq_id (struct magnet_resource *res, const gchar *parq_id)
 This is a bit of a hack (an extension anyway) and should only be used for magnets with a single logical source because the PARQ ID is only valid for a certain source.


Function Documentation

void magnet_add_search struct magnet_resource res,
const gchar *  search
 

void magnet_add_sha1_source struct magnet_resource res,
const struct sha1 sha1,
const host_addr_t  addr,
const guint16  port,
const gchar *  guid
 

void magnet_add_source_by_url struct magnet_resource res,
const gchar *  url
 

struct magnet_resource* magnet_parse const gchar *  url,
const gchar **  error_str
 

struct magnet_source* magnet_parse_exact_source const gchar *  uri,
const gchar **  error_str
 

void magnet_resource_free struct magnet_resource **  res_ptr  ) 
 

struct magnet_resource* magnet_resource_new void   ) 
 

void magnet_set_display_name struct magnet_resource res,
const gchar *  name
 

gboolean magnet_set_exact_topic struct magnet_resource res,
const gchar *  topic
 

void magnet_set_filesize struct magnet_resource res,
filesize_t  size
 

void magnet_set_parq_id struct magnet_resource res,
const gchar *  parq_id
 

This is a bit of a hack (an extension anyway) and should only be used for magnets with a single logical source because the PARQ ID is only valid for a certain source.

void magnet_set_sha1 struct magnet_resource res,
const struct sha1 sha1
 

void magnet_set_tth struct magnet_resource res,
const struct tth tth
 

void magnet_source_free struct magnet_source **  ms_ptr  ) 
 

struct magnet_source* magnet_source_new void   ) 
 

gchar* magnet_to_string struct magnet_resource res  ) 
 


Generated on Sat Jun 30 17:53:28 2007 for gtk-gnutella by  doxygen 1.3.9.1