this repo has no description
at fixPythonPipStalling 196 lines 8.2 kB view raw
1/* 2 * Copyright (c) 2009 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23 24@class SFAuthorization; 25 26/*! 27 @const ODSessionProxyAddress 28 @abstract the address to connect to via proxy, used when making the options dictionary 29 @discussion the address to connect to via proxy, used when making the options dictionary 30*/ 31FOUNDATION_EXPORT NSString *const ODSessionProxyAddress NS_AVAILABLE(10_6, NA); 32 33/*! 34 @const ODSessionProxyPort 35 @abstract the port to connect to via proxy, used when making the options dictionary 36 @discussion the port to connect to via proxy, used when making the options dictionary. This parameter 37 is optional and should not be passed normally. 38*/ 39FOUNDATION_EXPORT NSString *const ODSessionProxyPort NS_AVAILABLE(10_6, NA); 40 41/*! 42 @const ODSessionProxyUsername 43 @abstract the username to connect with via proxy, used when making the options dictionary 44 @discussion the username to connect with via proxy, used when making the options dictionary 45*/ 46FOUNDATION_EXPORT NSString *const ODSessionProxyUsername NS_AVAILABLE(10_6, NA); 47 48/*! 49 @const ODSessionProxyPassword 50 @abstract the password to connect with via proxy, used when making the options dictionary 51 @discussion the password to connect with via proxy, used when making the options dictionary 52*/ 53FOUNDATION_EXPORT NSString *const ODSessionProxyPassword NS_AVAILABLE(10_6, NA); 54 55@class ODConfiguration; 56 57/*! 58 @class ODSession 59 @abstract Class for working with OpenDirectory sessions. 60 @discussion Class for working with OpenDirectory sessions. 61*/ 62@interface ODSession : NSObject { 63 @private 64 void *_internal; 65} 66 67/*! 68 @method defaultSession 69 @abstract Returns a shared instance of a local ODSession 70 @discussion Returns a shared instance of a local ODSession. This can be used for most situations unless 71 more control is needed over the session. 72*/ 73+ (ODSession *)defaultSession NS_AVAILABLE(10_6, NA); 74 75/*! 76 @method sessionWithOptions:error: 77 @abstract Creates an autoreleased instance of ODSession directed over Proxy to another host 78 @discussion Creates an autoreleased instance of ODSession directed over Proxy to another host. nil 79 can be passed for no options. outError is optional parameter, nil can be passed if error 80 details are not needed. Options include: 81 82 If proxy is required then a dictionary with keys should be: 83 Key Value 84 ODSessionProxyAddress NSString(hostname or IP) 85 ODSessionProxyPort NSNumber(IP port, should not be set as it will default) 86 ODSessionProxyUsername NSString(username) 87 ODSessionProxyPassword NSString(password) 88*/ 89+ (instancetype)sessionWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA); 90 91/*! 92 @method initWithOptions:error: 93 @abstract Creates an instance of ODSession directed over Proxy to another host 94 @discussion Creates an instance of ODSession directed over Proxy to another host. nil can be 95 passed for no options. outError is optional parameter, nil can be passed if error 96 details are not needed. Options include: 97 98 If proxy is required then a dictionary with keys should be: 99 Key Value 100 ODSessionProxyAddress NSString(hostname or IP) 101 ODSessionProxyPort NSNumber(IP port, should not be set as it will default) 102 ODSessionProxyUsername NSString(username) 103 ODSessionProxyPassword NSString(password) 104*/ 105- (instancetype)initWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA); 106 107/*! 108 @method nodeNamesAndReturnError: 109 @abstract Returns the node names that are registered on this ODSession 110 @discussion Returns the node names that are registered on this ODSession. outError can be nil if 111 error details are not needed. 112*/ 113- (NSArray *)nodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 114 115/*! 116 * @method configurationTemplateNames 117 * 118 * @abstract 119 * Returns a list of names as NSStrings for all available configuration templates. 120 * 121 * @discussion 122 * Returns a list of names as NSStrings for all available configuration templates. Configuration templates 123 * have pre-configured modules and/or mappings. Useful for re-using existing configurations 124 * that may change with operating system without changing the actual configuration. 125 */ 126@property (readonly, copy) NSArray *configurationTemplateNames NS_AVAILABLE_MAC(10_9); 127 128/*! 129 * @method mappingTemplateNames 130 * 131 * @abstract 132 * Returns a list names as NSStrings for all available mapping templates. 133 * 134 * @discussion 135 * Returns a list names as NSStrings for all available mapping templates. Mapping templates have pre-configured 136 * record/attribute mappings. Useful if a configuration uses a common layout of mappings for a type of server. 137 */ 138@property (readonly, copy) NSArray *mappingTemplateNames NS_AVAILABLE_MAC(10_9); 139 140/*! 141 * @method configurationAuthorizationAllowingUserInteraction: 142 * 143 * @abstract 144 * Returns an authorization appropriate for managing configurations. 145 * 146 * @discussion 147 * Returns an authorization appropriate for managing configurations. If a proxy session is in use this method will return 148 * nil and no error. 149 */ 150- (SFAuthorization *)configurationAuthorizationAllowingUserInteraction:(BOOL)allowInteraction error:(NSError **)error NS_AVAILABLE_MAC(10_9); 151 152/*! 153 * @method configurationForNodename: 154 * 155 * @abstract 156 * Reads the configuration for a given nodename. 157 * 158 * @discussion 159 * Reads the configuration for a given nodename. 160 */ 161- (ODConfiguration *)configurationForNodename:(NSString *)nodename NS_AVAILABLE_MAC(10_9); 162 163/*! 164 * @method addConfiguration:authorization:error: 165 * 166 * @abstract 167 * Adds a new configuration to the existing ODSession. 168 * 169 * @discussion 170 * Adds a new configuration to the existing ODSession. An SFAuthorization can be provided if necessary. 171 */ 172- (BOOL) addConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 173 174/*! 175 * @method deleteConfiguration:authorization:error: 176 * 177 * @abstract 178 * Deletes an existing configuration from the ODSession. 179 * 180 * @discussion 181 * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary. 182 */ 183- (BOOL) deleteConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 184 185/*! 186 * @method deleteConfigurationWithNodename:authorization:error: 187 * 188 * @abstract 189 * Deletes an existing configuration from the ODSession. 190 * 191 * @discussion 192 * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary. 193 */ 194- (BOOL) deleteConfigurationWithNodename:(NSString *)nodename authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 195 196@end