// // P4Connection.h // MBMenuExtra // // Created by Michael Bishop on 1/7/10. // Copyright 2010 Perforce Software. All rights reserved. // #import <Cocoa/Cocoa.h> #import "P4ClientApi.h" @class P4Response; @class P4ConnectionPool; @class P4ClientApi; extern NSString * const kP4ConnectionUserContextKey; extern NSString * const kP4ConnectionEncodingContextKey; extern NSString * const kP4ConnectionClientContextKey; extern NSString * const kP4ConnectionPasswordContextKey; extern NSString * const kP4ConnectionCWDContextKey; typedef void(^UpdateBlock)(NSDictionary*); /// P4Connection is the class that directly talks to the server through a /// P4ClientApi. It keeps all the responses and errors and returns them /// when finished. /// The only immutable state it keeps is the p4port. The user through /// everything else is sent in the context parameter when running a command @interface P4RawConnection : NSObject <P4ClientApiConnectionDelegate, P4ClientApiCommandDelegate> { @private NSString * _p4port; P4ClientApi * _api; NSOperationQueue * _queue; P4ConnectionPool * _pool; // weak reference NSMutableArray * _results; NSMutableArray * _updateResultQueue; NSString * _input; NSString * _output; NSError * _error; UpdateBlock updateBlock; NSTimeInterval networkDelay; } +(NSString*)defaultP4Port; +(NSString*)defaultUsername; -(NSInteger)operationCount; -(id)initWithPortString:(NSString*)p4port pool:(P4ConnectionPool*)pool; -(BOOL)runArguments:(NSArray*)arguments withContext:(NSDictionary*)context updateBlock:(UpdateBlock)update completionBlock:(void(^)(P4Response*))completion; -(BOOL)runArguments:(NSArray*)arguments withContent:(NSString*)content context:(NSDictionary*)context updateBlock:(UpdateBlock)update completionBlock:(void(^)(P4Response*))completion; -(P4Response*)runArguments:(NSArray*)arguments withContext:(NSDictionary*)context; -(P4Response*)runArguments:(NSArray*)arguments withContext:(NSDictionary*)context content:(NSString*)content; @property (readonly, copy) NSString * portString; @property (readwrite) NSTimeInterval networkDelay; // debug slow network @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#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. |