#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package MediaServe::Converter;

use strict;
use Data::Dumper;

use lib '/app/tools/common/lib';
use Common::Assert;
use Common::XMLObject;
use RSApache::DBSession;

use File::Basename;

# !!! Going to make this an XMLObject, mostly for debugging purposes.
#
use base 'Common::XMLObject';

sub _init {
    my ( $self, %args ) = @_;

    $self->allow_upscaling( $args{allow_upscaling} );
    $self->{_error} = undef;

    $self->read( $args{filename} ) if ( $args{filename} );

    return $self;
}

sub allow_upscaling {
    my $self = shift;
    my $data = shift;
    $self->{_allow_upscaling} = $data if ( defined($data) );
    return $self->{_allow_upscaling};
}

sub error {
    return shift->{_error};
}

sub validate {
    my ($self) = @_;

    assert( 0, 'override this' );
}

sub read {
    my ($self) = @_;

    assert( 0, 'override this' );
}

1;
