rename uuid_t to tvh_uuid_t

This commit is contained in:
Damjan Marion 2014-05-16 23:16:46 +02:00
parent d46c06d770
commit 93a49b8253
6 changed files with 22 additions and 22 deletions

View file

@ -89,7 +89,7 @@ static void
config_migrate_v1_dvb_svcs
( const char *name, const char *netu, const char *muxu, htsmsg_t *channels )
{
uuid_t svcu;
tvh_uuid_t svcu;
htsmsg_t *c, *e, *svc;
htsmsg_field_t *f;
const char *str;
@ -139,7 +139,7 @@ config_migrate_v1_dvb_network
( const char *name, htsmsg_t *c, htsmsg_t *channels )
{
int i;
uuid_t netu, muxu;
tvh_uuid_t netu, muxu;
htsmsg_t *e, *net, *mux, *tun;
htsmsg_field_t *f;
const char *str, *type;
@ -321,7 +321,7 @@ config_migrate_v1_epggrab ( const char *path, htsmsg_t *channels )
static void
config_migrate_v1 ( void )
{
uuid_t netu, muxu, svcu, chnu;
tvh_uuid_t netu, muxu, svcu, chnu;
htsmsg_t *c, *m, *e, *l;
htsmsg_field_t *f;
uint32_t u32;
@ -450,7 +450,7 @@ static void
config_migrate_v2 ( void )
{
htsmsg_t *m;
uuid_t u;
tvh_uuid_t u;
char src[1024], dst[1024];
/* Do we have IPTV config to migrate ? */

View file

@ -102,7 +102,7 @@ idnode_insert(idnode_t *in, const char *uuid, const idclass_t *class)
{
idnode_t *c;
lock_assert(&global_lock);
uuid_t u;
tvh_uuid_t u;
if (uuid_init_bin(&u, uuid))
return -1;
memcpy(in->in_uuid, u.bin, sizeof(in->in_uuid));
@ -192,7 +192,7 @@ idnode_get_short_uuid (const idnode_t *in)
const char *
idnode_uuid_as_str(const idnode_t *in)
{
static uuid_t ret[16];
static tvh_uuid_t ret[16];
static uint8_t p = 0;
bin2hex(ret[p].hex, sizeof(ret[p].hex), in->in_uuid, sizeof(in->in_uuid));
const char *s = ret[p].hex;

View file

@ -187,7 +187,7 @@ linuxdvb_adapter_add ( const char *path )
extern int linuxdvb_adapter_mask;
int a, i, j, r, fd;
char fe_path[512], dmx_path[512], dvr_path[512];
uuid_t uuid;
tvh_uuid_t uuid;
linuxdvb_adapter_t *la = NULL;
struct dvb_frontend_info dfi;
SHA_CTX sha1;

View file

@ -256,7 +256,7 @@ satip_device_calc_bin_uuid( uint8_t *uuid, const char *satip_uuid )
}
static void
satip_device_calc_uuid( uuid_t *uuid, const char *satip_uuid )
satip_device_calc_uuid( tvh_uuid_t *uuid, const char *satip_uuid )
{
uint8_t uuidbin[20];
@ -287,7 +287,7 @@ static satip_device_t *
satip_device_create( satip_device_info_t *info )
{
satip_device_t *sd = calloc(1, sizeof(satip_device_t));
uuid_t uuid;
tvh_uuid_t uuid;
htsmsg_t *conf = NULL, *feconf = NULL;
char *argv[10];
int i, j, n, m, fenum, t2, save = 0;

View file

@ -103,9 +103,9 @@ uuid_init ( void )
/* Initialise binary */
int
uuid_init_bin ( uuid_t *u, const char *str )
uuid_init_bin ( tvh_uuid_t *u, const char *str )
{
memset(u, 0, sizeof(uuid_t));
memset(u, 0, sizeof(tvh_uuid_t));
if (str) {
return hex2bin(u->bin, sizeof(u->bin), str);
} else if (read(fd, u->bin, sizeof(u->bin)) != sizeof(u->bin)) {
@ -117,9 +117,9 @@ uuid_init_bin ( uuid_t *u, const char *str )
/* Initialise hex string */
int
uuid_init_hex ( uuid_t *u, const char *str )
uuid_init_hex ( tvh_uuid_t *u, const char *str )
{
uuid_t tmp;
tvh_uuid_t tmp;
if (uuid_init_bin(&tmp, str))
return 1;
return uuid_bin2hex(&tmp, u);
@ -127,9 +127,9 @@ uuid_init_hex ( uuid_t *u, const char *str )
/* Convert bin to hex string */
int
uuid_bin2hex ( const uuid_t *a, uuid_t *b )
uuid_bin2hex ( const tvh_uuid_t *a, tvh_uuid_t *b )
{
uuid_t tmp;
tvh_uuid_t tmp;
memset(&tmp, 0, sizeof(tmp));
bin2hex(tmp.hex, sizeof(tmp.hex), a->bin, sizeof(a->bin));
memcpy(b, &tmp, sizeof(tmp));
@ -138,9 +138,9 @@ uuid_bin2hex ( const uuid_t *a, uuid_t *b )
/* Convert hex string to bin (in place) */
int
uuid_hex2bin ( const uuid_t *a, uuid_t *b )
uuid_hex2bin ( const tvh_uuid_t *a, tvh_uuid_t *b )
{
uuid_t tmp;
tvh_uuid_t tmp;
memset(&tmp, 0, sizeof(tmp));
if (hex2bin(tmp.bin, sizeof(tmp.bin), a->hex))
return 1;

View file

@ -31,30 +31,30 @@ typedef struct uuid {
uint8_t bin[UUID_BIN_SIZE];
char hex[UUID_HEX_SIZE];
};
} uuid_t;
} tvh_uuid_t;
/* Initialise subsystem */
void uuid_init ( void );
/* Initialise binary */
int uuid_init_bin ( uuid_t *u, const char *str );
int uuid_init_bin ( tvh_uuid_t *u, const char *str );
/* Initialise hex string */
int uuid_init_hex ( uuid_t *u, const char *str );
int uuid_init_hex ( tvh_uuid_t *u, const char *str );
/**
* Convert bin to hex string
*
* Note: conversion is done such that a and b can be the same
*/
int uuid_bin2hex ( const uuid_t *a, uuid_t *b );
int uuid_bin2hex ( const tvh_uuid_t *a, tvh_uuid_t *b );
/**
* Convert hex string to bin (in place)
*
* Note: conversion is done such that a and b can be the same
*/
int uuid_hex2bin ( const uuid_t *a, uuid_t *b );
int uuid_hex2bin ( const tvh_uuid_t *a, tvh_uuid_t *b );
/**
* Hex string to binary