2013-12-20 12:26:22 +00:00
|
|
|
/* Interface for NSUUID for GNUStep
|
|
|
|
Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Written by: Graham Lee <graham@iamleeg.com>
|
|
|
|
Created: 2013
|
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2019-12-09 23:36:00 +00:00
|
|
|
Lesser General Public License for more details.
|
2013-12-20 12:26:22 +00:00
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free
|
2024-11-07 13:37:59 +00:00
|
|
|
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
2013-12-20 12:26:22 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NSUUID_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSUUID_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
|
2013-12-20 13:32:29 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
2013-12-20 12:26:22 +00:00
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2013-12-20 13:32:29 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8,GS_API_LATEST)
|
|
|
|
|
2013-12-20 12:26:22 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-12-20 13:28:45 +00:00
|
|
|
typedef uint8_t gsuuid_t[16];
|
|
|
|
|
|
|
|
#if defined(uuid_t)
|
|
|
|
#undef uuid_t
|
|
|
|
#endif
|
|
|
|
#define uuid_t gsuuid_t
|
|
|
|
|
|
|
|
|
2013-12-20 12:26:22 +00:00
|
|
|
@class NSString;
|
|
|
|
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2013-12-20 12:26:22 +00:00
|
|
|
@interface NSUUID : NSObject <NSCopying, NSCoding>
|
|
|
|
{
|
|
|
|
@private
|
2013-12-20 13:28:45 +00:00
|
|
|
gsuuid_t uuid;
|
2013-12-20 12:26:22 +00:00
|
|
|
}
|
|
|
|
|
2021-11-24 16:44:40 +00:00
|
|
|
+ (instancetype) UUID;
|
|
|
|
- (instancetype) initWithUUIDString: (NSString *)string;
|
|
|
|
- (instancetype) initWithUUIDBytes: (gsuuid_t)bytes;
|
|
|
|
- (NSString *) UUIDString;
|
|
|
|
- (void) getUUIDBytes: (gsuuid_t)bytes;
|
2013-12-20 12:26:22 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-12-20 13:32:29 +00:00
|
|
|
#endif
|
|
|
|
|
2013-12-20 12:26:22 +00:00
|
|
|
#endif /* __NSUUID_h_GNUSTEP_BASE_INCLUDE */
|