Guest User

Untitled

a guest
Oct 9th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. //
  2. // Server.h
  3. // NEPEquipmentScanner
  4. //
  5. // Created by Sam Green on 3/3/12.
  6. // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
  7. //
  8.  
  9. #import <Foundation/Foundation.h>
  10.  
  11. #import "AFHTTPClient.h"
  12. #import "ScanBatch.h"
  13. #import "ScanItem.h"
  14. #import "EquipmentItem.h"
  15. #import "Server.h"
  16.  
  17. @protocol ServerDelegate;
  18.  
  19. @interface Server : NSObject {
  20. AFHTTPClient *httpClient;
  21.  
  22. id<ServerDelegate> delegate;
  23.  
  24. BOOL isConnected;
  25.  
  26. BOOL workOrderRequestCompleted;
  27. NSInteger workOrderPageIndex;
  28.  
  29. BOOL locationRequestCompleted;
  30. NSInteger locationPageIndex;
  31. }
  32.  
  33. @property (nonatomic, assign) id<ServerDelegate> delegate;
  34. @property (nonatomic, readonly) BOOL isConnected;
  35.  
  36. @property (nonatomic, retain) NSArray *cachedLocations;
  37. @property (nonatomic, retain) NSArray *cachedWorkOrders;
  38.  
  39. + (Server *)sharedServer;
  40.  
  41. - (void)loginUser:(NSString *)username withPass:(NSString *)password;
  42.  
  43. - (void)getAllLocations;
  44. - (void)getActiveWorkOrders;
  45.  
  46. - (void)getEquipmentByID:(NSString *)equipmentID;
  47. - (void)getBatchByID:(NSUInteger)batchID;
  48. - (void)getBatchHistory;
  49.  
  50. - (void)uploadBatch:(ScanBatch *)aBatch;
  51.  
  52. @end
  53.  
  54. @protocol ServerDelegate <NSObject>
  55.  
  56. @optional
  57. - (void)loginFailed;
  58. - (void)loginSuccessful;
  59.  
  60. - (void)receivedLocations:(NSArray *)locations;
  61. - (void)receivedWorkOrders:(NSArray *)workOrders;
  62.  
  63. - (void)receivedEquipmentItem:(EquipmentItem *)anItem;
  64. - (void)receivedBatch:(ScanBatch *)aBatch;
  65. - (void)receivedBatchHistory:(NSArray *)batchHistory;
  66. - (void)uploadedBatch:(BOOL)successful;
  67.  
  68. @end
Add Comment
Please, Sign In to add comment