X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FCmdline.pm;h=5fe68714d28b58bc34f162ff0f99aea6ca000e5c;hb=d28952249e392eb31bc8eecc53f6c477f30c617b;hp=3bd405161e54573f0fd7c8dec4c0f45d1080601c;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/perl/Amanda/Cmdline.pm b/perl/Amanda/Cmdline.pm index 3bd4051..5fe6871 100644 --- a/perl/Amanda/Cmdline.pm +++ b/perl/Amanda/Cmdline.pm @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.39 +# Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -68,6 +68,8 @@ use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); *swig_datestamp_set = *Amanda::Cmdlinec::dumpspec_t_datestamp_set; *swig_level_get = *Amanda::Cmdlinec::dumpspec_t_level_get; *swig_level_set = *Amanda::Cmdlinec::dumpspec_t_level_set; +*swig_write_timestamp_get = *Amanda::Cmdlinec::dumpspec_t_write_timestamp_get; +*swig_write_timestamp_set = *Amanda::Cmdlinec::dumpspec_t_write_timestamp_set; sub new { my $pkg = shift; my $self = Amanda::Cmdlinec::new_dumpspec_t(@_); @@ -106,6 +108,7 @@ package Amanda::Cmdline; *CMDLINE_PARSE_DATESTAMP = *Amanda::Cmdlinec::CMDLINE_PARSE_DATESTAMP; *CMDLINE_PARSE_LEVEL = *Amanda::Cmdlinec::CMDLINE_PARSE_LEVEL; *CMDLINE_EMPTY_TO_WILDCARD = *Amanda::Cmdlinec::CMDLINE_EMPTY_TO_WILDCARD; +*CMDLINE_EXACT_MATCH = *Amanda::Cmdlinec::CMDLINE_EXACT_MATCH; @EXPORT_OK = (); %EXPORT_TAGS = (); @@ -119,7 +122,7 @@ Amanda::Cmdline - utilities for handling command lines use Amanda::Cmdline; - my $spec = Amanda::Cmdline::dumpspec_t->new($host, $disk, $datestamp, $level); + my $spec = Amanda::Cmdline::dumpspec_t->new($host, $disk, $datestamp, $level, $write_timestamp); print "host: $spec->{'host'}; disk: $spec->{'disk'}\n"; my @specs = Amanda::Cmdline::parse_dumpspecs(["host", "disk", "date"], @@ -127,17 +130,35 @@ Amanda::Cmdline - utilities for handling command lines =head1 Amanda::Cmdline::dumpspec_t Objects -=head2 Instance Variables +Note that this class was called C in older versions; +that name will still work, but is deprecated. + +=head2 Keys + +Each key contains a match expression, in the form of a string, or undef. Note +that the values of these keys are read-only. =over -=item C<$host> +=item C<< $ds->{'host'} >> + +Hostname + +=item C<< $ds->{'disk'} >> + +Disk name + +=item C<< $ds->{'datestamp'} >> + +Dump timestamp. + +=item C<< $ds->{'level'} >> -=item C<$disk> +Dump level -=item C<$datestamp> +=item C<< $ds->{'write_timestamp'} >> -=item C<$level> +Timestamp when the dump is written to storage media. =back @@ -145,13 +166,13 @@ Amanda::Cmdline - utilities for handling command lines =over -=item C +=item C<< $ds->format() >> Format the dumpspec as a string. =back -=head1 Functions +=head1 Package Functions =over @@ -159,14 +180,25 @@ Format the dumpspec as a string. This function returns a string representing the formatted form of the given dumpspec. This formatting is the same as performed by -C, but does not need a C. +C<< $ds->format() >>, but does not need a C. =item C -This function parses C<@cmdline> into a list of C objects, +This function parses C<@cmdline> into a list of C objects, according to C<$flags>, which is a logical combination of zero or more -of C<$CMDLINE_PARSE_DATESTAMP> to recognize datestamps and -C<$CMDLINE_PARSE_LEVEL> to recognize levels. +of + + $CMDLINE_PARSE_DATESTAMP - recognize datestamps + $CMDLINE_PARSE_LEVEL - recognize levels + $CMDLINE_EMPTY_TO_WILDCARD - if @cmdline is empty, make a wildcard dumpspec + +These constants are available in export tag C<:constants>. The command-line +format is + + [host [disk [datestamp [level [host [..]]]]]] + +Note that there is no facility for specifying C on the command +line. =item C @@ -226,5 +258,13 @@ push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EMPTY_TO_WILD $_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EMPTY_TO_WILDCARD"} = $CMDLINE_EMPTY_TO_WILDCARD; -push @EXPORT_OK, qw(header_matches_dumpspecs); +push @EXPORT_OK, qw($CMDLINE_EXACT_MATCH); +push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EXACT_MATCH); + +$_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EXACT_MATCH"} = $CMDLINE_EXACT_MATCH; + +#copy symbols in cmdline_parse_dumpspecs_flags to constants +push @{$EXPORT_TAGS{"constants"}}, @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}; + +push @EXPORT_OK, qw(header_matches_dumpspecs parse_dumpspecs format_dumpspec_components); 1;