Package AccessGrid :: Module Venue :: Class StreamDescriptionList
[show private | hide private]
[frames | no frames]

Class StreamDescriptionList


Class to represent stream descriptions in a venue. Entries in the list are a tuple of (stream description, producing users). A stream is added to the list with a producer. Producing users can be added to and removed from an existing stream. When the number of users producing a stream becomes zero, the stream is removed from the list.

Exception: static streams remain without regard to the number of producers
Method Summary
  __init__(self)
Constructor for Stream Description List.
  AddStream(self, stream)
Add a stream to the list, only if it doesn't already exist
  AddStreamProducer(self, producingUser, inStream)
Add a stream to the list, with the given producer
  CleanupStreams(self)
Remove streams with empty producer list
  FindStreamByDescription(self, inStream)
This method finds a stream, producerlist tuple by searching for the stream description.
  GetStaticStreams(self)
GetStaticStreams returns a list of static stream descriptions to the caller.
  GetStreams(self)
Get the list of streams, without producing user info
  RemoveProducer(self, producingUser)
Remove producer from all streams.
  RemoveStream(self, stream)
Remove a stream from the list
  RemoveStreamProducer(self, producingUser, inStream)
Remove a stream producer from the given stream.
  __RemoveProducer(self, producingUser, inStream)
Internal : Remove producer from stream with given index

Method Details

__init__(self)
(Constructor)

Constructor for Stream Description List.

AddStream(self, stream)

Add a stream to the list, only if it doesn't already exist

**Arguments:**

*stream* A stream description.

**Raises:**

*StreamAlreadyPresent* This is raised if the stream is already present in the Venue.

AddStreamProducer(self, producingUser, inStream)

Add a stream to the list, with the given producer

**Arguments:**

*producingUser* A user who is producing media for this stream description.

*inStream* The stream description of the media the user is producing.

CleanupStreams(self)

Remove streams with empty producer list

FindStreamByDescription(self, inStream)

This method finds a stream, producerlist tuple by searching for the stream description.

**Arguments:**

*inStream* A stream description to look for.

**Returns:**

*(stream, producerList)* If found, the stream, producerlist tuple is returned.

*None* If not found.

GetStaticStreams(self)

GetStaticStreams returns a list of static stream descriptions to the caller.

**Returns:**

*staticStreams* The list of stream descriptions for the static streams in this Venue.

GetStreams(self)

Get the list of streams, without producing user info

**Returns:**

*streamList* The list of stream descriptions.

RemoveProducer(self, producingUser)

Remove producer from all streams. Then cleanup streams to get rid of unused streams.

**Arguments:**

*producingUser* The user to be removed from all existing streams.

RemoveStream(self, stream)

Remove a stream from the list

**Arguments:**

*stream* A stream description to be removed from the venue.

**Raises:**

*StreamNotFound* This is raised if the stream description is not found in this venue.

RemoveStreamProducer(self, producingUser, inStream)

Remove a stream producer from the given stream. If the last producer is removed, the stream will be removed from the list if it is non-static.

**Arguments:**

*producingUser* The user producing the stream.

*inStream* the Stream descriptino the producing user is producing.

__RemoveProducer(self, producingUser, inStream)

Internal : Remove producer from stream with given index

Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net