| 1 | ## Domain Registry Interface, OVH Web Services Connection handling | ||||||||||||||
| 2 | ## | ||||||||||||||
| 3 | ## Copyright (c) 2008,2009,2013 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||||||
| 4 | ## | ||||||||||||||
| 5 | ## This file is part of Net::DRI | ||||||||||||||
| 6 | ## | ||||||||||||||
| 7 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||
| 8 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||
| 9 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||
| 10 | ## (at your option) any later version. | ||||||||||||||
| 11 | ## | ||||||||||||||
| 12 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||
| 13 | #################################################################################################### | ||||||||||||||
| 14 | |||||||||||||||
| 15 | package Net::DRI::Protocol::OVH::WS::Connection; | ||||||||||||||
| 16 | |||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 19 | |||||||||||||||
| 20 | =pod | ||||||||||||||
| 21 | |||||||||||||||
| 22 | =head1 NAME | ||||||||||||||
| 23 | |||||||||||||||
| 24 | Net::DRI::Protocol::OVH::WS::Connection - OVH Web Services Connection handling for Net::DRI | ||||||||||||||
| 25 | |||||||||||||||
| 26 | =head1 DESCRIPTION | ||||||||||||||
| 27 | |||||||||||||||
| 28 | Please see the README file for details. | ||||||||||||||
| 29 | |||||||||||||||
| 30 | =head1 SUPPORT | ||||||||||||||
| 31 | |||||||||||||||
| 32 | For now, support questions should be sent to: | ||||||||||||||
| 33 | |||||||||||||||
| 34 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||
| 35 | |||||||||||||||
| 36 | Please also see the SUPPORT file in the distribution. | ||||||||||||||
| 37 | |||||||||||||||
| 38 | =head1 SEE ALSO | ||||||||||||||
| 39 | |||||||||||||||
| 40 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||
| 41 | |||||||||||||||
| 42 | =head1 AUTHOR | ||||||||||||||
| 43 | |||||||||||||||
| 44 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||
| 45 | |||||||||||||||
| 46 | =head1 COPYRIGHT | ||||||||||||||
| 47 | |||||||||||||||
| 48 | Copyright (c) 2008,2009 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||
| 49 | All rights reserved. | ||||||||||||||
| 50 | |||||||||||||||
| 51 | This program is free software; you can redistribute it and/or modify | ||||||||||||||
| 52 | it under the terms of the GNU General Public License as published by | ||||||||||||||
| 53 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||
| 54 | (at your option) any later version. | ||||||||||||||
| 55 | |||||||||||||||
| 56 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||
| 57 | |||||||||||||||
| 58 | =cut | ||||||||||||||
| 59 | |||||||||||||||
| 60 | #################################################################################################### | ||||||||||||||
| 61 | |||||||||||||||
| 62 | sub login | ||||||||||||||
| 63 | { | ||||||||||||||
| 64 | 0 | ▶ | my ($class,$cm,$id,$pass,$cltrid)=@_; | ||||||||||||
|
Subroutine
login: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 65 | 0 | my $mes=$cm->(); | |||||||||||||
| 66 | 0 | $mes->method('login'); | |||||||||||||
| 67 | 0 | $mes->params([$id,$pass,'fr',0]); | |||||||||||||
| 68 | 0 | return $mes; | |||||||||||||
| 69 | } | ||||||||||||||
| 70 | |||||||||||||||
| 71 | sub parse_login | ||||||||||||||
| 72 | { | ||||||||||||||
| 73 | 0 | ▶ | my ($class,$mes)=@_; | ||||||||||||
|
Subroutine
parse_login: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 74 | 0 | ▶ | $mes->errmsg($mes->is_success()? 'Login OK' : 'Login failed') unless $mes->errmsg(); | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 75 | 0 | return $mes->result_status(); | |||||||||||||
| 76 | } | ||||||||||||||
| 77 | |||||||||||||||
| 78 | sub extract_session | ||||||||||||||
| 79 | { | ||||||||||||||
| 80 | 0 | ▶ | my ($class,$mes)=@_; | ||||||||||||
|
Subroutine
extract_session: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 81 | 0 | return { id => $mes->result() }; | |||||||||||||
| 82 | } | ||||||||||||||
| 83 | |||||||||||||||
| 84 | #################################################################################################### | ||||||||||||||
| 85 | |||||||||||||||
| 86 | sub logout | ||||||||||||||
| 87 | { | ||||||||||||||
| 88 | 0 | ▶ | my ($class,$cm,$cltrid,$sd)=@_; | ||||||||||||
|
Subroutine
logout: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 89 | 0 | my $mes=$cm->(); | |||||||||||||
| 90 | 0 | $mes->method('logout'); | |||||||||||||
| 91 | 0 | $mes->params([$sd->{id}]); | |||||||||||||
| 92 | 0 | return $mes; | |||||||||||||
| 93 | } | ||||||||||||||
| 94 | |||||||||||||||
| 95 | sub parse_logout | ||||||||||||||
| 96 | { | ||||||||||||||
| 97 | 0 | ▶ | my ($class,$mes)=@_; | ||||||||||||
|
Subroutine
parse_logout: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 98 | 0 | ▶ | $mes->errmsg($mes->is_success()? 'Logout OK' : 'Logout failed') unless $mes->errmsg(); | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 99 | 0 | return $mes->result_status(); | |||||||||||||
| 100 | } | ||||||||||||||
| 101 | |||||||||||||||
| 102 | sub transport_default | ||||||||||||||
| 103 | { | ||||||||||||||
| 104 | 0 | ▶ | my ($self,$tname)=@_; | ||||||||||||
|
Subroutine
transport_default: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 105 | 0 | return (defer => 1, has_login => 1, has_logout => 1); | |||||||||||||
| 106 | } | ||||||||||||||
| 107 | |||||||||||||||
| 108 | #################################################################################################### | ||||||||||||||
| 109 | 1 | 1; | |||||||||||||