Mercurial > hg > tweakathon2ios
comparison ServerComms.h @ 0:a223551fdc1f
First commit - copy from tweakathlon.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 10 Oct 2014 11:46:42 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a223551fdc1f |
---|---|
1 // | |
2 // ServerComms.h | |
3 // httpPost | |
4 // | |
5 // Created by Robert Tubb on 24/02/2013. | |
6 // Copyright (c) 2013 Robert Tubb. All rights reserved. | |
7 // | |
8 | |
9 #import <Foundation/Foundation.h> | |
10 | |
11 @interface ServerComms : NSObject <NSURLConnectionDataDelegate> | |
12 { | |
13 NSURL *serverURL; | |
14 NSString *filePath; | |
15 id delegate; | |
16 SEL doneSelector; | |
17 SEL errorSelector; | |
18 | |
19 BOOL uploadDidSucceed; | |
20 } | |
21 | |
22 - (id)initWithURL: (NSURL *)serverURL | |
23 filePath: (NSString *)filePath | |
24 delegate: (id)delegate | |
25 doneSelector: (SEL)doneSelector | |
26 errorSelector: (SEL)errorSelector; | |
27 | |
28 - (NSString *)filePath; | |
29 | |
30 -(BOOL)doSyncPostRequest:(NSString *)type withData:(NSString *)data; | |
31 -(BOOL)doPostRequest:(NSString *)type withData:(NSString *)data; | |
32 @property (strong,nonatomic) NSMutableData * data; | |
33 @property BOOL requestInProgress; | |
34 @property (strong, nonatomic) NSString * currentRequestType; | |
35 | |
36 @end |