/[cwmp]/google/lib/CWMP/Response.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/lib/CWMP/Response.pm

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

revision 38 by dpavlin, Tue Jun 19 09:43:57 2007 UTC revision 46 by dpavlin, Tue Jun 19 19:50:29 2007 UTC
# Line 44  my $soap = [ soap => "http://schemas.xml Line 44  my $soap = [ soap => "http://schemas.xml
44  =cut  =cut
45    
46  sub Inform {  sub Inform {
47            my ( $self, $state ) = @_;
48            $self->xml( $state, sub {
49                    my ( $X, $state ) = @_;
50                    $X->InformResponse( $cwmp,
51                            $X->MaxEnvelopes( $cwmp, 1 )
52                    );
53            });
54    }
55    
56    =head2 GetRPCMethods
57    
58      $response->GetRPCMethods( $state );
59    
60    =cut
61    
62    sub GetRPCMethods {
63            my ( $self, $state ) = @_;
64            $self->xml( $state, sub {
65                    my ( $X, $state ) = @_;
66                    $X->GetRPCMethods();
67            });
68    };
69    
70    sub xml {
71          my $self = shift;          my $self = shift;
72    
73          my $state = shift or confess "no state?";          my ( $state, $closure ) = @_;
74    
75            confess "no state?" unless ($state);
76            confess "no body closure" unless ( $closure );
77    
78          confess "no ID in state ", dump( $state ) unless ( $state->{ID} );          confess "no ID in state ", dump( $state ) unless ( $state->{ID} );
79    
# Line 56  sub Inform { Line 83  sub Inform {
83                  $X->Header( $soap,                  $X->Header( $soap,
84                          $X->ID( $cwmp, { mustUnderstand => 1 }, $state->{ID} ),                          $X->ID( $cwmp, { mustUnderstand => 1 }, $state->{ID} ),
85                  ),                  ),
86                  $X->Body( $soap,                  $X->Body( $soap, $closure->( $X, $state ) ),
                         $X->InformResponse( $cwmp,  
                                 $X->MaxEnvelopes( $cwmp, 1 )  
                         )  
                 ),  
87          );          );
88  }  }
89    

Legend:
Removed from v.38  
changed lines
  Added in v.46

  ViewVC Help
Powered by ViewVC 1.1.26