mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Revert "NSURLSession Reimplementation (#411)"
This reverts commit 07233534e6
.
This commit is contained in:
parent
07233534e6
commit
3fedf31c2d
50 changed files with 7197 additions and 5391 deletions
30
Source/GSTaskRegistry.h
Normal file
30
Source/GSTaskRegistry.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef INCLUDED_GSTASKREGISTRY_H
|
||||
#define INCLUDED_GSTASKREGISTRY_H
|
||||
|
||||
#import "common.h"
|
||||
|
||||
@class NSArray;
|
||||
@class NSURLSessionTask;
|
||||
|
||||
/*
|
||||
* This helper class keeps track of all tasks.
|
||||
*
|
||||
* Each `NSURLSession` has a `GSTaskRegistry` for its running tasks.
|
||||
*
|
||||
* - Note: This must **only** be accessed on the owning session's work queue.
|
||||
*/
|
||||
@interface GSTaskRegistry : NSObject
|
||||
|
||||
- (void ) addTask: (NSURLSessionTask*)task;
|
||||
|
||||
- (void) removeTask: (NSURLSessionTask*)task;
|
||||
|
||||
- (void) notifyOnTasksCompletion: (void (^)(void))tasksCompletion;
|
||||
|
||||
- (NSArray*) allTasks;
|
||||
|
||||
- (BOOL) isEmpty;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue