Infinity.SessionClass

Fields

Name

Type

Access

Description

close

object

r

Default signal handler for the Infinity.Session ::close signal. This cancels currently running synchronization in Infinity.Session.

error

object

r

Default signal handler for the Infinity.Session ::error signal.

get_xml_user_props

object

r

Virtual function that creates a list of GObject.Parameter s for use with GObject.Object.newv() from a XML node.

parent_class

GObject.ObjectClass

r

process_xml_run

object

r

Virtual function that is called for every received message while the session is running. Return Infinity.CommunicationScope.GROUP if the message is designated for all group members (see also Infinity.CommunicationObject.received() on this topic).

process_xml_sync

object

r

Virtual function that is called for every node in the XML document created by to_xml_sync. It is supposed to reconstruct the session content from the XML data.

set_xml_user_props

object

r

Virtual function that writes the passed user properties into a XML node.

synchronization_begin

object

r

Default signal handler for the Infinity.Session ::synchronization-begin signal. The default handler queues the synchronization messages.

synchronization_complete

object

r

Default signal handler for the Infinity.Session ::synchronization-complete signal. If the session itself got synchronized (and did not synchronize another session), then the default handler changes status to Infinity.SessionStatus.RUNNING.

synchronization_failed

object

r

Default signal handler for the Infinity.Session ::synchronization-failed signal. If the session itself got synchronized (and did not synchronize another session), then the default handler changes status to Infinity.SessionStatus.CLOSED.

synchronization_progress

object

r

Default signal handler for the Infinity.Session ::synchronization-progress signal.

to_xml_sync

object

r

Virtual function that saves the session within a XML document. parent is the root node of the document. It should create as much nodes as possible within that root node and not in sub-nodes because these are sent to a client and it is not allowed that other traffic is put in between those nodes. This way, communication through the same connection does not hang just because a large session is synchronized.

user_new

object

r

Virtual function that creates a new user object with the given properties.

validate_user_props

object

r

Virtual function that checks whether the given user properties are valid for a user join. This prevents a user join if there is already a user with the same name. If exclude is not None, then the function does ignore it when validating.

Methods

None

Details

class Infinity.SessionClass

This structure contains the virtual functions and default signal handlers of Infinity.Session.