~ubuntu-branches/ubuntu/precise/mythexport/precise

« back to all changes in this revision

Viewing changes to usr/share/mythexport/ExportBase.pm

  • Committer: Bazaar Package Importer
  • Author(s): John Baab
  • Date: 2010-08-13 01:53:54 UTC
  • mfrom: (19 lucid)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100813015354-pb6w02upqqnegsep
Tags: upstream-2.2.0
ImportĀ upstreamĀ versionĀ 2.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl 
 
2
 
 
3
package ExportBase;
 
4
 
 
5
sub new
 
6
{
 
7
    my $class = shift;
 
8
    my $self = {
 
9
        _inputFile => shift,
 
10
        _outputFile  => shift,
 
11
        _description => shift,
 
12
        _devices => shift,
 
13
        _notes => shift,
 
14
        _extension => ".m4v",
 
15
    };
 
16
    bless $self, $class;
 
17
    return $self;
 
18
}
 
19
 
 
20
sub checkOutput{
 
21
    my( $self ) = @_;
 
22
    if (-e "$self->{_outputFile}$self->{_extension}"){
 
23
        return 1;
 
24
    }
 
25
    else{
 
26
        return 0;
 
27
    }
 
28
}
 
29
 
 
30
sub Description {
 
31
        my $self = shift;
 
32
        $self->{_description} = shift if @_;
 
33
        return $self->{_description};
 
34
 
35
 
 
36
sub Devices {
 
37
        my $self = shift;
 
38
        $self->{_devices} = shift if @_;
 
39
        return $self->{_devices};
 
40
 
41
 
 
42
sub Notes {
 
43
        my $self = shift;
 
44
        $self->{_notes} = shift if @_;
 
45
        return $self->{_notes};
 
46
 
47
 
 
48
sub Extension {
 
49
        my $self = shift;
 
50
        $self->{_extension} = shift if @_;
 
51
        return $self->{_extension};
 
52
 
53
 
 
54
1;