78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
handler = [[class alloc] initWithScheme: scheme];
@try {
[handlers setObject: handler
forKey: scheme];
} @finally {
[handler release];
}
return true;
#ifdef OF_HAVE_THREADS
} @finally {
[mutex unlock];
}
#endif
}
+ (OF_KINDOF(OFURLHandler *))handlerForURL: (OFURL *)URL
{
#ifdef OF_HAVE_THREADS
[mutex lock];
@try {
#endif
return [handlers objectForKey: URL.scheme];
#ifdef OF_HAVE_THREADS
} @finally {
[mutex unlock];
}
#endif
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
|
<
<
>
>
>
>
|
>
>
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
handler = [[class alloc] initWithScheme: scheme];
@try {
[handlers setObject: handler
forKey: scheme];
} @finally {
[handler release];
}
#ifdef OF_HAVE_THREADS
} @finally {
[mutex unlock];
}
#endif
return true;
}
+ (OF_KINDOF(OFURLHandler *))handlerForURL: (OFURL *)URL
{
OF_KINDOF(OFURLHandler *) handler;
#ifdef OF_HAVE_THREADS
[mutex lock];
@try {
#endif
handler = [handlers objectForKey: URL.scheme];
#ifdef OF_HAVE_THREADS
} @finally {
[mutex unlock];
}
#endif
return handler;
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
|