1/*
2 * Copyright 2007, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef GUID_H
6#define GUID_H
7
8
9#include <SupportDefs.h>
10
11
12typedef struct guid {
13	uint32	data1;
14	uint16	data2;
15	uint16	data3;
16	uint8	data4[8];
17
18	inline bool operator==(const guid &other) const;
19	inline bool operator!=(const guid &other) const;
20} _PACKED guid_t;
21
22
23inline bool
24guid_t::operator==(const guid_t &other) const
25{
26	return data1 == other.data1
27		&& data2 == other.data2
28		&& data3 == other.data3
29		&& *(uint64 *)data4 == *(uint64 *)other.data4;
30}
31
32
33inline bool
34guid_t::operator!=(const guid_t &other) const
35{
36	return data1 != other.data1
37		|| data2 != other.data2
38		|| data3 != other.data3
39		|| *(uint64 *)data4 != *(uint64 *)other.data4;
40}
41
42#endif	/* GUID_H */
43
44