// // P4SpecManager.h // SCMMenuExtra // // Created by Michael Bishop on 1/29/10. // Copyright 2010 Perforce Software. All rights reserved. // #import <Cocoa/Cocoa.h> #import "P4Spec.h" // To be removed when private methods become private #import "P4RawConnection.h" extern NSString * const kChangeSpecType; extern NSString * const kClientSpecType; // TERMS: // "Form" - A spec as a form. ie. what is written out and edited with the P4EDITOR // "Spec" - A dictionary of all the keys and values that can be output as a form. @class P4Spec; @class P4Port; @class P4Connection; @class P4Response; typedef void (^SpeclistRefreshCompletionBlock)(NSArray * speclist, NSError *); @interface P4SpecManager : NSObject { @private NSMutableDictionary * specDescriptions; P4Connection * connection; NSPersistentStoreCoordinator * persistentStoreCoordinator; NSManagedObjectContext * managedObjectContext; NSManagedObjectModel * managedObjectModel; NSTimer * savingTimer; } +(NSArray*)allOpenManagers; +(P4SpecManager*)managerWithPortString:(NSString*)portString username:(NSString*)username; +(P4SpecManager*)managerWithConnection:(P4Connection*)connection; -(void)refreshSpecDefinitionsWithCompletion:(SpecRefreshCompletionBlock)completion; -(void)setSpecDefinitionAsString:(NSString*)string forTypeNamed:(NSString*)typeName; -(void)setSpecDefinitionAsFieldDefinitions:(NSDictionary*)fieldDefinitions forTypeNamed:(NSString*)typeName; -(P4Spec*)specOfType:(NSString*)typeName identifier:(NSString*)identifier createIfNotFound:(BOOL)create; -(BOOL)saveSpec:(P4Spec*)spec completionBlock:(void(^)(P4Response * response))completion; -(NSString*)listCommandForSpecType:(NSString*)specType; -(NSArray*)specListOfType:(NSString*)typeName completion:(SpeclistRefreshCompletionBlock)completion; -(NSFetchRequest*)fetchRequestForType:(NSString*)typeName; -(NSArray*)executeFetchRequest:(NSFetchRequest*)fetchRequest incrementalUpdateBlock:(void(^)(NSArray * speclist))completion completionBlock:(void(^)(NSArray * speclist, NSError *))completion; -(void)reset; -(BOOL)flushCache:(NSError**)error; -(NSString*)specDefStringFromSpecDefinition:(NSDictionary*)dict; -(void)requestSave; // To be private -(BOOL)runArguments:(NSArray*)arguments updateBlock:(UpdateBlock)update completionBlock:(void(^)(P4Response * response))completion; +(id)auxiliarySpecMetadata; // unused -(NSString*)formOfTypeNamed:(NSString*)typeName fromDictionary:(NSDictionary*)dictionary error:(NSError**)error; @property (nonatomic, readonly) NSString * portString; @property (nonatomic, readonly) P4Port * p4Port; @property (nonatomic, readonly) NSString * username; @property (nonatomic, readonly) P4Connection * connection; @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/P4ObjectLayer/P4SpecManager.h.orig | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |