HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Request for notes: Net::Hylafax
Folks,
A few months ago, I posted a note about a Perl Hylafax module - well,
we've finally resumed serious development, and hope to have a version
released to the world shortly.
In our development, I wanted to describe our object model briefly and see
if anyone had any comments. This is being written as a Net:: module, and
as a result, it inherits all of the methods of Net::FTP (see the docs for
info about that).
We've chosen to add on some additional object types that implement
higher-level Hylafax functionality, which will be available through the
connection. One will be able to enter all of the raw Hylafax commands
via the normal FTP-like interface (except you don't have to use QUOT),
but with these extended objects, you can have a method interface to the
whole thing. I'm only using pseudocode at the moment, but here's our
thoughts so far:
Net::Hylafax::Job
Representative of a schedule job, this will allow one to perform
various job-related fuctions, such as:
$job->status (get the status of the selected job)
$job->cancel (cancel a job)
$job->submit (submit a job)
and so on. the JPARM stuff is all accessable through this thing.
Net::Hylafax::JobGroup
As with the Job, this is a utility to perform functions on a group of
jobs. It contains a number of Job objects, and (until the functionality
is written into Hylafax) will do repetative stuff against a list of
different Jobs that are part of a group.
Net::Hylafax::Document
A convenience class for doing Gets and Puts of documents that are stored
on the server, as well as attaching a document to a job that was
created. ie, something like this:
$job = $hylafax->NewJob
$doc = $hylafax->PutNewDocument( "/tmp/mypsfile" );
print "Doc saved as ", $doc->ServerName, "\n";
$job->Document( $doc );
$job->Dial( "555-1212" );
$job->Submit;
Net::Hylafax::Q
A representation of the Q, this may be subclassed into SendQ, RecvQ,
PollQ, etc. It will allow one to set the format, list the Q, etc:
$q = $hylafax->SendQ;
$q->Format( $format );
$q->List;
Net::Hylafax::Modem
The modem object - will allow modems to be reset, enabled, as well as
view the status of them:
@modems = $hylfax->ListModems;
foreach ( @modems ) {
print "Modem status is: ", $_->Name, $_->Status, "\n";
}
Any comments, suggestions, etc. would be appreciated as we get started on
this.
Pure OO people will probably point out that the Modem class really doesn't
inherit from the Net::Hylafax class; so, there may be another class
heirarchy that lives on this, implementing the HASA relationship instead
of the ISA relationship.
Thanks,
David.