Mac Developer Library

Developer

OpenDirectory Framework Reference ODSession Class Reference

Options
Deployment Target:

On This Page
Language:

ODSession

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

Inheritance


Conforms To


Import Statement


import OpenDirectory @import OpenDirectory;

Availability


Available in OS X v10.6 and later.
  • 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.

    Import Statement

    import OpenDirectory

    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]!, error outError: NSErrorPointer)

    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.

    Import Statement

    import OpenDirectory

    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.

    Import Statement

    Availability

    Available in OS X v10.6 and later.

    See Also

    “ODSession Option Keys”

  • Returns the node names that are registered with this session.

    Declaration

    Swift

    func nodeNamesAndReturnError(_ outError: NSErrorPointer) -> [AnyObject]!

    Objective-C

    - (NSArray *)nodeNamesAndReturnError:(NSError **)outError

    Parameters

    outError

    An error reference for error details. Can be nil.

    Return Value

    The node names registered with this session.

    Import Statement

    import OpenDirectory

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    let ODSessionProxyAddress: NSString! let ODSessionProxyPort: NSString! let ODSessionProxyUsername: NSString! let ODSessionProxyPassword: NSString!

    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.

    Import Statement