ObjFW  Diff

Differences From Artifact [d4501677af]:

To Artifact [98204d10fd]:


27
28
29
30
31
32
33

34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







+







#import "OFEmbeddedURIHandler.h"
#ifdef OF_HAVE_FILES
# import "OFFileURIHandler.h"
#endif
#if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_THREADS)
# import "OFHTTPURIHandler.h"
#endif
#import "OFTarURIHandler.h"
#import "OFZIPURIHandler.h"

#import "OFUnsupportedProtocolException.h"

static OFMutableDictionary OF_GENERIC(OFString *, OFURIHandler *) *handlers;
#ifdef OF_HAVE_THREADS
static OFMutex *mutex;
65
66
67
68
69
70
71

72
73
74
75
76
77
78
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80







+







#ifdef OF_HAVE_FILES
	[self registerClass: [OFFileURIHandler class] forScheme: @"file"];
#endif
#if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_THREADS)
	[self registerClass: [OFHTTPURIHandler class] forScheme: @"http"];
	[self registerClass: [OFHTTPURIHandler class] forScheme: @"https"];
#endif
	[self registerClass: [OFTarURIHandler class] forScheme: @"of-tar"];
	[self registerClass: [OFZIPURIHandler class] forScheme: @"of-zip"];
}

+ (bool)registerClass: (Class)class forScheme: (OFString *)scheme
{
#ifdef OF_HAVE_THREADS
	[mutex lock];