NAME

Net::RVP::Session - encapsulation of a session (conversation)

SYNOPSIS

my $session = $rvp->session();
$session->add($user1,$user2);
$session->say("hello");

METHODS

new ( RVP object, session id (GUID) )

id

Return the session id.

add ( RVP::User object, ... )

Sends a message to the users to add them to the conversation.

Returns number of users successfully added.

leave

Leave the conversation.

typing

Send 'typing' message.

has ( RVP::User )

Returns true iff the given user is in the session.

users

Returns list of users (RVP::User object) in the session.

say ( text )

Send message.

join_event ( RVP::User )

A user has been added to the conversation. Called in response to an 'x-msmsgscontrol' event (non-typing).

part_event ( RVP::User )

A user has left the conversation. Should be called in response to an 'x-imleave' event (e.g. as generated by the leave method here, but received on our notification server).

Returns true on success, false if not found.

typing_event ( RVP::User )

A user is typing. Called in response to a notification.

message_event ( RVP::User, message )

Message was sent to a user.

AUTHOR

David Robins <dbrobins@davidrobins.net>.