Previous: Introduction Up: Hamsam Tutorial Next: Putting it to code

Concepts

This chapter discusses about how instant messaging is modeled in Hamsam.

Hamsam currently supports three instant messaging services - AIM, MSN, and Yahoo!. Hamsam allows you to log in to multiple instant messaging services simultaneously, with one and only one user account per service at a time.

Typically, any instant messaging service is referred to as a Protocol in Hamsam terminology. A client begins its interaction with Hamsam by getting a list of all supported protocols. The client then selects the protocols to log in. The log in process (also called connecting) is done by passing a user name and password to Hamsam.

After a successful connection, the client interacts with Hamsam through two channels - one channel allows sending notifications, requests, and instant messages to the protocol while the other channel receives asynchronous notifications, presence information, and instant messages from the protocol.

A user of an IM service is denoted by the term Buddy in Hamsam. When you log in, you receive two lists of buddies, one list contains all your "friends" who are allowed to see your online presence, and send you messages. The other list is a list of users whom you have blocked. They are neither allowed to see your online status, nor send you messages. Some protocols allow buddies in friend list to be put to different groups to allow better management of  the lists.

The presence information is referred to as Buddy Status in Hamsam. You can change your own status message as well view the status of others. You will be notified whenever a user in friend list changes his/her status.

Hamsam supports two kinds of IM sessions. The first kind is a normal IM session in which only two people can participate. The second type is called a Conference. More than two people can participate in a conference. Please note that it is possible that a specific conference has only two participants. But a third participant can join the conference at any time (usually this is done while an existing participant invites a third person). However, in case of a normal IM session a third person can never join.

All messages exchanged in Hamsam allow rich text. This means that you can send and receive messages in different font and color. Besides, you can mark URLs, or smileys (also called emoticons) in your messages.

Hamsam allows clients that operate behind a firewall to connect through a proxy server, if required.

Finally, Hamsam has a logging framework that allows clients to track trace messages from Hamsam API. We strongly encourage you to use this feature. If you find a bug in Hamsam and report it, the data provided via the logging framework can turn out to be of great help for us to analyze the problem.


Previous: Introduction Up: Hamsam Tutorial Next: Putting it to code