CommandServiceManager -1.00
Phoenix engine interface
|
00001 // Project name: Phoenix 00002 // Version -1.00 00003 // 00004 // CommandServiceManager.h 00005 // CommandServiceManager 00006 // 00007 // Created by Pichaya Srifar on 7/29/11. 00008 // Copyright 2011 Vervata. All rights reserved. 00009 // 00010 00011 #import <Foundation/Foundation.h> 00012 #import "CommandDelegate.h" 00013 #import "TransportDirectiveEnum.h" 00014 #import "NSMutableArray+PriorityQueue.h" 00015 #import "NSMutableArray+PriorityQueue.h" 00016 00017 @class CommandDelegate; 00018 00019 @class SessionManager, CommandExecutor, CommandRequest, Request, CommandDelegate; 00020 00025 @interface CommandServiceManager : NSObject { 00026 SessionManager *sessionManager; 00027 CommandExecutor *executor; 00028 NSURL *structuredURL; 00029 NSURL *unstructuredURL; 00030 NSString *payloadPath; 00031 NSString *databasePath; 00032 NSMutableArray *priorityQueue; 00033 } 00034 00040 + (CommandServiceManager *)sharedManager; 00041 00048 + (CommandServiceManager *)sharedManagerWithPayloadPath:(NSString *)PLPath withDBPath:(NSString *)DBPath; // use this 00049 00055 - (long)execute:(CommandRequest *)request; 00056 00057 00062 - (void)cancelRequest:(uint32_t)CSID; 00063 00068 - (void)deleteSession:(uint32_t)CSID; 00069 00074 - (NSArray *)getAllOrphanedSession; 00075 00080 - (NSArray *)getAllPendingSession; 00081 00087 - (void)resume:(uint32_t)CSID withDelegate:(id<CommandDelegate>)delegate; 00088 00092 - (void)testCancelRequest; 00093 00098 - (Request *)deQueue; 00099 00100 @property (nonatomic, retain) NSURL *structuredURL; 00101 @property (nonatomic, retain) NSURL *unstructuredURL; 00102 @property (nonatomic, retain) NSString *payloadPath; 00103 @property (nonatomic, retain) NSString *databasePath; 00104 00108 @property (nonatomic, assign) SessionManager *sessionManager; 00109 00113 @property (nonatomic, assign) CommandExecutor *executor; 00114 00118 @property (nonatomic, retain) NSMutableArray *priorityQueue; 00119 00120 @end