Mac Developer Library

Developer

ODSession Class Reference

Options
Deployment Target:

On This Page
Language:

ODSession

An ODSession object serves as a Cocoa wrapper for an Open Directory session.

  • Returns a shared instance of the local session.

    Declaration

    Swift

    class func defaultSession() -> ODSession!

    Objective-C

    + (ODSession *)defaultSession

    Return Value

    A shared instance of the local session.

    Availability

    Available in OS X v10.6 and later.

  • Creates a session object directed over proxy to another host.

    Declaration

    Swift

    init(options inOptions: [NSObject : AnyObject]!) throws

    Objective-C

    - (instancetype)initWithOptions:(NSDictionary *)inOptions error:(NSError **)outError

    Parameters

    inOptions

    A dictionary of options to associate with the session. Can be nil.

    outError

    An error reference for error details. Can be nil.

    Return Value

    The created session object.

    Discussion

    Availability

    Available in OS X v10.6 and later.

    See Also

    “ODSession Option Keys”

  • Returns an autoreleased session object directed over proxy to another host.

    Declaration

    Objective-C

    + (instancetype)sessionWithOptions:(NSDictionary *)inOptions error:(NSError **)outError

    Parameters

    inOptions

    A dictionary of options to associate with the session. Can be nil.

    outError

    An error reference for error details. Can be nil.

    Return Value

    The initialized session object.

    Availability

    Available in OS X v10.6 and later.

    See Also

    “ODSession Option Keys”

  • Option keys used when creating a session directed over a proxy.

    Declaration

    Swift

    let ODSessionProxyAddress: String let ODSessionProxyPort: String let ODSessionProxyUsername: String let ODSessionProxyPassword: String

    Objective-C

    NSString *const ODSessionProxyAddress; NSString *const ODSessionProxyPort; NSString *const ODSessionProxyUsername; NSString *const ODSessionProxyPassword;

    Constants

    • ODSessionProxyAddress

      ODSessionProxyAddress

      The address to connect to via proxy. The value is of type NSString.

      Available in OS X v10.6 and later.

    • ODSessionProxyPort

      ODSessionProxyPort

      The port to connect to via proxy. The value is of type NSNumber.

      Available in OS X v10.6 and later.

    • ODSessionProxyUsername

      ODSessionProxyUsername

      The username to connect with via proxy. The value is of type NSString.

      Available in OS X v10.6 and later.

    • ODSessionProxyPassword

      ODSessionProxyPassword

      The password to connect with via proxy. The value is of type NSString.

      Available in OS X v10.6 and later.