# $Id: ConferenceControlSession.pm,v 1.1 2001/10/30 05:01:49 swick Exp $

package ConferenceControlSession;
use Session;
use strict;

@ConferenceControlSession::ISA = qw( Session );

sub version			# .VER
{
    # Version
    my ($self, $version) = @_;
    $self->trace( "ConferenceControlSession ", $self->{_id}, " version $version" );
}

sub attributes			# .A
{
    # 1~BRIDGEID~CONFID~OPERID~VIAPARTYID~OPERNAME~OPERVESTIBULELOC
    # 2~CRNTLOC~AUDIOSTATE
    my ($self, $msgNum, $bridge, $confID) = @_;
    if ($msgNum == 1) {
	$self->{bridge} = $bridge;
	$self->{conf} = Conference->find($bridge, $confID);
	$self->{conf}->{controlSession} = $self;
    }
}

sub new
{
    my ($proto, $conn, $id) = @_;
    my $class = ref($proto) || $proto;

    my $self = $class->SUPER::new($conn, $id);

    bless ($self, $class);

    print "Session $id is a ConferenceControlSession\n";

    $self->{handler}->{'ACC.VER'} = \&version;
    $self->{handler}->{'ACC.A'} = \&attributes;

    return $self;
}

1;
