IMServicePlugIn Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/IMServicePlugIn.framework
Availability
Available in OS X v10.7 and later.
Declared in
IMServicePlugInProtocols.h
IMServicePlugInTypes.h

Overview

The principal class for each service plug-in must implement the IMServicePlugIn protocol. Implementing this protocol indicates that your service plug-in instance can perform basic tasks such as logging in, logging out, and updating account settings.

Tasks

Performing Basic Tasks

Instance Methods

initWithServiceApplication:

Initializes your service plug-in. (required)

- (id)initWithServiceApplication:(id < IMServiceApplication >)client
Parameters
client

The client interface, used to communicate with the instant messaging client.

Discussion

When your plug-in is loaded, this method is called to pass it a client object. For each optional plug-in protocol that your service plug-in implements, the client object implements the corresponding application protocol.

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInProtocols.h

login

Logs in to the instant messaging service. (required)

- (oneway void)login
Discussion

To indicate that the user successfully logged in, call the plugInDidLogIn method on the client object.

To indicate a login failure:

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInProtocols.h

logout

Logs out of the instant messaging service. (required)

- (oneway void)logout
Discussion

To indicate that the user logged out, call the plugInDidLogOutWithError:reconnect: method on the client object, including any appropriate error information.

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInProtocols.h

updateAccountSettings:

Updates the account settings. (required)

- (oneway void)updateAccountSettings:(NSDictionary *)accountSettings
Parameters
accountSettings

A dictionary containing the account settings. For a list of keys, see “Account Setting Keys.”

Discussion

The instant messaging client calls this method prior to logging in with the user's account settings.

Availability
  • Available in OS X v10.7 and later.
Declared In
IMServicePlugInProtocols.h

Constants

Account Setting Keys

These keys are used by the updateAccountSettings: method.

NSString * const IMAccountSettingServerHost;
NSString * const IMAccountSettingServerPort;
NSString * const IMAccountSettingLoginHandle;
NSString * const IMAccountSettingPassword;
NSString * const IMAccountSettingUsesSSL;
Constants
IMAccountSettingServerHost

The host name of the server.

The value for this key is stored as an NSString object.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAccountSettingServerPort

The port number of the server.

The value for this key is stored as an NSNumber object.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAccountSettingLoginHandle

The user’s handle.

The value for this key is stored as an NSString object.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAccountSettingPassword

The user’s password.

The value for this key is stored as an NSString object.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.

IMAccountSettingUsesSSL

Whether to use SSL.

The value for this key is a Boolean, stored as an NSNumber object.

Available in OS X v10.7 and later.

Declared in IMServicePlugInTypes.h.