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

Class ServiceCapability


Method Summary
  __init__(self, name, role, stype, config)
Initiates the class.
  CreateServiceCapability(xmlDoc)
Static method that creates a ServiceCapability object from an xml document. (Static method)
  GetConfiguration(self)
Get configuration dictionary.
  GetName(self)
Get the name of this capability.
  GetRole(self)
Get the role of this capability
  GetType(self)
Get the type of this capability.
  HasConfigOption(self, option)
Check if a configuration option exists.
  Matches(self, capability)
Compares this instance to another capability.
  SetConfigOption(self, option, data)
Set a configuration option.
  SetConfiguration(self, config)
Set configuration dictionary.
  SetName(self, name)
Set the name of this capability.
  SetRole(self, role)
Set the role of this capability
  SetType(self, stype)
Set the type of this capability
  ToXML(self)
Creates an xml document describing this capability.

Class Variable Summary
str CONSUMER = 'consumer'
str DEVICE_SAMPLE_FORMAT = 'DEVICE_SAMPLE_FORMAT'
str DEVICE_SAMPLE_RATE = 'DEVICE_SAMPLE_RATE'
str DEVICE_SAMPLE_SIZE = 'DEVICE_SAMPLE_SIZE'
str ENCODING_BIT_RATE = 'ENCODING_BITRATE'
str ENCODING_NAME = 'ENCODING_NAME'
str ENCODING_QUALITY = 'ENCODING_QUALITY'
str ENCODING_SIZE = 'ENCODING_SIZE'
str PRODUCER = 'producer'
str RTP_PAYLOAD_TYPE = 'RTP_PAYLOAD_TYPE'
str RTP_PROFILE = 'RTP_PROFILE'
str TITLE = 'ServiceCapability'
str TRANSFORMER = 'transformer'

Instance Method Details

__init__(self, name, role, stype, config)
(Constructor)

Initiates the class.

**Arguments:**

*name* The name of the service (string) *role* The role of service (producer/consumer) *type* The type of service (audio/video/text)

GetConfiguration(self)

Get configuration dictionary.

** Returns **

* config * Dictionary containing configuration options and their values (option:value)

GetName(self)

Get the name of this capability.

** Returns **

*name* The name of the capability

GetRole(self)

Get the role of this capability

** Returns **

* role * the role of this capability (consumer/producer)

GetType(self)

Get the type of this capability.

** Returns **

* type * the type of this capability (audio/video/text)

HasConfigOption(self, option)

Check if a configuration option exists.

** Arguments **

* option * Configuration option (for example, ServiceCapability.ENCODING_NAME)

** Returns **

* data * Corresponding data for option.

Matches(self, capability)

Compares this instance to another capability. If the type and configuration parameters are equal, the capabilities match.

** Arguments **

*capability* Capability to compare.

** Returns **

*int* 1 if the capabilities match, otherwise 0.

SetConfigOption(self, option, data)

Set a configuration option.

** Arguments **

* option * Configuration option (for example, ServiceCapability.ENCODING_NAME)

* data * Configuration data as a string (for example, H.261)

SetConfiguration(self, config)

Set configuration dictionary.

** Arguments **

* config * Dictionary containing configuration options and their values (option:value)

SetName(self, name)

Set the name of this capability.

** Arguments **

* name * The name of describing the capability.

SetRole(self, role)

Set the role of this capability

** Arguments **

* role * the role of this capability (consumer/producer)

SetType(self, stype)

Set the type of this capability

** Arguments **

* type * the type of this capability (audio/video/text)

ToXML(self)

Creates an xml document describing this capability.

** Returns **

*doc* xml document

Static Method Details

CreateServiceCapability(xmlDoc)

Static method that creates a ServiceCapability object from an xml document.

** Arguments **

*xmlDoc* xml document that describing a ServiceCapability object.

Class Variable Details

CONSUMER

Type:
str
Value:
'consumer'                                                             

DEVICE_SAMPLE_FORMAT

Type:
str
Value:
'DEVICE_SAMPLE_FORMAT'                                                 

DEVICE_SAMPLE_RATE

Type:
str
Value:
'DEVICE_SAMPLE_RATE'                                                   

DEVICE_SAMPLE_SIZE

Type:
str
Value:
'DEVICE_SAMPLE_SIZE'                                                   

ENCODING_BIT_RATE

Type:
str
Value:
'ENCODING_BITRATE'                                                     

ENCODING_NAME

Type:
str
Value:
'ENCODING_NAME'                                                        

ENCODING_QUALITY

Type:
str
Value:
'ENCODING_QUALITY'                                                     

ENCODING_SIZE

Type:
str
Value:
'ENCODING_SIZE'                                                        

PRODUCER

Type:
str
Value:
'producer'                                                             

RTP_PAYLOAD_TYPE

Type:
str
Value:
'RTP_PAYLOAD_TYPE'                                                     

RTP_PROFILE

Type:
str
Value:
'RTP_PROFILE'                                                          

TITLE

Type:
str
Value:
'ServiceCapability'                                                    

TRANSFORMER

Type:
str
Value:
'transformer'                                                          

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