]>
git.proxmox.com Git - pmg-api.git/blob - PMG/RuleDB/Virus.pm
1 package PMG
::RuleDB
::Virus
;
9 use PMG
::RuleDB
::Object
;
11 use base
qw(PMG::RuleDB::Object);
22 return 'Virus Filter';
30 my ($type, $ogroup) = @_;
32 my $class = ref($type) || $type;
34 my $self = $class->SUPER::new
($class->otype(), $ogroup);
40 my ($type, $ruledb, $id, $ogroup, $value) = @_;
42 my $class = ref($type) || $type;
44 my $obj = $class->new ($ogroup);
47 $obj->{digest
} = Digest
::SHA
::sha1_hex
($id, $ogroup);
53 my ($self, $ruledb) = @_;
55 defined($self->{ogroup
}) || return undef;
57 if (defined ($self->{id
})) {
64 my $sth = $ruledb->{dbh
}->prepare(
65 "INSERT INTO Object (Objectgroup_ID, ObjectType) VALUES (?, ?);");
67 $sth->execute($self->ogroup, $self->otype);
69 $self->{id
} = PMG
::Utils
::lastid
($ruledb->{dbh
}, 'object_id_seq');
76 my ($self, $queue, $entity, $msginfo) = @_;
78 if ($queue->{vinfo
}) {
104 my ($self, $param) = @_;
111 =head1 PMG::RuleDB::Virus