Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // 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
Add Comment
Please, Sign In to add comment