|
Defines |
| #define | GENERATE_ATOM_FREE_NULL(name, type) |
| | These functions dereference the given atom and nullify the pointer.
|
| #define | GENERATE_ATOM_CHANGE(name, type) |
| | These functions set an atom to a new value.
|
Enumerations |
| enum | atom_type {
ATOM_STRING,
ATOM_GUID,
ATOM_SHA1,
ATOM_TTH,
ATOM_UINT64,
ATOM_FILESIZE,
NUM_ATOM_TYPES
} |
Functions |
| gconstpointer | atom_get (enum atom_type type, gconstpointer key) |
| | Get atom of given `type', whose value is `key'.
|
| void | atom_free (enum atom_type type, gconstpointer key) |
| | Remove one reference from atom.
|
| const gchar * | atom_str_get (const gchar *k) |
| void | atom_str_free (const gchar *k) |
| const gchar * | atom_guid_get (const gchar *k) |
| void | atom_guid_free (const gchar *k) |
| const struct sha1 * | atom_sha1_get (const struct sha1 *k) |
| void | atom_sha1_free (const struct sha1 *k) |
| const struct tth * | atom_tth_get (const struct tth *k) |
| void | atom_tth_free (const struct tth *k) |
| const guint64 * | atom_uint64_get (const guint64 *k) |
| void | atom_uint64_free (const guint64 *k) |
| const filesize_t * | atom_filesize_get (const filesize_t *k) |
| void | atom_filesize_free (const filesize_t *k) |
| void | atoms_init (void) |
| | Initialize atom structures.
|
| void | atoms_close (void) |
| | Shutdown atom structures, freeing all remaining atoms.
|
| guint | filesize_hash (gconstpointer key) |
| | Calculate the 32-bit hash of a filesize_t.
|
| gint | filesize_eq (gconstpointer a, gconstpointer b) |
| | Test two filesize_t for equality.
|
| guint | sha1_hash (gconstpointer key) |
| | Hash a SHA1 (20 bytes).
|
| gint | sha1_eq (gconstpointer a, gconstpointer b) |
| | Test two SHA1s for equality.
|
| guint | tth_hash (gconstpointer key) |
| | Hash a TTH (24 bytes).
|
| gint | tth_eq (gconstpointer a, gconstpointer b) |
| | Test two TTHs for equality.
|
| guint | guid_hash (gconstpointer key) |
| | Hash a GUID (16 bytes).
|
| gint | guid_eq (gconstpointer a, gconstpointer b) |
| | Test two GUIDs for equality.
|
| guint | uint64_hash (gconstpointer key) |
| | Calculate the 32-bit hash of a 64-bit integer.
|
| gint | uint64_eq (gconstpointer a, gconstpointer b) |
| | Test two 64-bit integers for equality.
|
| guint | binary_hash (const guchar *key, guint len) |
| | Hash `len' bytes starting from `key'.
|