[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 # Copyright (c) 2000-2004 Graham Barr <gbarr@pobox.com>. All rights reserved. 2 # This program is free software; you can redistribute it and/or 3 # modify it under the same terms as Perl itself. 4 5 package Net::LDAP::Control::VLVResponse; 6 7 use vars qw(@ISA $VERSION); 8 use Net::LDAP::Control; 9 10 @ISA = qw(Net::LDAP::Control); 11 $VERSION = "0.03"; 12 13 use Net::LDAP::ASN qw(VirtualListViewResponse); 14 use strict; 15 16 sub init { 17 my($self) = @_; 18 19 if (exists $self->{value}) { 20 $self->value($self->{value}); 21 } 22 else { 23 my $asn = $self->{asn} = {}; 24 25 $asn->{targetPosition} = $self->{target} || 0; 26 $asn->{contentCount} = $self->{content} || 0; 27 $asn->{virtualListViewResult} = $self->{result} || 0; 28 $asn->{contextID} = $self->{contextID} || undef; 29 } 30 31 $self; 32 } 33 34 35 sub target { 36 my $self = shift; 37 if (@_) { 38 delete $self->{value}; 39 return $self->{asn}{targetPosition} = shift; 40 } 41 $self->{asn}{targetPosition}; 42 } 43 44 sub content { 45 my $self = shift; 46 if (@_) { 47 delete $self->{value}; 48 return $self->{asn}{contentCount} = shift; 49 } 50 $self->{asn}{contentCount}; 51 } 52 53 sub result { 54 my $self = shift; 55 if (@_) { 56 delete $self->{value}; 57 return $self->{asn}{virtualListViewResult} = shift; 58 } 59 $self->{asn}{virtualListViewResult}; 60 } 61 62 sub context { 63 my $self = shift; 64 if (@_) { 65 delete $self->{value}; 66 return $self->{asn}{contextID} = shift; 67 } 68 $self->{asn}{contextID}; 69 } 70 71 sub value { 72 my $self = shift; 73 74 if (@_) { 75 unless ($self->{asn} = $VirtualListViewResponse->decode($_[0])) { 76 delete $self->{value}; 77 return undef; 78 } 79 $self->{value} = shift; 80 } 81 82 exists $self->{value} 83 ? $self->{value} 84 : $self->{value} = $VirtualListViewResponse->encode($self->{asn}); 85 } 86 87 1; 88 89 __END__ 90 91 =head1 NAME 92 93 Net::LDAP::Control::VLVResponse -- LDAPv3 Virtual List View server response 94 95 =head1 SYNOPSIS 96 97 See L<Net::LDAP::Control::VLV> 98 99 =head1 DESCRIPTION 100 101 C<Net::LDAP::Control::VLVResponse> is a sub-class of L<Net::LDAP::Control>. 102 It provides a class for manipulating the LDAP Virtual List View Response control 103 C<> 104 105 If the server supports Virtual List Views, then the response from a search operation will 106 include a VLVResponse control. 107 108 =head1 CONSTRUCTOR ARGUMENTS 109 110 In addition to the constructor arguments described in 111 L<Net::LDAP::Control> the following are provided. 112 113 =over 4 114 115 =item content 116 117 An estimate of the number of entries in the complete list. This value should 118 be used in any subsequent Virtual List View control using the same list. 119 120 =item context 121 122 An arbitary value which is used to associate subsequent requests with the 123 request which this control is a response for. This value should be copied 124 by the client into the Virtual List View control for any subsequent 125 search that uses the same list. 126 127 =item result 128 129 A result code indicating the result of the Virtual List View request. This 130 may be any of the codes listed below. 131 132 =item target 133 134 The list offset of the target entry. 135 136 =back 137 138 =head1 METHODS 139 140 As with L<Net::LDAP::Control> each constructor argument 141 described above is also avaliable as a method on the object which will 142 return the current value for the attribute if called without an argument, 143 and set a new value for the attribute if called with an argument. 144 145 =head1 RESULT CODES 146 147 Possible results from a sort request are listed below. See L<Net::LDAP::Constant> for 148 a definition of each. 149 150 =over 4 151 152 =item LDAP_SUCCESS 153 154 =item LDAP_OPERATIONS_ERROR 155 156 =item LDAP_TIMELIMIT_EXCEEDED 157 158 =item LDAP_ADMIN_LIMIT_EXCEEDED 159 160 =item LDAP_INSUFFICIENT_ACCESS 161 162 =item LDAP_BUSY 163 164 =item LDAP_UNWILLING_TO_PERFORM 165 166 =item LDAP_OTHER 167 168 =item LDAP_SORT_CONTROL_MISSING 169 170 =item LDAP_INDEX_RANGE_ERROR 171 172 =back 173 174 =head1 SEE ALSO 175 176 L<Net::LDAP>, 177 L<Net::LDAP::Control> 178 179 =head1 AUTHOR 180 181 Graham Barr E<lt>gbarr@pobox.comE<gt> 182 183 Please report any bugs, or post any suggestions, to the perl-ldap mailing list 184 E<lt>perl-ldap@perl.orgE<gt> 185 186 =head1 COPYRIGHT 187 188 Copyright (c) 2000-2004 Graham Barr. All rights reserved. This program is 189 free software; you can redistribute it and/or modify it under the same 190 terms as Perl itself. 191 192 =cut 193
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |