This chapter documents the MCFIMInfo class and covers the following topics:
Using the MCFIMInfo Class
Data Type for MCFIMInfo Objects
Scope of MCFIMInfo Objects
MCFIMInfo Built-in Functions
MCFIMInfo Reference
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
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.
In Netscape 4.x the local instant message clients cannot be started, so instant message users cannot be contacted using Netscape.
MCFIMInfo objects are declared as type MCFIMInfo. For example:
Local MCFIMInfo &MyChat;
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.
In this section, we discuss the MCFIMInfo class methods. The methods are discussed in alphabetical order.
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.
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.
Syntax
GetAdditionalUserInfo()
Description
This method returns additional user information.
Parameters
None.
Returns
String.
Syntax
GetErrorImageName()
Description
Use GetErrorImageName to return the name of the image used for errors.
Parameters
None.
Returns
String.
Syntax
GetOffLineImageName()
Description
Use GetOffLineImageName to return the name of the image used to indicate off line status.
Parameters
None.
Returns
String.
Syntax
GetOnlineImageName()
Description
Use GetOnlineImageName to return the name of the image used to indicate online status.
Parameters
None.
Returns
String.
Syntax
GetUnknownImageName()
Description
Use GetUnknownImageName to return the image of unknown users.
Parameters
None.
Returns
String.
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.
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 |
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.