dtRdr::Annotation::Sync::Standard - standard server sync
my $sync = dtRdr::Annotation::Sync::Standard->new($uri);
$sync->start;
$sync->work;
$sync->finish;
Looks for username and password in the server object, otherwise hits the callback.
($user, $pass) = $self->authenticate($realm, $uri);
That's an oversimplification. The user agent hits this on every new request (possibly multiple times in one request if the server rejects the header.)
Also, maybe a bug in LWP: it only tries it twice per request. So, if you typo the password twice, we're dead.
A convenience method that prepends the server base to a ua.add_request() call.
$self->add_request($method, $path);
$self->queue($token => sub {...});
my @subs = $self->dequeue($token);
Callback for collecty user-agent scheme.
Takes a completed request token and runs the registered add_request() subref.
$self->next_request($token);
my $cookies = $self->cookies;
$self->process_config(%data);
Takes the ua response data (string/response) and sets up a course of action to complete the sync.
Currently assumes a yaml manifest.
$self->process_manifest(%data);
The rules are in dtRdr::Annotation::SyncRules.
$self->incoming($id, %answer);
Adjust the object times by the server_drift and direction (+/- 1)
$self->adjust_times('out', $obj); $self->adjust_times('in', $obj, $have);
See if we have access to an open book object for a given annotation (or book id?) (Used to notify the book about the changes.)
$book = $self->book($anno);
Eric Wilhelm <ewilhelm at cpan dot org>
http://scratchcomputing.com/
Copyright (C) 2007 Eric L. Wilhelm and OSoft, All Rights Reserved.
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
The dotReader(TM) is OSI Certified Open Source Software licensed under the GNU General Public License (GPL) Version 2, June 1991. Non-encrypted and encrypted packages are usable in connection with the dotReader(TM). The ability to create, edit, or otherwise modify content of such encrypted packages is self-contained within the packages, and NOT provided by the dotReader(TM), and is addressed in a separate commercial license.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
To install dtRdr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm dtRdr
CPAN shell
perl -MCPAN -e shell install dtRdr
For more information on module installation, please visit the detailed CPAN module installation guide.