|
Data Structures |
struct | extension |
struct | shared_file |
struct | gnutella_search_results_out |
Defines |
#define | SHARE_F_HAS_DIGEST 0x00000001 /**< Digest is set */ |
| Digest is set.
|
#define | SHARE_F_RECOMPUTING 0x00000002 /**< Digest being recomputed */ |
| Digest being recomputed.
|
#define | SHARE_REBUILDING ((struct shared_file *) 0x1) |
Typedefs |
typedef shared_file | shared_file_t |
Enumerations |
enum | share_mime_type { SHARE_M_APPLICATION_BINARY = 0,
SHARE_M_IMAGE_PNG,
SHARE_M_TEXT_PLAIN
} |
| Known MIME content types. More...
|
Functions |
void | share_init (void) |
| Initialization of the sharing library.
|
void | share_close (void) |
| Shutdown cleanup.
|
const gchar * | share_mime_type (enum share_mime_type type) |
| Returns the MIME content type string.
|
shared_file_t * | shared_file (guint idx) |
| Given a valid index, returns the `struct shared_file' entry describing the shared file bearing that index if found, NULL if not found (invalid index) and SHARE_REBUILDING when we're rebuilding the library.
|
shared_file_t * | shared_file_by_name (const gchar *basename) |
| Given a file basename, returns the `struct shared_file' entry describing the shared file bearing that basename, provided it is unique, NULL if we either don't have a unique filename or SHARE_REBUILDING if the library is being rebuilt.
|
shared_file_t * | shared_file_ref (shared_file_t *sf) |
| Add one more reference to a shared_file_t.
|
shared_file_t * | shared_file_by_sha1 (gchar *sha1_digest) |
| Take a given binary SHA1 digest, and return the corresponding shared_file if we have it.
|
shared_file_t * | shared_special (const gchar *path) |
| Look up a possibly shared special file, updating the entry with current file size and modification time.
|
void | shared_file_unref (shared_file_t *sf) |
| Remove one reference to a shared_file_t, freeing entry if there are no reference left.
|
gboolean | search_request (struct gnutella_node *n, struct query_hashvec *qhv) |
void | parse_extensions (const gchar *) |
| Get the file extensions to scan.
|
gchar * | get_file_path (gint) |
void | shared_dirs_update_prop (void) |
| Update the property holding the shared directories.
|
gboolean | shared_dirs_parse (const gchar *) |
| Parses the given string and updated the internal list of shared dirs.
|
size_t | compact_query (gchar *search) |
| Remove unnecessary ballast from a query string, in-place.
|
void | query_strip_oob_flag (struct gnutella_node *n, gchar *data) |
void | query_set_oob_flag (struct gnutella_node *n, gchar *data) |
void | set_sha1 (struct shared_file *, const gchar *sha1_digest) |
gboolean | sha1_hash_available (const struct shared_file *) |
| Predicate returning TRUE if the SHA1 hash is available for a given shared_file, FALSE otherwise.
|
gboolean | sha1_hash_is_uptodate (struct shared_file *sf) |
| Predicate returning TRUE if the SHA1 hash is available AND is up to date for the shared file.
|
void | use_map_on_query (gchar *query, int len) |
| Apply the proper charset mapping on the query, depending on their locale, so that the query has no accent.
|
Variables |
GSList * | extensions |
| Global Data.
|
GSList * | shared_dirs |
| Global Data.
|