forked from johndbritton/teleport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TPFileSerialization.h
55 lines (39 loc) · 1.18 KB
/
TPFileSerialization.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
53
54
55
//
// TPFileSerialization.h
// Streams
//
// Created by Julien Robert on 09/10/09.
// Copyright 2009 Apple. All rights reserved.
//
#import <Cocoa/Cocoa.h>
extern NSString * TPFileArchiverNameKey;
extern NSString * TPFileArchiverTypeKey;
@class TPFileArchiver;
@protocol TPFileArchiverDelegate <NSObject>
- (void)fileArchiver:(TPFileArchiver*)archiver hasDataAvailable:(NSData*)data;
- (void)fileArchiverDidCompleteReading:(TPFileArchiver*)archiver;
@end
@interface TPFileArchiver : NSObject
{
id <TPFileArchiverDelegate> _delegate;
NSArray * _paths;
NSTask * _readTask;
NSPipe * _readPipe;
NSFileHandle * _readFileHandle;
}
- (instancetype) initForReadingFilesAtPaths:(NSArray*)paths delegate:(id<TPFileArchiverDelegate>)delegate NS_DESIGNATED_INITIALIZER;
@property (nonatomic, readonly, copy) NSArray *representedFiles;
- (void)startReading;
- (void)continueReading;
@end
@interface TPFileUnarchiver : NSObject
{
NSTask * _writeTask;
NSPipe * _writePipe;
NSFileHandle * _writeFileHandle;
}
- (instancetype) initForWritingAtPath:(NSString*)path NS_DESIGNATED_INITIALIZER;
- (void)startWriting;
- (void)close;
- (void)writeData:(NSData*)data;
@end