mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-06-23 06:25:24 +00:00
Feature: Added mount_identifier_get_mount() and mount_identifier_compare()
This commit is contained in:
parent
6c1233402d
commit
673dfb734c
|
@ -26,12 +26,12 @@ struct mount_identifier_tag {
|
||||||
|
|
||||||
REFOBJECT_DEFINE_TYPE(mount_identifier_t);
|
REFOBJECT_DEFINE_TYPE(mount_identifier_t);
|
||||||
|
|
||||||
static int mount_identifier_compare(void *compare_arg, void *a, void *b)
|
static int mount_identifier_compare__for_tree(void *compare_arg, void *a, void *b)
|
||||||
{
|
{
|
||||||
const char *id_a, *id_b;
|
const char *id_a, *id_b;
|
||||||
|
|
||||||
id_a = refobject_get_name(a);
|
id_a = mount_identifier_get_mount(a);
|
||||||
id_b = refobject_get_name(b);
|
id_b = mount_identifier_get_mount(b);
|
||||||
|
|
||||||
if (!id_a || !id_b || id_a == id_b) {
|
if (!id_a || !id_b || id_a == id_b) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,3 +62,8 @@ mount_identifier_t * mount_identifier_new(const char *mount)
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mount_identifier_compare(mount_identifier_t *a, mount_identifier_t *b)
|
||||||
|
{
|
||||||
|
return mount_identifier_compare__for_tree(NULL, a, b);
|
||||||
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@ REFOBJECT_FORWARD_TYPE(mount_identifier_t);
|
||||||
void navigation_initialize(void);
|
void navigation_initialize(void);
|
||||||
void navigation_shutdown(void);
|
void navigation_shutdown(void);
|
||||||
|
|
||||||
mount_identifier_t * mount_identifier_new(const char *mount);
|
mount_identifier_t * mount_identifier_new(const char *mount);
|
||||||
|
#define mount_identifier_get_mount(identifier) refobject_get_name((identifier))
|
||||||
|
int mount_identifier_compare(mount_identifier_t *a, mount_identifier_t *b);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user