2 // Copyright (C) 2008 Francesco Salvestrini
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this program; if not, write to the Free Software Foundation, Inc.,
16 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef LIBS_NET_UUID_H
20 #define LIBS_NET_UUID_H
31 UUID(const std::string
& u
);
36 operator std::string(void);
37 bool operator ==(const UUID
& rhs
);
38 UUID
& operator =(const UUID
& rhs
);
39 friend std::ostream
& operator <<(std::ostream
& stream
,
41 friend std::istream
& operator >>(std::istream
& stream
,
50 uint16_t time_high_and_version
;
55 bool grab_4hex(const std::string
& u
,
56 std::string::size_type s
,
57 std::string::size_type e
,
59 bool grab_8hex(const std::string
& u
,
60 std::string::size_type s
,
61 std::string::size_type e
,
63 bool grab_12hex(const std::string
& u
,
64 std::string::size_type s
,
65 std::string::size_type e
,
70 #endif // LIBS_NET_UUID_H