Mercurial > hg > soniczoomios
comparison ServerComms.h @ 30:c0a6f7c66719
Josh M test "in house" version 0.1
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Wed, 27 Feb 2013 11:39:07 +0000 |
parents | fabb3a5cdfc9 |
children |
comparison
equal
deleted
inserted
replaced
29:fabb3a5cdfc9 | 30:c0a6f7c66719 |
---|---|
1 // | 1 // |
2 // ServerComms.h | 2 // ServerComms.h |
3 // sonicZoom | 3 // httpPost |
4 // | 4 // |
5 // Created by Robert Tubb on 21/02/2013. | 5 // Created by Robert Tubb on 24/02/2013. |
6 // | 6 // Copyright (c) 2013 Robert Tubb. All rights reserved. |
7 // | 7 // |
8 | 8 |
9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
10 | 10 |
11 @interface ServerComms : NSObject <NSURLConnectionDelegate> | 11 @interface ServerComms : NSObject <NSURLConnectionDataDelegate> |
12 -(void)test; | 12 { |
13 -(void)postRequest:(NSString *)msgbody; | 13 NSURL *serverURL; |
14 NSString *filePath; | |
15 id delegate; | |
16 SEL doneSelector; | |
17 SEL errorSelector; | |
14 | 18 |
15 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; | 19 BOOL uploadDidSucceed; |
16 - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data; | 20 } |
17 - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse; | 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 | |
18 @end | 36 @end |