// // P4CachingDelegate.swift // DocHub // // Created by Tristan Juricek on 6/11/14. // Copyright (c) 2014 Perforce. All rights reserved. // import Foundation class P4CachingDelegate : NSObject, P4ClientApiCommandDelegate { var error:NSError? = nil var messages:String[] = [] var tagged:Dictionary<String,String>[] = [] var binaryContent:NSData? = nil var text:String? = nil var finished:Bool = false var inputText:String? = nil func didReceiveError(e:NSError) { error = e } func didReceiveSimpleServerMessage(message:String, level:CChar) { messages.append(message) } func didReceiveTaggedResponse(d:Dictionary<String,String>) { tagged.append(d) } func didReceiveBinaryContent(d:NSData) { binaryContent = d } func didReceiveTextContent(t:String) { text = t } func clientApiDidFinishCommand() { finished = true } func getInputText() -> String { return inputText! } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 9475 | tjuricek |
Set up the positive workflow for AddPerforceController to get a login token. This required adding another couple of methods to provide input to the p4api (which were surprisingly absent from the earlier system). |
||
#1 | 9397 | tjuricek | Basic p4d interaction with p4 using Swift |