/[cwmp]/google/trunk/lib/CWMP/Methods.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/trunk/lib/CWMP/Methods.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

google/trunk/lib/CWMP/Response.pm revision 141 by oleide, Sat Oct 27 17:57:40 2007 UTC google/trunk/lib/CWMP/Methods.pm revision 173 by dpavlin, Sun Oct 28 16:39:58 2007 UTC
# Line 1  Line 1 
1  package CWMP::Response;  package CWMP::Methods;
2    
3  use strict;  use strict;
4  use warnings;  use warnings;
# Line 13  use Data::Dump qw/dump/; Line 13  use Data::Dump qw/dump/;
13    
14  =head1 NAME  =head1 NAME
15    
16  CWMP::Response - generate SOAP meesage for response  CWMP::Methods - generate SOAP meesages for CPE
17    
18  =head2 METHODS  =head2 METHODS
19    
20  =head2 new  =head2 new
21    
22    my $response = CWMP::Response->new({ debug => 1 });    my $response = CWMP::Methods->new({ debug => 1 });
23    
24  =cut  =cut
25    
# Line 34  sub new { Line 34  sub new {
34    
35    
36  my $cwmp = [ cwmp => 'urn:dslforum-org:cwmp-1-0' ];  my $cwmp = [ cwmp => 'urn:dslforum-org:cwmp-1-0' ];
37  my $soap = [ soap => "http://schemas.xmlsoap.org/soap/envelope/" ];  my $soap = [ soap => 'http://schemas.xmlsoap.org/soap/envelope/' ];
38    my $xsd  = [ xsd  => 'http://www.w3.org/2001/XMLSchema-instance' ];
39    
40  =head2 InformResponse  =head2 InformResponse
41    
# Line 66  sub GetRPCMethods { Line 67  sub GetRPCMethods {
67          });          });
68  };  };
69    
70  =head2 Reboot {  =head2 Reboot
71    
72    $response->Reboot( $state );    $response->Reboot( $state );
73    
# Line 80  sub Reboot { Line 81  sub Reboot {
81          });          });
82  }  }
83    
84  =head2 GetParameterNames {  =head2 GetParameterNames
85    
86    $response->GetParameterNames( $state, $ParameterPath, $NextLevel );    $response->GetParameterNames( $state, $ParameterPath, $NextLevel );
87    
# Line 101  sub GetParameterNames { Line 102  sub GetParameterNames {
102          });          });
103  }  }
104    
105  =head2 GetParameterValues {  =head2 GetParameterValues
106    
107    $response->GetParameterValues( $state, $ParameterPath, $NextLevel );    $response->GetParameterValues( $state, $ParameterNames );
108    
109  =cut  =cut
110    
111  sub GetParameterValues {  sub GetParameterValues {
112          my ( $self, $state, $ParameterPath, $NextLevel ) = @_;          my $self = shift;
113          $ParameterPath ||= '';  # all          my $state = shift;
114          $NextLevel ||= 0;               # all          my @ParameterNames = @_;
115          warn "# GetParameterValues( '$ParameterPath', $NextLevel )\n" if $self->debug;          confess "need ParameterNames" unless @ParameterNames;
116            warn "# GetParameterValues", dump( @ParameterNames ), "\n" if $self->debug;
117    
118          $self->xml( $state, sub {          $self->xml( $state, sub {
119                  my ( $X, $state ) = @_;                  my ( $X, $state ) = @_;
120    
121                  $X->GetParameterValues( $cwmp,                  $X->GetParameterValues( $cwmp,
122                          $X->ParameterPath( $cwmp, $ParameterPath ),                          $X->ParameterNames( $cwmp,
123                          $X->NextLevel( $cwmp, $NextLevel ),                                  map {
124                                            $X->string( $xsd, $_ )
125                                    } @ParameterNames
126                            )
127                  );                  );
128          });          });
129  }  }

Legend:
Removed from v.141  
changed lines
  Added in v.173

  ViewVC Help
Powered by ViewVC 1.1.26