MCFIMInfo Class

This chapter documents the MCFIMInfo class and covers the following topics:

Click to jump to parent topicUnderstanding the MCFIMInfo Class

Use the MCFIMInfo class to launch an instant messaging session from a PeopleSoft page and initiate a chat. A developer can use either the PeopleCode class or a push-button with specific characteristics in Application Designer to initiate an instant messaging session.

Note. PeopleSoft recommends using the Application Designer push-button rather than PeopleCode in most applications. The PeopleCode program determines user presence information from the application server, whereas the push-button determines user presence from the browser. The application server must wait until it has all the presence information for that page before it can render the page. Though this processing is multi-threaded, it can still be slower than the push-button.

See Also

Configuring Instant Messaging in PeopleSoft MultiChannel Framework

Click to jump to parent topicUsing the MCFIMInfo Class

Only use the MCFIMInfo class if your application requires the flexibility the PeopleCode can provide.

The only supported networks are AOL and Yahoo. SameTime is supported using the Application Designer push-button, but not in PeopleCode.

Instant messages are sent by using the native instant message clients. This means that you can only use this for Microsoft Windows.

The page from which you launch the instant messaging session must be refreshed in order to update presence status.

Click to jump to parent topicData Type for MCFIMInfo Objects

MCFIMInfo objects are declared as type MCFIMInfo. For example:

Local MCFIMInfo &MyChat;

Click to jump to parent topicScope of MCFIMInfo Objects

An MCFIMInfo object can be only instantiated from PeopleCode.

Use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message subscription, a Component Interface, and so on.

Click to jump to parent topicMCFIMInfo Class Built-in Function

CreateMCFIMInfo

Click to jump to parent topicMCFIMInfo Class Methods

In this section, we discuss the MCFIMInfo class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddUser

Syntax

AddUser(User)

Description

Use the AddUser method to add a user to the instant messaging session.

Parameters

User

Specify the user that you want to add to the instant messaging session, as a string.

Returns

A Boolean value: True if the user was successfully added, False otherwise.

Click to jump to top of pageClick to jump to parent topicCheckAll

Syntax

CheckAll()

Description

Use the CheckAll method to check the status of users on the instant messaging session.

This method makes the actual network requests to retrieve presence information.

Parameters

None.

Returns

A Boolean: True if the check is successful, False otherwise.

Click to jump to top of pageClick to jump to parent topicGetAdditionalUserInfo

Syntax

GetAdditionalUserInfo()

Description

This method returns additional user information.

Parameters

None.

Returns

String.

Click to jump to top of pageClick to jump to parent topicGetErrorImageName

Syntax

GetErrorImageName()

Description

Use GetErrorImageName to return the name of the image used for errors.

Parameters

None.

Returns

String.

Click to jump to top of pageClick to jump to parent topicGetOffLineImageName

Syntax

GetOffLineImageName()

Description

Use GetOffLineImageName to return the name of the image used to indicate off line status.

Parameters

None.

Returns

String.

Click to jump to top of pageClick to jump to parent topicGetOnlineImageName

Syntax

GetOnlineImageName()

Description

Use GetOnlineImageName to return the name of the image used to indicate online status.

Parameters

None.

Returns

String.

Click to jump to top of pageClick to jump to parent topicGetUnknownImageName

Syntax

GetUnknownImageName()

Description

Use GetUnknownImageName to return the image of unknown users.

Parameters

None.

Returns

String.

Click to jump to top of pageClick to jump to parent topicGetLaunchURL

Syntax

GetLaunchURL(User)

Description

Use the GetLaunchURL method to return the URL that launches the native client and contacts the user. This is a local URL of one of the following forms:

aim:. . .

or

ymsgr:. . .

Parameters

User

Specify the user that you want to contact via the launch URL.

Returns

A string URL.

Click to jump to top of pageClick to jump to parent topicGetStatus

Syntax

GetStatus(User)

Description

Use the GetStatus method to return the current online status of the user specified by User. This is the status at the time of the last call to CheckAll.

Parameters

User

Specify the name of the user for whom you want to check the status of.

Returns

An integer. The values are:

Value

Description

-1

Network Disabled

0

User offline

1

User online

2

User Unknown

3

Error

Click to jump to top of pageClick to jump to parent topicRemoveUser

Syntax

RemoveUser(User)

Description

Use the RemoveUser method to remove a user from the instant messaging session.

Parameters

User

Specify the name of the user you want to remove from the session, as a string.

Returns

A Boolean value: True if the user was successfully removed, False otherwise.