Created
May 11, 2012 18:49
-
-
Save samgreen/2661653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Server.h | |
// NEPEquipmentScanner | |
// | |
// Created by Sam Green on 3/3/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "AFHTTPClient.h" | |
#import "ScanBatch.h" | |
#import "ScanItem.h" | |
#import "EquipmentItem.h" | |
#import "Server.h" | |
@protocol ServerDelegate; | |
@interface Server : NSObject { | |
AFHTTPClient *httpClient; | |
id<ServerDelegate> delegate; | |
BOOL isConnected; | |
BOOL workOrderRequestCompleted; | |
NSInteger workOrderPageIndex; | |
BOOL locationRequestCompleted; | |
NSInteger locationPageIndex; | |
} | |
@property (nonatomic, assign) id<ServerDelegate> delegate; | |
@property (nonatomic, readonly) BOOL isConnected; | |
@property (nonatomic, retain) NSArray *cachedLocations; | |
@property (nonatomic, retain) NSArray *cachedWorkOrders; | |
+ (Server *)sharedServer; | |
- (void)loginUser:(NSString *)username withPass:(NSString *)password; | |
- (void)getAllLocations; | |
- (void)getActiveWorkOrders; | |
- (void)getEquipmentByID:(NSString *)equipmentID; | |
- (void)getBatchByID:(NSUInteger)batchID; | |
- (void)getBatchHistory; | |
- (void)uploadBatch:(ScanBatch *)aBatch; | |
@end | |
@protocol ServerDelegate <NSObject> | |
@optional | |
- (void)loginFailed; | |
- (void)loginSuccessful; | |
- (void)receivedLocations:(NSArray *)locations; | |
- (void)receivedWorkOrders:(NSArray *)workOrders; | |
- (void)receivedEquipmentItem:(EquipmentItem *)anItem; | |
- (void)receivedBatch:(ScanBatch *)aBatch; | |
- (void)receivedBatchHistory:(NSArray *)batchHistory; | |
- (void)uploadedBatch:(BOOL)successful; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment