-
Notifications
You must be signed in to change notification settings - Fork 9
/
L0UUID.h
52 lines (39 loc) · 1.33 KB
/
L0UUID.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// L0UUID.h
// Orma
//
// Created by ∞ on 12/08/08.
// Copyright 2008 Emanuele Vulcano. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
@interface L0UUID : NSObject <NSCopying, NSCoding> {
__strong CFUUIDRef uuid;
}
// Creates a newly generated UUID.
- (id) init;
// Creates a UUID that wraps an existing Core Fondation UUID object.
- (id) initWithUUID:(CFUUIDRef) uuid;
// Creates a UUID from a correctly formatted string.
- (id) initWithString:(NSString*) string;
// Creates a UUID from the given bytes. They will be copied.
- (id) initWithBytes:(CFUUIDBytes*) bytes;
// Creates a UUID from the contents of NSData, which must wrap a
// CFUUIDBytes structure.
- (id) initWithData:(NSData*) data;
// Retrieves the wrapped Core Foundation UUID object.
- (CFUUIDRef) CFUUID;
// Returns a string of the kind '68753A44-4D6F-1226-9C60-0050E4C00067' for
// this UUID.
@property(readonly) NSString* stringValue;
// Returns the bytes this UUID is made of.
@property(readonly) CFUUIDBytes UUIDBytes;
// Returns a NSData object wrapping what would be returned by
// a call to -bytes.
@property(readonly) NSData* dataValue;
+ (id) UUID;
+ (id) UUIDWithUUID:(CFUUIDRef) uuid;
+ (id) UUIDWithString:(NSString*) string;
+ (id) UUIDWithBytes:(CFUUIDBytes*) bytes;
+ (id) UUIDWithData:(NSData*) data;
@end