Updated to release 1.7.1
[siplcs.git] / src / uuid.h
blobe66f132508d93a67cb5e1efcbdd49f3f943301cf
1 /**
2 * @file uuid.h
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
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef SIPE_UUID_H_
20 #define SIPE_UUID_H_
22 #ifdef __NetBSD__
23 #pragma pack(1)
24 #else
25 #pragma pack(push, 1)
26 #endif
28 typedef struct _uuid_t {
29 guint32 time_low;
30 guint16 time_mid;
31 guint16 time_hi_and_version;
32 guint8 clock_seq_hi_and_reserved;
33 guint8 clock_seq_low;
34 guint8 node[6];
35 } sipe_uuid_t;
37 #ifdef __NetBSD__
38 #pragma pack()
39 #else
40 #pragma pack(pop)
41 #endif
43 char *generateUUIDfromEPID(const gchar *epid);
44 void printUUID(sipe_uuid_t *uuid, char *string);
45 void readUUID(const char *string, sipe_uuid_t *uuid);
46 void createUUIDfromHash(sipe_uuid_t *uuid, const unsigned char *hash);
48 char *sipe_get_epid(const char *self_sip_uri,
49 const char *hostname,
50 const char *ip_address);
53 #endif /* SIPE_UUID_H_ */