-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathObjGitServerHandler.h
72 lines (57 loc) · 2.14 KB
/
ObjGitServerHandler.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// ObjGitServerHandler.h
// ObjGit
//
#import <Foundation/Foundation.h>
#include <CommonCrypto/CommonDigest.h>
#import "ObjGitObject.h"
@interface ObjGitServerHandler : NSObject {
NSInputStream* inStream;
NSOutputStream* outStream;
ObjGit* gitRepo;
NSString* gitPath;
NSMutableArray* refsRead;
NSMutableArray* needRefs;
NSMutableDictionary* refDict;
int capabilitiesSent;
}
@property(assign, readwrite) NSInputStream *inStream;
@property(assign, readwrite) NSOutputStream *outStream;
@property(assign, readwrite) ObjGit *gitRepo;
@property(assign, readwrite) NSString *gitPath;
@property(assign, readwrite) NSMutableArray *refsRead;
@property(assign, readwrite) NSMutableArray *needRefs;
@property(assign, readwrite) NSMutableDictionary *refDict;
@property(assign, readwrite) int capabilitiesSent;
- (void) initWithGit:(ObjGit *)git gitPath:(NSString *)gitRepoPath input:(NSInputStream *)streamIn output:(NSOutputStream *)streamOut;
- (void) handleRequest;
- (void) uploadPack:(NSString *)repositoryName;
- (void) receiveNeeds;
- (void) uploadPackFile;
- (void) sendNack;
- (void) sendPackData;
- (void) receivePack:(NSString *)repositoryName;
- (void) gatherObjectShasFromCommit:(NSString *)shaValue;
- (void) gatherObjectShasFromTree:(NSString *)shaValue;
- (void) respondPack:(uint8_t *)buffer length:(int)size checkSum:(CC_SHA1_CTX *)checksum;
- (void) sendRefs;
- (void) sendRef:(NSString *)refName sha:(NSString *)shaString;
- (void) readRefs;
- (void) readPack;
- (void) writeRefs;
- (NSData *) readData:(int)size;
- (NSString *) typeString:(int)type;
- (int) typeInt:(NSString *)type;
- (void) unpackDeltified:(int)type size:(int)size;
- (NSData *) patchDelta:(NSData *)deltaData withObject:(ObjGitObject *)gitObject;
- (NSArray *) patchDeltaHeaderSize:(NSData *)deltaData position:(unsigned long)position;
- (NSString *)readServerSha;
- (int) readPackHeader;
- (void) unpackObject;
- (void) longVal:(uint32_t)raw toByteBuffer:(uint8_t *)buffer;
- (void) packetFlush;
- (void) writeServer:(NSString *)dataWrite;
- (void) writeServerLength:(unsigned int)length;
- (void) sendPacket:(NSString *)dataSend;
- (NSString *) packetReadLine;
@end