Browse Source

change UUID implementation to use integers and serial counters

tags/0.124.0
Paul Davis 11 years ago
parent
commit
b7f896437a
3 changed files with 14 additions and 9 deletions
  1. +1
    -1
      jack.h
  2. +1
    -1
      types.h
  3. +12
    -7
      uuid.h

+ 1
- 1
jack.h View File

@@ -652,7 +652,7 @@ const char *jack_port_name (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
*
* @see jack_uuid_to_string() to convert into a string representation
*/
void jack_port_uuid (const jack_port_t *port, jack_uuid_t) JACK_OPTIONAL_WEAK_EXPORT;
jack_uuid_t jack_port_uuid (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;

/**
* @return the short name of the jack_port_t (not including the @a


+ 1
- 1
types.h View File

@@ -25,7 +25,7 @@
#include <pthread.h>
#include <uuid/uuid.h>

typedef uuid_t jack_uuid_t;
typedef uint64_t jack_uuid_t;

typedef int32_t jack_shmsize_t;



+ 12
- 7
uuid.h View File

@@ -28,14 +28,19 @@ extern "C" {

#define JACK_UUID_SIZE 36
#define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */
#define JACK_UUID_EMPTY_INITIALIZER 0

extern void jack_uuid_generate (jack_uuid_t);
extern int jack_uuid_compare (const jack_uuid_t, const jack_uuid_t);
extern void jack_uuid_copy (jack_uuid_t dst, const jack_uuid_t src);
extern void jack_uuid_clear (jack_uuid_t);
extern int jack_uuid_parse (const char *buf, jack_uuid_t);
extern void jack_uuid_unparse (const jack_uuid_t, char buf[JACK_UUID_STRING_SIZE]);
extern int jack_uuid_empty (const jack_uuid_t);
extern jack_uuid_t jack_client_uuid_generate ();
extern jack_uuid_t jack_port_uuid_generate (uint32_t port_id);

extern uint32_t jack_uuid_to_index (jack_uuid_t);

extern int jack_uuid_compare (jack_uuid_t, jack_uuid_t);
extern void jack_uuid_copy (jack_uuid_t* dst, jack_uuid_t src);
extern void jack_uuid_clear (jack_uuid_t*);
extern int jack_uuid_parse (const char *buf, jack_uuid_t*);
extern void jack_uuid_unparse (jack_uuid_t, char buf[JACK_UUID_STRING_SIZE]);
extern int jack_uuid_empty (jack_uuid_t);

#ifdef __cplusplus
} /* namespace */


Loading…
Cancel
Save