- Timestamp:
- Jan 12, 2013, 1:43:13 PM (12 years ago)
- Children:
- e3a0d71, 4485285
- Parents:
- 4626016
- git-author:
- Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
- git-committer:
- Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
- Location:
- perl
- Files:
-
- 63 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl.pm
rb303ba2 r7869e48 661 661 =head3 random_zephyr_signature 662 662 663 Retrieve a random line from ~/.zsigs (except those beginning with '#') 663 Retrieve a random line from ~/.zsigs (except those beginning with '#') 664 664 and use it as the zephyr signature. 665 665 -
perl/lib/BarnOwl/Complete/Filter.pm
r6dba228 r7869e48 81 81 return $INCOMPLETE if $i == $INCOMPLETE; 82 82 } 83 83 84 84 return $i; # Well, it looks like we're happy 85 85 # (Actually, I'm pretty sure this never happens...) -
perl/lib/BarnOwl/Completion/Util.pm
re6cec01 r7869e48 108 108 109 109 my ($pfx, $base) = splitfile($string); 110 110 111 111 opendir(my $dh, $dir) or return; 112 112 my @dirs = readdir($dh); … … 119 119 next; 120 120 } 121 121 122 122 my ($text, $value, $done) = ($d, "${pfx}${d}", 1); 123 123 -
perl/lib/BarnOwl/Hooks.pm
rb8a3e00 r7869e48 12 12 13 13 C<BarnOwl::Hooks> exports a set of C<BarnOwl::Hook> objects made 14 available by BarnOwl internally. 14 available by BarnOwl internally. 15 15 16 16 =head2 USAGE … … 135 135 package BarnOwl; 136 136 if(*BarnOwl::format_msg{CODE}) { 137 # if the config defines a legacy formatting function, add 'perl' as a style 137 # if the config defines a legacy formatting function, add 'perl' as a style 138 138 BarnOwl::create_style("perl", BarnOwl::Style::Legacy->new( 139 139 "BarnOwl::format_msg", … … 163 163 BarnOwl::error("Can't load BarnOwl::ModuleLoader, loadable module support disabled:\n$@"); 164 164 } 165 165 166 166 $mainLoop->check_owlconf(); 167 167 $startup->run(0); … … 171 171 sub _shutdown { 172 172 $shutdown->run; 173 173 174 174 BarnOwl::shutdown() if *BarnOwl::shutdown{CODE}; 175 175 } … … 179 179 180 180 $receiveMessage->run($m); 181 181 182 182 BarnOwl::receive_msg($m) if *BarnOwl::receive_msg{CODE}; 183 183 } … … 187 187 188 188 $newMessage->run($m); 189 189 190 190 BarnOwl::new_msg($m) if *BarnOwl::new_msg{CODE}; 191 191 } -
perl/lib/BarnOwl/Message/Zephyr.pm
r6401db3 r7869e48 165 165 } elsif($sender && !$self->is_private) { 166 166 # Possible future feature: (Optionally?) include the class and/or 167 # instance of the message being replied to in the instance of the 167 # instance of the message being replied to in the instance of the 168 168 # outgoing personal reply 169 169 $class = 'MESSAGE'; -
perl/modules/Facebook/lib/Facebook/Graph.pm
r5ef98c7 r7869e48 87 87 } 88 88 89 sub authorize { 89 sub authorize { 90 90 my ($self) = @_; 91 91 return Facebook::Graph::Authorize->new( … … 302 302 my $sarah_bownds = $fb->fetch('sarahbownds'); 303 303 my $perl_page = $fb->fetch('16665510298'); 304 304 305 305 Or better yet: 306 306 … … 311 311 ->request 312 312 ->as_hashref; 313 313 314 314 my $sarahs_picture_uri = $fb->picture('sarahbownds')->get_large->uri_as_string; 315 315 … … 319 319 ->request('https://graph.facebook.com/btaylor') 320 320 ->as_hashref; 321 322 321 322 323 323 =head2 Building A Privileged App 324 324 … … 342 342 my $q = Plack::Request->new($env); 343 343 $fb->request_access_token($q->query_param('code')); 344 344 345 345 Or if you already had the access token: 346 346 347 347 $fb->access_token($token); 348 348 349 349 Get some info: 350 350 … … 419 419 420 420 my $sarah = $fb->fetch('sarahbownds'); 421 421 422 422 my $sarah = $fb->query->find('sarahbownds')->request->as_hashref; 423 423 -
perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe1.pod
r2a42248 r7869e48 64 64 65 65 my $urlmap = Plack::App::URLMap->new; 66 66 67 67 # your code will go here 68 68 69 69 $urlmap->to_app; 70 70 71 All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it. 72 71 All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it. 72 73 73 =head2 Step 6: Create your Facebook::Graph object. 74 74 … … 80 80 secret => 'Put Your Application Secret Here', 81 81 ); 82 82 83 83 Now you need the URL you entered in step 3, and the application ID and secret you got in step 4. 84 84 … … 186 186 187 187 sudo plackup --port 80 app.psgi 188 188 189 189 Now we point our browser to: 190 190 191 191 http://www.yourapplication.com/facebook 192 192 193 193 Voila! You have created an authenticated Facebook app. If you would like to see this full program check out C<eg/recipe1.psgi> inside this distribution of L<Facebook::Graph>. 194 194 … … 196 196 =head1 CAVEATS 197 197 198 You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development. 198 You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development. 199 199 200 200 =head1 SEE ALSO -
perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe2.pod
r2a42248 r7869e48 15 15 You'll need to have all of the following modules installed in order to run this app (in addition to L<Facebook::Graph>): 16 16 17 L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP> 17 L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP> 18 18 19 19 =head2 Assumptions … … 65 65 mkdir -p /opt/webapp 66 66 cp -Rfp Facebook-Graph/eg/recipe2/* /opt/webapp 67 67 68 68 =head2 Step 6: Configure your app. 69 69 … … 73 73 vi config.yml 74 74 75 Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server. 75 Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server. 76 76 77 77 =head2 Step 7: Start it. -
perl/modules/Facebook/lib/Facebook/Graph/Picture.pm
r2a42248 r7869e48 63 63 64 64 my $fb = Facebook::Graph->new; 65 65 66 66 my $default_picture = $fb->picture('16665510298')->uri_as_string; 67 67 my $large_picture = $fb->picture('16665510298')->get_large->uri_as_string; -
perl/modules/Facebook/lib/Facebook/Graph/Publish.pm
rfe03126 r7869e48 77 77 =head1 DESCRIPTION 78 78 79 This module shouldn't be used by you directly for any purpose. 79 This module shouldn't be used by you directly for any purpose. 80 80 81 81 =head1 LEGAL -
perl/modules/Facebook/lib/Facebook/Graph/Publish/Event.pm
r2a42248 r7869e48 183 183 184 184 {"id":"1647395831_130068550371568"} 185 186 185 186 187 187 =head1 TODO 188 188 -
perl/modules/Facebook/lib/Facebook/Graph/Publish/Post.pm
r2a42248 r7869e48 381 381 =head2 set_privacy ( setting, options ) 382 382 383 A completely optional privacy setting. 383 A completely optional privacy setting. 384 384 385 385 =head2 set_properties ( properties ) … … 425 425 426 426 $post->set_target_countries( ['US'] ); 427 427 428 428 =head3 countries 429 429 … … 436 436 437 437 $post->set_target_regions( [6,53] ); 438 438 439 439 =head3 regions 440 440 … … 448 448 449 449 $post->set_target_cities( [2547804] ); 450 450 451 451 =head3 cities 452 452 … … 460 460 461 461 $post->set_target_locales( [6] ); 462 462 463 463 =head3 locales 464 464 -
perl/modules/Facebook/lib/Facebook/Graph/Query.pm
rb7fa912 r7869e48 79 79 my ($self, $limit) = @_; 80 80 $self->limit($limit); 81 return $self; 81 return $self; 82 82 } 83 83 … … 109 109 my ($self, $offset) = @_; 110 110 $self->offset($offset); 111 return $self; 111 return $self; 112 112 } 113 113 … … 215 215 216 216 my $fb = Facebook::Graph->new; 217 217 218 218 my $perl_page = $fb->find('16665510298') 219 219 ->include_metadata 220 220 ->request 221 221 ->as_hashref; 222 222 223 223 my $sarah_bownds = $fb->find('sarahbownds') 224 224 ->select_fields(qw(id name)) … … 254 254 ->request 255 255 ->as_hashref; 256 256 257 257 The above query, if you were read it like text, says: "Give me the user ids and full names of all users named Dave that have been created since yesterday, and limit the result set to the first 25." 258 258 … … 314 314 =head2 search ( query, context ) 315 315 316 Perform a keyword search on a group of items. 316 Perform a keyword search on a group of items. 317 317 318 318 If you prefer not to search by keyword see the C<from> method. -
perl/modules/Facebook/lib/Facebook/Graph/Role/Uri.pm
r2a42248 r7869e48 24 24 =head1 DESCRIPTION 25 25 26 Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API. 26 Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API. 27 27 28 28 =head1 LEGAL -
perl/modules/IRC/inc/Module/Install/Fetch.pm
r43c62e4 r7869e48 14 14 sub get_file { 15 15 my ($self, %args) = @_; 16 my ($scheme, $host, $path, $file) = 16 my ($scheme, $host, $path, $file) = 17 17 $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; 18 18 … … 20 20 $args{url} = $args{ftp_url} 21 21 or (warn("LWP support unavailable!\n"), return); 22 ($scheme, $host, $path, $file) = 22 ($scheme, $host, $path, $file) = 23 23 $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; 24 24 } -
perl/modules/IRC/inc/Module/Install/Makefile.pm
r43c62e4 r7869e48 65 65 my $clean = $self->makemaker_args->{clean} ||= {}; 66 66 %$clean = ( 67 %$clean, 67 %$clean, 68 68 FILES => join(' ', grep length, $clean->{FILES}, @_), 69 69 ); … … 74 74 my $realclean = $self->makemaker_args->{realclean} ||= {}; 75 75 %$realclean = ( 76 %$realclean, 76 %$realclean, 77 77 FILES => join(' ', grep length, $realclean->{FILES}, @_), 78 78 ); … … 181 181 my $top_version = $self->_top->VERSION || ''; 182 182 183 my $preamble = $self->preamble 183 my $preamble = $self->preamble 184 184 ? "# Preamble by $top_class $top_version\n" 185 185 . $self->preamble -
perl/modules/IRC/inc/Module/Install/Metadata.pm
r43c62e4 r7869e48 282 282 $author =~ s{E<lt>}{<}g; 283 283 $author =~ s{E<gt>}{>}g; 284 $self->author($author); 284 $self->author($author); 285 285 } 286 286 else { -
perl/modules/IRC/inc/Module/Install/Win32.pm
r43c62e4 r7869e48 17 17 $self->load('can_run'); 18 18 $self->load('get_file'); 19 19 20 20 require Config; 21 21 return unless ( -
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r13ee8f2 r7869e48 412 412 $self->{reconnect_timer}->stop; 413 413 } 414 $self->{reconnect_timer} = 414 $self->{reconnect_timer} = 415 415 BarnOwl::Timer->new( { 416 416 name => 'IRC (' . $self->alias . ') reconnect_timer', … … 472 472 $body =~ s/\cC\d+(?:,\d+)?//g; 473 473 $body =~ s/\cO//g; 474 474 475 475 my @pieces = split /\cB/, $body; 476 476 my $out = ''; -
perl/modules/Jabber/inc/Module/Install/Fetch.pm
r300b470 r7869e48 14 14 sub get_file { 15 15 my ($self, %args) = @_; 16 my ($scheme, $host, $path, $file) = 16 my ($scheme, $host, $path, $file) = 17 17 $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; 18 18 … … 20 20 $args{url} = $args{ftp_url} 21 21 or (warn("LWP support unavailable!\n"), return); 22 ($scheme, $host, $path, $file) = 22 ($scheme, $host, $path, $file) = 23 23 $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; 24 24 } -
perl/modules/Jabber/inc/Module/Install/Makefile.pm
r300b470 r7869e48 65 65 my $clean = $self->makemaker_args->{clean} ||= {}; 66 66 %$clean = ( 67 %$clean, 67 %$clean, 68 68 FILES => join(' ', grep length, $clean->{FILES}, @_), 69 69 ); … … 74 74 my $realclean = $self->makemaker_args->{realclean} ||= {}; 75 75 %$realclean = ( 76 %$realclean, 76 %$realclean, 77 77 FILES => join(' ', grep length, $realclean->{FILES}, @_), 78 78 ); … … 156 156 my $top_version = $self->_top->VERSION || ''; 157 157 158 my $preamble = $self->preamble 158 my $preamble = $self->preamble 159 159 ? "# Preamble by $top_class $top_version\n" 160 160 . $self->preamble -
perl/modules/Jabber/inc/Module/Install/Metadata.pm
r300b470 r7869e48 273 273 $author =~ s{E<lt>}{<}g; 274 274 $author =~ s{E<gt>}{>}g; 275 $self->author($author); 275 $self->author($author); 276 276 } 277 277 else { -
perl/modules/Jabber/inc/Module/Install/Win32.pm
r300b470 r7869e48 17 17 $self->load('can_run'); 18 18 $self->load('get_file'); 19 19 20 20 require Config; 21 21 return unless ( -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
r678f607 r7869e48 1050 1050 sid => $sid } ); 1051 1051 $jhash{type} = 'admin'; 1052 1052 1053 1053 BarnOwl::queue_message( BarnOwl::Message->new(%jhash) ); 1054 1054 } -
perl/modules/Jabber/lib/Net/Jabber/Client.pm
rc2bed55 r7869e48 70 70 use Net::Jabber::Protocol; 71 71 use base qw( Net::XMPP::Client Net::Jabber::Protocol ); 72 use vars qw( $VERSION ); 72 use vars qw( $VERSION ); 73 73 74 74 $VERSION = "2.0"; -
perl/modules/Jabber/lib/Net/Jabber/Component.pm
ra8c55b5 r7869e48 95 95 defaults for the two are localhost 96 96 and 5269. 97 97 98 98 Note: A change from previous 99 99 versions is that Component now … … 160 160 0 - Status ok, no data received. 161 161 undef - Status not ok, stop processing. 162 162 163 163 IMPORTANT: You need to check the output of every 164 164 Process. If you get an undef then the connection … … 196 196 bless($self, $proto); 197 197 $self->init(@_); 198 198 199 199 $self->{SERVER}->{port} = 5269; 200 200 $self->{SERVER}->{namespace} = "jabber:component:accept"; 201 201 $self->{SERVER}->{allow_register} = 0; 202 202 203 203 return $self; 204 204 } … … 217 217 my $self = shift; 218 218 my (%args) = @_; 219 219 220 220 $self->{STREAM}->SetCallBacks(node=>undef); 221 221 … … 248 248 my $self = shift; 249 249 my (%args) = @_; 250 250 251 251 my %connect; 252 252 $connect{componentname} = $args{componentname}; … … 257 257 $connect{tls} = $args{tls} if exists($args{tls}); 258 258 259 259 260 260 return %connect; 261 261 } -
perl/modules/Jabber/lib/Net/Jabber/Data.pm
rcdd3959 r7869e48 44 44 jabber:iq:roster 45 45 46 For more information on what these namespaces are for, visit 46 For more information on what these namespaces are for, visit 47 47 http://www.jabber.org and browse the Jabber Programmers Guide. 48 48 -
perl/modules/Jabber/lib/Net/Jabber/Dialback/Result.pm
rc2bed55 r7869e48 144 144 =head2 Test functions 145 145 146 DefinedTo() - returns 1 if the to attribute is defined in the 146 DefinedTo() - returns 1 if the to attribute is defined in the 147 147 <db:result/>, 0 otherwise. 148 148 149 DefinedFrom() - returns 1 if the from attribute is defined in the 149 DefinedFrom() - returns 1 if the from attribute is defined in the 150 150 <db:result/>, 0 otherwise. 151 151 152 DefinedType() - returns 1 if the type attribute is defined in the 152 DefinedType() - returns 1 if the type attribute is defined in the 153 153 <db:result/>, 0 otherwise. 154 154 -
perl/modules/Jabber/lib/Net/Jabber/Dialback/Verify.pm
rc2bed55 r7869e48 151 151 =head2 Test functions 152 152 153 DefinedTo() - returns 1 if the to attribute is defined in the 153 DefinedTo() - returns 1 if the to attribute is defined in the 154 154 <db:verify/>, 0 otherwise. 155 155 156 DefinedFrom() - returns 1 if the from attribute is defined in the 156 DefinedFrom() - returns 1 if the from attribute is defined in the 157 157 <db:verify/>, 0 otherwise. 158 158 159 DefinedType() - returns 1 if the type attribute is defined in the 159 DefinedType() - returns 1 if the type attribute is defined in the 160 160 <db:verify/>, 0 otherwise. 161 161 162 DefinedID() - returns 1 if the id attribute is defined in the 162 DefinedID() - returns 1 if the id attribute is defined in the 163 163 <db:verify/>, 0 otherwise. 164 164 -
perl/modules/Jabber/lib/Net/Jabber/IQ.pm
rc2bed55 r7869e48 54 54 sub DefinedQuery { my $self = shift; $self->DefinedChild(@_); } 55 55 sub NewQuery { my $self = shift; $self->RemoveFirstChild(); $self->NewFirstChild(@_); } 56 sub AddQuery { my $self = shift; $self->AddChild(@_); } 56 sub AddQuery { my $self = shift; $self->AddChild(@_); } 57 57 sub RemoveQuery { my $self = shift; $self->RemoveFirstChild(@_); } 58 58 … … 60 60 sub DefinedX { my $self = shift; $self->DefinedChild(@_); } 61 61 sub NewX { my $self = shift; $self->NewChild(@_); } 62 sub AddX { my $self = shift; $self->AddChild(@_); } 62 sub AddX { my $self = shift; $self->AddChild(@_); } 63 63 sub RemoveX { my $self = shift; $self->RemoveChild(@_); } 64 64 -
perl/modules/Jabber/lib/Net/Jabber/Key.pm
ra8c55b5 r7869e48 55 55 new(debug=>string, - creates the Key object. debug should 56 56 debugfh=>FileHandle, be set to the path for the debug 57 debuglevel=>integer) log to be written. If set to "stdout" 57 debuglevel=>integer) log to be written. If set to "stdout" 58 58 then the debug will go there. Also, you 59 59 can specify a filehandle that already … … 65 65 time and the PID. 66 66 67 Create(cacheString) - generates a key and caches it with the key 67 Create(cacheString) - generates a key and caches it with the key 68 68 of cacheString. Create returns the key. 69 69 … … 101 101 102 102 $self->{VERSION} = $VERSION; 103 103 104 104 $self->{CACHE} = {}; 105 105 … … 122 122 ########################################################################### 123 123 # 124 # Generate - returns a random string based on the PID and time and a 125 # random number. Then it creates an SHA1 Digest of that 124 # Generate - returns a random string based on the PID and time and a 125 # random number. Then it creates an SHA1 Digest of that 126 126 # string and returns it. 127 127 # -
perl/modules/Jabber/lib/Net/Jabber/Log.pm
rc2bed55 r7869e48 30 30 31 31 Net::Jabber::Log is a companion to the Net::Jabber module. 32 It provides the user a simple interface to set and retrieve all 32 It provides the user a simple interface to set and retrieve all 33 33 parts of a Jabber Log. 34 34 35 35 =head1 DESCRIPTION 36 36 37 To initialize the Log with a Jabber <log/> you must pass it the 37 To initialize the Log with a Jabber <log/> you must pass it the 38 38 XML::Parser Tree array. For example: 39 39 … … 97 97 GetFrom() - returns either a string with the Jabber Identifier, 98 98 GetFrom("jid") or a Net::Jabber::JID object for the person who 99 sent the <log/>. To get the JID object set 100 the string to "jid", otherwise leave blank for the 99 sent the <log/>. To get the JID object set 100 the string to "jid", otherwise leave blank for the 101 101 text string. 102 102 … … 125 125 126 126 SetFrom(string) - sets the from attribute. You can either pass a string 127 SetFrom(JID) or a JID object. They must be valid Jabber 127 SetFrom(JID) or a JID object. They must be valid Jabber 128 128 Identifiers or the server will return an error log. 129 129 (ie. jabber:bob@jabber.org/Silent Bob, etc...) … … 133 133 notice general logging 134 134 warn warning 135 alert critical error (can still run but not 135 alert critical error (can still run but not 136 136 correctly) 137 137 error fatal error (cannot run anymore) … … 141 141 =head2 Test functions 142 142 143 DefinedFrom() - returns 1 if the from attribute is defined in the 143 DefinedFrom() - returns 1 if the from attribute is defined in the 144 144 <log/>, 0 otherwise. 145 145 146 DefinedType() - returns 1 if the type attribute is defined in the 146 DefinedType() - returns 1 if the type attribute is defined in the 147 147 <log/>, 0 otherwise. 148 148 … … 170 170 my $class = ref($proto) || $proto; 171 171 my $self = { }; 172 172 173 173 $self->{VERSION} = $VERSION; 174 174 $self->{TIMESTAMP} = &Net::Jabber::GetTimeStamp("local"); … … 214 214 $type = "" unless defined($type); 215 215 my $treeName = "LOG"; 216 216 217 217 return "log" if ($AUTOLOAD eq "GetTag"); 218 218 return &XML::Stream::BuildXML(@{$self->{$treeName}}) if ($AUTOLOAD eq "GetXML"); -
perl/modules/Jabber/lib/Net/Jabber/Message.pm
rc2bed55 r7869e48 52 52 $VERSION = "2.0"; 53 53 54 sub GetX { my $self = shift; $self->GetChild(@_); } 54 sub GetX { my $self = shift; $self->GetChild(@_); } 55 55 sub DefinedX { my $self = shift; $self->DefinedChild(@_); } 56 56 sub NewX { my $self = shift; $self->NewChild(@_); } 57 sub AddX { my $self = shift; $self->AddChild(@_); } 57 sub AddX { my $self = shift; $self->AddChild(@_); } 58 58 sub RemoveX { my $self = shift; $self->RemoveChild(@_); } 59 59 -
perl/modules/Jabber/lib/Net/Jabber/Namespaces.pm
rc2bed55 r7869e48 487 487 ); 488 488 } 489 489 490 490 #----------------------------------------------------------------------------- 491 491 # __netjabber__:iq:rpc:methodResponse … … 514 514 ); 515 515 } 516 516 517 517 #----------------------------------------------------------------------------- 518 518 # __netjabber__:iq:rpc:fault … … 535 535 ); 536 536 } 537 537 538 538 #----------------------------------------------------------------------------- 539 539 # __netjabber__:iq:rpc:params … … 581 581 ); 582 582 } 583 583 584 584 #----------------------------------------------------------------------------- 585 585 # __netjabber__:iq:rpc:value … … 805 805 ); 806 806 } 807 807 808 808 #----------------------------------------------------------------------------- 809 809 # jabber:iq:version … … 848 848 ); 849 849 } 850 850 851 851 #----------------------------------------------------------------------------- 852 852 # jabber:x:conference … … 969 969 ); 970 970 } 971 971 972 972 #----------------------------------------------------------------------------- 973 973 # __netjabber__:x:data:item … … 1061 1061 ); 1062 1062 } 1063 1063 1064 1064 #----------------------------------------------------------------------------- 1065 1065 # jabber:x:event … … 1152 1152 ); 1153 1153 } 1154 1154 1155 1155 #----------------------------------------------------------------------------- 1156 1156 # __netjabber__:x:roster:item … … 1396 1396 ); 1397 1397 } 1398 1398 1399 1399 #----------------------------------------------------------------------------- 1400 1400 # __netjabber__:iq:disco:items:item … … 1433 1433 ); 1434 1434 } 1435 1435 1436 1436 #----------------------------------------------------------------------------- 1437 1437 # http://jabber.org/protocol/muc … … 1472 1472 }, 1473 1473 ); 1474 1474 1475 1475 } 1476 1476 -
perl/modules/Jabber/lib/Net/Jabber/Presence.pm
rc2bed55 r7869e48 52 52 $VERSION = "2.0"; 53 53 54 sub GetX { my $self = shift; $self->GetChild(@_); } 54 sub GetX { my $self = shift; $self->GetChild(@_); } 55 55 sub DefinedX { my $self = shift; $self->DefinedChild(@_); } 56 56 sub NewX { my $self = shift; $self->NewChild(@_); } 57 sub AddX { my $self = shift; $self->AddChild(@_); } 57 sub AddX { my $self = shift; $self->AddChild(@_); } 58 58 sub RemoveX { my $self = shift; $self->RemoveChild(@_); } 59 59 -
perl/modules/Jabber/lib/Net/Jabber/Protocol.pm
rcdd3959 r7869e48 62 62 comes back. You can optionally specify a timeout so that 63 63 you do not block forever. 64 64 65 65 nonblock - send the packet with an ID, but then return that id and 66 66 control to the master program. Net::Jabber is still … … 73 73 combined with the XPath function because you can register 74 74 a one shot function tied to the id you get back. 75 75 76 76 77 77 =head2 Basic Functions … … 145 145 =head2 Bystreams Functions 146 146 147 %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server"); 147 %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server"); 148 148 %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server", 149 timeout=>10); 149 timeout=>10); 150 150 151 151 $id = $Con->ByteStreamsProxyRequest(jid=>"proxy.server", … … 155 155 mode=>"passthru"); 156 156 157 157 158 158 %hash = $Con->ByteStreamsProxyParse($query); 159 159 160 160 161 161 $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id", 162 jid=>"proxy.server"); 162 jid=>"proxy.server"); 163 163 $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id", 164 164 jid=>"proxy.server", 165 timeout=>10); 165 timeout=>10); 166 166 167 167 $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id", … … 171 171 $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id", 172 172 jid=>"proxy.server", 173 mode=>"passthru"); 173 mode=>"passthru"); 174 174 175 175 … … 182 182 ... 183 183 ], 184 jid=>"bob\@jabber.org"); 184 jid=>"bob\@jabber.org"); 185 185 $jid = $Con->ByteStreamsOffer(sid=>"stream_id", 186 186 streamhosts=>[{},{},...], 187 187 jid=>"bob\@jabber.org", 188 timeout=>10); 188 timeout=>10); 189 189 190 190 $id = $Con->ByteStreamsOffer(sid=>"stream_id", … … 197 197 jid=>"bob\@jabber.org", 198 198 mode=>"passthru"); 199 199 200 200 =head2 Disco Functions 201 201 … … 219 219 mode=>"passthru"); 220 220 221 221 222 222 %hash = $Con->DiscoInfoParse($query); 223 223 … … 233 233 mode=>"passthru"); 234 234 235 235 236 236 %hash = $Con->DiscoItemsParse($query); 237 237 238 238 =head2 Feature Negotiation Functions 239 239 240 240 241 241 %hash = $Con->FeatureNegRequest(jid=>"jabber.org", 242 242 features=>{ feat1=>["opt1","opt2",...], … … 259 259 $iq->AddQuery($query); 260 260 261 %hash = $Con->FeatureNegParse($query); 261 %hash = $Con->FeatureNegParse($query); 262 262 263 263 =head2 File Transfer Functions … … 568 568 See DiscoInfoParse for the format 569 569 of the resulting tree. 570 570 571 571 See MODES above for using the mode 572 572 and timeout. … … 586 586 $info{feature}->{http://jabber.org/protocol/disco#info} = 1; 587 587 $info{feature}->{http://jabber.org/protocol/muc#admin} = 1; 588 588 589 589 DiscoItemsRequest(jid=>string, - sends a disco#items request to 590 590 mode=>string, the jid passed as an argument. … … 594 594 See DiscoItemsParse for the format 595 595 of the resulting tree. 596 596 597 597 See MODES above for using the mode 598 598 and timeout. … … 618 618 See DiscoInfoQuery for the format 619 619 of the features hash ref. 620 620 621 621 See DiscoInfoParse for the format 622 622 of the resulting tree. 623 623 624 624 See MODES above for using the mode 625 625 and timeout. … … 715 715 params=>array, to the specified address. Returns 716 716 mode=>string, the above data from RPCParse. 717 timeout=>int) 717 timeout=>int) 718 718 See MODES above for using the mode 719 719 and timeout. … … 780 780 present are the required fields the 781 781 server needs. 782 782 783 783 See MODES above for using the mode 784 784 and timeout. … … 910 910 croak("You must specify functions=>'' for the function call to DefineNamespace") 911 911 if !exists($args{functions}); 912 912 913 913 my %xpath; 914 914 … … 959 959 $xpath{$name}->{$type}->{skip_xmlns} = 1; 960 960 } 961 961 962 962 if ($funcHash{$type}->[$i] eq "__netjabber__:specifyname") 963 963 { … … 977 977 next; 978 978 } 979 979 980 980 my $type = $funcHash{set}->[0]; 981 981 my $xpath = $funcHash{set}->[1]; … … 993 993 next; 994 994 } 995 995 996 996 if ($type eq "scalar") 997 997 { … … 999 999 next; 1000 1000 } 1001 1001 1002 1002 if ($type eq "flag") 1003 1003 { … … 1095 1095 return $id; 1096 1096 } 1097 1097 1098 1098 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1099 1099 … … 1131 1131 ############################################################################### 1132 1132 sub BrowseParse 1133 { 1133 { 1134 1134 my $self = shift; 1135 1135 my $item = shift; … … 1209 1209 ############################################################################### 1210 1210 # 1211 # ByteStreamsProxyRequest - This queries a proxy server to get a list of 1211 # ByteStreamsProxyRequest - This queries a proxy server to get a list of 1212 1212 # 1213 1213 ############################################################################### … … 1237 1237 return $id; 1238 1238 } 1239 1239 1240 1240 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1241 1241 … … 1289 1289 push(@hosts,\%host); 1290 1290 } 1291 1291 1292 1292 return \@hosts; 1293 1293 } … … 1296 1296 ############################################################################### 1297 1297 # 1298 # ByteStreamsProxyActivate - This tells a proxy to activate the connection 1298 # ByteStreamsProxyActivate - This tells a proxy to activate the connection 1299 1299 # 1300 1300 ############################################################################### … … 1315 1315 activate=>(ref($args{recipient}) eq "Net::Jabber::JID" ? $args{recipient}->GetJID("full") : $args{recipient}) 1316 1316 ); 1317 1317 1318 1318 #-------------------------------------------------------------------------- 1319 1319 # Send the IQ with the next available ID and wait for a reply with that … … 1327 1327 return $id; 1328 1328 } 1329 1329 1330 1330 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1331 1331 1332 1332 $iq = $self->SendAndReceiveWithID($iq,$timeout); 1333 1333 … … 1388 1388 return $id; 1389 1389 } 1390 1390 1391 1391 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1392 1392 … … 1447 1447 return $id; 1448 1448 } 1449 1449 1450 1450 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1451 1451 … … 1495 1495 $disco{feature}->{$feat->GetVar()} = 1; 1496 1496 } 1497 1497 1498 1498 return \%disco; 1499 1499 } … … 1531 1531 return $id; 1532 1532 } 1533 1533 1534 1534 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1535 1535 … … 1577 1577 $disco{$item->GetJID()}->{$item->GetNode()} = $item->GetName(); 1578 1578 } 1579 1579 1580 1580 return \%disco; 1581 1581 } … … 1603 1603 1604 1604 $iq->AddQuery($query); 1605 1605 1606 1606 #-------------------------------------------------------------------------- 1607 1607 # Send the IQ with the next available ID and wait for a reply with that … … 1615 1615 return $id; 1616 1616 } 1617 1617 1618 1618 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1619 1619 … … 1659 1659 $tag = $Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'} 1660 1660 if exists($Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'}); 1661 1661 1662 1662 my $query = Net::Jabber::Query->new($tag); 1663 1663 $query->SetXMLNS("http://jabber.org/protocol/feature-neg"); 1664 1664 my $xdata = $query->NewX("jabber:x:data"); 1665 1665 1666 1666 foreach my $feature (keys(%{$features})) 1667 1667 { … … 1692 1692 1693 1693 my $xdata = $item->GetX("jabber:x:data"); 1694 1694 1695 1695 foreach my $field ($xdata->GetFields()) 1696 1696 { 1697 1697 my @options; 1698 1698 1699 1699 foreach my $option ($field->GetOptions()) 1700 1700 { … … 1704 1704 if ($#options == -1) 1705 1705 { 1706 1706 1707 1707 $feats{$field->GetVar()} = $field->GetValue(); 1708 1708 } … … 1712 1712 } 1713 1713 } 1714 1714 1715 1715 return \%feats; 1716 1716 } … … 1749 1749 $profile->SetFile(desc=>$args{desc}) if exists($args{desc}); 1750 1750 1751 $query->SetStream(mimetype=>(-B $args{filename} ? 1751 $query->SetStream(mimetype=>(-B $args{filename} ? 1752 1752 "application/octect-stream" : 1753 1753 "text/plain" … … 1781 1781 return $id; 1782 1782 } 1783 1783 1784 1784 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1785 1785 … … 1875 1875 return %tree; 1876 1876 } 1877 1877 1878 1878 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1879 1879 … … 1921 1921 1922 1922 $tree->{size} += (-s $path); 1923 1923 1924 1924 opendir(DIR, $path); 1925 1925 foreach my $file ( sort {$a cmp $b} readdir(DIR) ) … … 1939 1939 { 1940 1940 $tree->{size} += (-s "$path/$file"); 1941 1941 1942 1942 $tree->{tree}->{"$path/$file"}->{order} = $tree->{counter}; 1943 1943 $tree->{tree}->{"$path/$file"}->{sid} = … … 1970 1970 my $waitforid = delete($args{waitforid}); 1971 1971 $args{mode} = "block" if $waitforid; 1972 1972 1973 1973 my $timeout = exists($args{timeout}) ? delete($args{timeout}) : undef; 1974 1974 … … 1985 1985 return $id; 1986 1986 } 1987 1987 1988 1988 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 1989 1989 … … 2136 2136 return $id; 2137 2137 } 2138 2138 2139 2139 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 2140 2140 … … 2427 2427 return $id; 2428 2428 } 2429 2429 2430 2430 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 2431 2431 … … 2567 2567 return $id; 2568 2568 } 2569 2569 2570 2570 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 2571 2571 … … 2624 2624 my $waitforid = delete($args{waitforid}); 2625 2625 $args{mode} = "block" if $waitforid; 2626 2626 2627 2627 my $timeout = exists($args{timeout}) ? delete($args{timeout}) : undef; 2628 2628 … … 2639 2639 return $id; 2640 2640 } 2641 2641 2642 2642 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 2643 2643 … … 2698 2698 $x->SetMUC(password=>$args{password}); 2699 2699 } 2700 2700 2701 2701 return $presence->GetXML() if exists($args{'__netjabber__:test'}); 2702 2702 $self->Send($presence); … … 2749 2749 $target->{form}->[$order]->{value} = ($field->GetValue())[0]; 2750 2750 } 2751 } 2751 } 2752 2752 my $count = 0; 2753 2753 foreach my $option ($field->GetOptions()) … … 2944 2944 $body .= "Time: ".$query->GetDisplay()."\n"; 2945 2945 $body .= "Timezone: ".$query->GetTZ()."\n"; 2946 2946 2947 2947 my $message = $self->_message(); 2948 2948 $message->SetMessage(to=>$iq->GetTo(), … … 3070 3070 if ($query->DefinedMessage()); 3071 3071 } 3072 3072 3073 3073 my $message = $self->_message(); 3074 3074 $message->SetMessage(from=>$iq->GetFrom(), -
perl/modules/Jabber/lib/Net/Jabber/Server.pm
rc2bed55 r7869e48 62 62 %status = $Server->Process(); 63 63 %status = $Server->Process(5); 64 64 65 65 $Server->Stop(); 66 66 … … 98 98 0 - Status ok, no data received. 99 99 undef - Status not ok, stop processing. 100 100 101 101 IMPORTANT: You need to check the output of every 102 102 Process. If you get an undef then the connection -
perl/modules/Jabber/lib/Net/Jabber/Stanza.pm
rc2bed55 r7869e48 90 90 91 91 =pod 92 93 For more information on what these namespaces are for, visit 92 93 For more information on what these namespaces are for, visit 94 94 http://www.jabber.org and browse the Jabber Programmers Guide. 95 95 … … 97 97 98 98 ny:private:ns 99 99 100 100 Name Type Get Set Remove Defined Add 101 101 ========================== ======= === === ====== ======= === 102 102 Foo scalar X X X X 103 Bar child X 103 Bar child X 104 104 Bars child X 105 105 Test master X X … … 108 108 109 109 GetFoo(), SetFoo(), RemoveFoo(), DefinedFoo() 110 110 111 111 AddBar() 112 112 113 113 GetBars(), DefinedBars() 114 114 115 115 GetTest(), SetMaster() 116 116 … … 125 125 Name Type Get Set Remove Defined Add 126 126 ========================== ========= === === ====== ======= === 127 Activate scalar X X X X 128 SID scalar X X X X 129 StreamHostUsedJID jid X X X X 130 StreamHost child X 131 StreamHosts child X X X 132 ByteStreams master X X 127 Activate scalar X X X X 128 SID scalar X X X X 129 StreamHostUsedJID jid X X X X 130 StreamHost child X 131 StreamHosts child X X X 132 ByteStreams master X X 133 133 134 134 =head1 http://jabber.org/protocol/bytestreams - streamhost objects … … 136 136 Name Type Get Set Remove Defined Add 137 137 ========================== ========= === === ====== ======= === 138 Host scalar X X X X 139 JID jid X X X X 140 Port scalar X X X X 141 ZeroConf scalar X X X X 142 StreamHost master X X 138 Host scalar X X X X 139 JID jid X X X X 140 Port scalar X X X X 141 ZeroConf scalar X X X X 142 StreamHost master X X 143 143 144 144 =head1 http://jabber.org/protocol/commands … … 146 146 Name Type Get Set Remove Defined Add 147 147 ========================== ========= === === ====== ======= === 148 Action scalar X X X X 149 Node scalar X X X X 150 SessionID scalar X X X X 151 Status scalar X X X X 152 Note child X 153 Notes child X X X 154 Command master X X 148 Action scalar X X X X 149 Node scalar X X X X 150 SessionID scalar X X X X 151 Status scalar X X X X 152 Note child X 153 Notes child X X X 154 Command master X X 155 155 156 156 =head1 http://jabber.org/protocol/commands - note objects … … 158 158 Name Type Get Set Remove Defined Add 159 159 ========================== ========= === === ====== ======= === 160 Message scalar X X X X 161 Type scalar X X X X 162 Note master X X 160 Message scalar X X X X 161 Type scalar X X X X 162 Note master X X 163 163 164 164 =head1 http://jabber.org/protocol/disco#info … … 166 166 Name Type Get Set Remove Defined Add 167 167 ========================== ========= === === ====== ======= === 168 Node scalar X X X X 169 Feature child X 170 Features child X X X 171 Identities child X X X 172 Identity child X 173 DiscoInfo master X X 168 Node scalar X X X X 169 Feature child X 170 Features child X X X 171 Identities child X X X 172 Identity child X 173 DiscoInfo master X X 174 174 175 175 =head1 http://jabber.org/protocol/disco#info - feature objects … … 177 177 Name Type Get Set Remove Defined Add 178 178 ========================== ========= === === ====== ======= === 179 Var scalar X X X X 180 Feature master X X 179 Var scalar X X X X 180 Feature master X X 181 181 182 182 =head1 http://jabber.org/protocol/disco#info - identity objects … … 184 184 Name Type Get Set Remove Defined Add 185 185 ========================== ========= === === ====== ======= === 186 Category scalar X X X X 187 Name scalar X X X X 188 Type scalar X X X X 189 Identity master X X 186 Category scalar X X X X 187 Name scalar X X X X 188 Type scalar X X X X 189 Identity master X X 190 190 191 191 =head1 http://jabber.org/protocol/disco#items … … 193 193 Name Type Get Set Remove Defined Add 194 194 ========================== ========= === === ====== ======= === 195 Node scalar X X X X 196 Item child X 197 Items child X X X 198 DiscoItems master X X 195 Node scalar X X X X 196 Item child X 197 Items child X X X 198 DiscoItems master X X 199 199 200 200 =head1 http://jabber.org/protocol/disco#items - item objects … … 202 202 Name Type Get Set Remove Defined Add 203 203 ========================== ========= === === ====== ======= === 204 Action scalar X X X X 205 JID jid X X X X 206 Name scalar X X X X 207 Node scalar X X X X 208 Item master X X 204 Action scalar X X X X 205 JID jid X X X X 206 Name scalar X X X X 207 Node scalar X X X X 208 Item master X X 209 209 210 210 =head1 http://jabber.org/protocol/feature-neg … … 212 212 Name Type Get Set Remove Defined Add 213 213 ========================== ========= === === ====== ======= === 214 FeatureNeg master X X 214 FeatureNeg master X X 215 215 216 216 =head1 http://jabber.org/protocol/muc … … 218 218 Name Type Get Set Remove Defined Add 219 219 ========================== ========= === === ====== ======= === 220 Password scalar X X X X 221 MUC master X X 220 Password scalar X X X X 221 MUC master X X 222 222 223 223 =head1 http://jabber.org/protocol/muc#admin … … 225 225 Name Type Get Set Remove Defined Add 226 226 ========================== ========= === === ====== ======= === 227 Item child X 228 Items child X X X 229 Admin master X X 227 Item child X 228 Items child X X X 229 Admin master X X 230 230 231 231 =head1 http://jabber.org/protocol/muc#admin - item objects … … 233 233 Name Type Get Set Remove Defined Add 234 234 ========================== ========= === === ====== ======= === 235 ActorJID jid X X X X 236 Affiliation scalar X X X X 237 JID jid X X X X 238 Nick scalar X X X X 239 Reason scalar X X X X 240 Role scalar X X X X 241 Item master X X 235 ActorJID jid X X X X 236 Affiliation scalar X X X X 237 JID jid X X X X 238 Nick scalar X X X X 239 Reason scalar X X X X 240 Role scalar X X X X 241 Item master X X 242 242 243 243 =head1 http://jabber.org/protocol/muc#user … … 245 245 Name Type Get Set Remove Defined Add 246 246 ========================== ========= === === ====== ======= === 247 Alt scalar X X X X 248 Password scalar X X X X 249 StatusCode scalar X X X X 250 Invite child X X X X 251 Item child X X X X 252 User master X X 247 Alt scalar X X X X 248 Password scalar X X X X 249 StatusCode scalar X X X X 250 Invite child X X X X 251 Item child X X X X 252 User master X X 253 253 254 254 =head1 http://jabber.org/protocol/muc#user - invite objects … … 256 256 Name Type Get Set Remove Defined Add 257 257 ========================== ========= === === ====== ======= === 258 From jid X X X X 259 Reason scalar X X X X 260 To jid X X X X 261 Invite master X X 258 From jid X X X X 259 Reason scalar X X X X 260 To jid X X X X 261 Invite master X X 262 262 263 263 =head1 http://jabber.org/protocol/muc#user - item objects … … 265 265 Name Type Get Set Remove Defined Add 266 266 ========================== ========= === === ====== ======= === 267 ActorJID jid X X X X 268 Affiliation scalar X X X X 269 JID jid X X X X 270 Nick scalar X X X X 271 Reason scalar X X X X 272 Role scalar X X X X 273 Item master X X 267 ActorJID jid X X X X 268 Affiliation scalar X X X X 269 JID jid X X X X 270 Nick scalar X X X X 271 Reason scalar X X X X 272 Role scalar X X X X 273 Item master X X 274 274 275 275 =head1 http://jabber.org/protocol/pubsub … … 277 277 Name Type Get Set Remove Defined Add 278 278 ========================== ========= === === ====== ======= === 279 Affiliations child X X X X 280 Configure child X X X X 281 Create child X X X X 282 Delete child X X X X 283 Entities child X X X X 284 Entity child X X X X 285 Item child X X X X 286 Items child X X X X 287 Options child X X X X 288 Publish child X X X X 289 Purge child X X X X 290 Retract child X X X X 291 Subscribe child X X X X 292 Unsubscribe child X X X X 293 PubSub master X X 279 Affiliations child X X X X 280 Configure child X X X X 281 Create child X X X X 282 Delete child X X X X 283 Entities child X X X X 284 Entity child X X X X 285 Item child X X X X 286 Items child X X X X 287 Options child X X X X 288 Publish child X X X X 289 Purge child X X X X 290 Retract child X X X X 291 Subscribe child X X X X 292 Unsubscribe child X X X X 293 PubSub master X X 294 294 295 295 =head1 http://jabber.org/protocol/pubsub - affiliations objects … … 297 297 Name Type Get Set Remove Defined Add 298 298 ========================== ========= === === ====== ======= === 299 Entity child X X X X 300 Affiliations master X X 299 Entity child X X X X 300 Affiliations master X X 301 301 302 302 =head1 http://jabber.org/protocol/pubsub - configure objects … … 304 304 Name Type Get Set Remove Defined Add 305 305 ========================== ========= === === ====== ======= === 306 Node scalar X X X X 307 Configure master X X 306 Node scalar X X X X 307 Configure master X X 308 308 309 309 =head1 http://jabber.org/protocol/pubsub - create objects … … 311 311 Name Type Get Set Remove Defined Add 312 312 ========================== ========= === === ====== ======= === 313 Node scalar X X X X 314 Create master X X 313 Node scalar X X X X 314 Create master X X 315 315 316 316 =head1 http://jabber.org/protocol/pubsub - delete objects … … 318 318 Name Type Get Set Remove Defined Add 319 319 ========================== ========= === === ====== ======= === 320 Node scalar X X X X 321 Delete master X X 320 Node scalar X X X X 321 Delete master X X 322 322 323 323 =head1 http://jabber.org/protocol/pubsub - entities objects … … 325 325 Name Type Get Set Remove Defined Add 326 326 ========================== ========= === === ====== ======= === 327 Entity child X X X X 328 Entities master X X 327 Entity child X X X X 328 Entities master X X 329 329 330 330 =head1 http://jabber.org/protocol/pubsub - entity objects … … 332 332 Name Type Get Set Remove Defined Add 333 333 ========================== ========= === === ====== ======= === 334 Affiliation scalar X X X X 335 JID jid X X X X 336 Node scalar X X X X 337 Subscription scalar X X X X 338 SubscribeOptions child X X X X 339 Entity master X X 334 Affiliation scalar X X X X 335 JID jid X X X X 336 Node scalar X X X X 337 Subscription scalar X X X X 338 SubscribeOptions child X X X X 339 Entity master X X 340 340 341 341 =head1 http://jabber.org/protocol/pubsub - item objects … … 343 343 Name Type Get Set Remove Defined Add 344 344 ========================== ========= === === ====== ======= === 345 ID scalar X X X X 346 Payload raw X X X X 347 Item master X X 345 ID scalar X X X X 346 Payload raw X X X X 347 Item master X X 348 348 349 349 =head1 http://jabber.org/protocol/pubsub - items objects … … 351 351 Name Type Get Set Remove Defined Add 352 352 ========================== ========= === === ====== ======= === 353 MaxItems scalar X X X X 354 Node scalar X X X X 355 Item child X X X X 356 Items master X X 353 MaxItems scalar X X X X 354 Node scalar X X X X 355 Item child X X X X 356 Items master X X 357 357 358 358 =head1 http://jabber.org/protocol/pubsub - options objects … … 360 360 Name Type Get Set Remove Defined Add 361 361 ========================== ========= === === ====== ======= === 362 JID jid X X X X 363 Node scalar X X X X 364 Options master X X 362 JID jid X X X X 363 Node scalar X X X X 364 Options master X X 365 365 366 366 =head1 http://jabber.org/protocol/pubsub - publish objects … … 368 368 Name Type Get Set Remove Defined Add 369 369 ========================== ========= === === ====== ======= === 370 Node scalar X X X X 371 Item child X X X X 372 Publish master X X 370 Node scalar X X X X 371 Item child X X X X 372 Publish master X X 373 373 374 374 =head1 http://jabber.org/protocol/pubsub - purge objects … … 376 376 Name Type Get Set Remove Defined Add 377 377 ========================== ========= === === ====== ======= === 378 Node scalar X X X X 379 Purge master X X 378 Node scalar X X X X 379 Purge master X X 380 380 381 381 =head1 http://jabber.org/protocol/pubsub - retract objects … … 383 383 Name Type Get Set Remove Defined Add 384 384 ========================== ========= === === ====== ======= === 385 Node scalar X X X X 386 Item child X X X X 387 Retract master X X 385 Node scalar X X X X 386 Item child X X X X 387 Retract master X X 388 388 389 389 =head1 http://jabber.org/protocol/pubsub - subscribe objects … … 391 391 Name Type Get Set Remove Defined Add 392 392 ========================== ========= === === ====== ======= === 393 JID jid X X X X 394 Node scalar X X X X 395 Subscribe master X X 393 JID jid X X X X 394 Node scalar X X X X 395 Subscribe master X X 396 396 397 397 =head1 http://jabber.org/protocol/pubsub - subscribe-options objects … … 399 399 Name Type Get Set Remove Defined Add 400 400 ========================== ========= === === ====== ======= === 401 Required flag X X X X 402 SubscribeOptions master X X 401 Required flag X X X X 402 SubscribeOptions master X X 403 403 404 404 =head1 http://jabber.org/protocol/pubsub - unsubscribe objects … … 406 406 Name Type Get Set Remove Defined Add 407 407 ========================== ========= === === ====== ======= === 408 JID jid X X X X 409 Node scalar X X X X 410 Unsubscribe master X X 408 JID jid X X X X 409 Node scalar X X X X 410 Unsubscribe master X X 411 411 412 412 =head1 http://jabber.org/protocol/pubsub#event … … 414 414 Name Type Get Set Remove Defined Add 415 415 ========================== ========= === === ====== ======= === 416 Delete child X X X X 417 Items child X X X X 418 Event master X X 416 Delete child X X X X 417 Items child X X X X 418 Event master X X 419 419 420 420 =head1 http://jabber.org/protocol/pubsub#event - delete objects … … 422 422 Name Type Get Set Remove Defined Add 423 423 ========================== ========= === === ====== ======= === 424 Node scalar X X X X 425 Delete master X X 424 Node scalar X X X X 425 Delete master X X 426 426 427 427 =head1 http://jabber.org/protocol/pubsub#event - item objects … … 429 429 Name Type Get Set Remove Defined Add 430 430 ========================== ========= === === ====== ======= === 431 ID scalar X X X X 432 Payload raw X X X X 433 Item master X X 431 ID scalar X X X X 432 Payload raw X X X X 433 Item master X X 434 434 435 435 =head1 http://jabber.org/protocol/pubsub#event - items objects … … 437 437 Name Type Get Set Remove Defined Add 438 438 ========================== ========= === === ====== ======= === 439 Node scalar X X X X 440 Item child X X X X 441 Items master X X 439 Node scalar X X X X 440 Item child X X X X 441 Items master X X 442 442 443 443 =head1 http://jabber.org/protocol/pubsub#owner … … 445 445 Name Type Get Set Remove Defined Add 446 446 ========================== ========= === === ====== ======= === 447 Action scalar X X X X 448 Configure child X X X X 449 Owner master X X 447 Action scalar X X X X 448 Configure child X X X X 449 Owner master X X 450 450 451 451 =head1 http://jabber.org/protocol/pubsub#owner - configure objects … … 453 453 Name Type Get Set Remove Defined Add 454 454 ========================== ========= === === ====== ======= === 455 Node scalar X X X X 456 Configure master X X 455 Node scalar X X X X 456 Configure master X X 457 457 458 458 =head1 http://jabber.org/protocol/si … … 460 460 Name Type Get Set Remove Defined Add 461 461 ========================== ========= === === ====== ======= === 462 ID scalar X X X X 463 MimeType scalar X X X X 464 Profile scalar X X X X 465 Stream master X X 462 ID scalar X X X X 463 MimeType scalar X X X X 464 Profile scalar X X X X 465 Stream master X X 466 466 467 467 =head1 http://jabber.org/protocol/si/profile/file-transfer … … 469 469 Name Type Get Set Remove Defined Add 470 470 ========================== ========= === === ====== ======= === 471 Date scalar X X X X 472 Desc scalar X X X X 473 Hash scalar X X X X 474 Name scalar X X X X 475 Range flag X X X X 476 RangeLength scalar X X X X 477 RangeOffset scalar X X X X 478 Size scalar X X X X 479 File master X X 471 Date scalar X X X X 472 Desc scalar X X X X 473 Hash scalar X X X X 474 Name scalar X X X X 475 Range flag X X X X 476 RangeLength scalar X X X X 477 RangeOffset scalar X X X X 478 Size scalar X X X X 479 File master X X 480 480 481 481 =head1 jabber:iq:agent - DEPRECATED … … 483 483 Name Type Get Set Remove Defined Add 484 484 ========================== ========= === === ====== ======= === 485 Agents flag X X X X 486 Description scalar X X X X 487 GroupChat flag X X X X 488 JID jid X X X X 489 Name scalar X X X X 490 Register flag X X X X 491 Search flag X X X X 492 Service scalar X X X X 493 Transport scalar X X X X 494 URL scalar X X X X 495 Agent master X X 485 Agents flag X X X X 486 Description scalar X X X X 487 GroupChat flag X X X X 488 JID jid X X X X 489 Name scalar X X X X 490 Register flag X X X X 491 Search flag X X X X 492 Service scalar X X X X 493 Transport scalar X X X X 494 URL scalar X X X X 495 Agent master X X 496 496 497 497 =head1 jabber:iq:agents - DEPRECATED … … 499 499 Name Type Get Set Remove Defined Add 500 500 ========================== ========= === === ====== ======= === 501 Agent child X 502 Agents child X X X 501 Agent child X 502 Agents child X X X 503 503 504 504 =head1 jabber:iq:autoupdate … … 506 506 Name Type Get Set Remove Defined Add 507 507 ========================== ========= === === ====== ======= === 508 Beta child X 509 Dev child X 510 Release child X 511 Releases child X X X 508 Beta child X 509 Dev child X 510 Release child X 511 Releases child X X X 512 512 513 513 =head1 jabber:iq:autoupdate - release objects … … 515 515 Name Type Get Set Remove Defined Add 516 516 ========================== ========= === === ====== ======= === 517 Desc scalar X X X X 518 Priority scalar X X X X 519 URL scalar X X X X 520 Version scalar X X X X 521 Release master X X 517 Desc scalar X X X X 518 Priority scalar X X X X 519 URL scalar X X X X 520 Version scalar X X X X 521 Release master X X 522 522 523 523 =head1 jabber:iq:browse - DEPRECATED … … 525 525 Name Type Get Set Remove Defined Add 526 526 ========================== ========= === === ====== ======= === 527 Category scalar X X X X 528 JID jid X X X X 529 NS array X X X X 530 Name scalar X X X X 531 Type scalar X X X X 532 Item child X 533 Items child X X X 534 Browse master X X 527 Category scalar X X X X 528 JID jid X X X X 529 NS array X X X X 530 Name scalar X X X X 531 Type scalar X X X X 532 Item child X 533 Items child X X X 534 Browse master X X 535 535 536 536 =head1 jabber:iq:browse - item objects - DEPRECATED … … 538 538 Name Type Get Set Remove Defined Add 539 539 ========================== ========= === === ====== ======= === 540 Category scalar X X X X 541 JID jid X X X X 542 NS array X X X X 543 Name scalar X X X X 544 Type scalar X X X X 545 Item child X 546 Items child X X X 547 Browse master X X 540 Category scalar X X X X 541 JID jid X X X X 542 NS array X X X X 543 Name scalar X X X X 544 Type scalar X X X X 545 Item child X 546 Items child X X X 547 Browse master X X 548 548 549 549 =head1 jabber:iq:conference … … 551 551 Name Type Get Set Remove Defined Add 552 552 ========================== ========= === === ====== ======= === 553 ID scalar X X X X 554 Name scalar X X X X 555 Nick scalar X X X X 556 Privacy flag X X X X 557 Secret scalar X X X X 558 Conference master X X 553 ID scalar X X X X 554 Name scalar X X X X 555 Nick scalar X X X X 556 Privacy flag X X X X 557 Secret scalar X X X X 558 Conference master X X 559 559 560 560 =head1 jabber:iq:filter - DEPRECATED … … 562 562 Name Type Get Set Remove Defined Add 563 563 ========================== ========= === === ====== ======= === 564 Rule child X 565 Rules child X X X 564 Rule child X 565 Rules child X X X 566 566 567 567 =head1 jabber:iq:filter - rule objects - DEPRECATED … … 569 569 Name Type Get Set Remove Defined Add 570 570 ========================== ========= === === ====== ======= === 571 Body scalar X X X X 572 Continued scalar X X X X 573 Drop scalar X X X X 574 Edit scalar X X X X 575 Error scalar X X X X 576 From scalar X X X X 577 Offline scalar X X X X 578 Reply scalar X X X X 579 Resource scalar X X X X 580 Show scalar X X X X 581 Size scalar X X X X 582 Subject scalar X X X X 583 Time scalar X X X X 584 Type scalar X X X X 585 Unavailable scalar X X X X 586 Rule master X X 571 Body scalar X X X X 572 Continued scalar X X X X 573 Drop scalar X X X X 574 Edit scalar X X X X 575 Error scalar X X X X 576 From scalar X X X X 577 Offline scalar X X X X 578 Reply scalar X X X X 579 Resource scalar X X X X 580 Show scalar X X X X 581 Size scalar X X X X 582 Subject scalar X X X X 583 Time scalar X X X X 584 Type scalar X X X X 585 Unavailable scalar X X X X 586 Rule master X X 587 587 588 588 =head1 jabber:iq:gateway … … 590 590 Name Type Get Set Remove Defined Add 591 591 ========================== ========= === === ====== ======= === 592 Desc scalar X X X X 593 JID jid X X X X 594 Prompt scalar X X X X 595 Gateway master X X 592 Desc scalar X X X X 593 JID jid X X X X 594 Prompt scalar X X X X 595 Gateway master X X 596 596 597 597 =head1 jabber:iq:last … … 599 599 Name Type Get Set Remove Defined Add 600 600 ========================== ========= === === ====== ======= === 601 Message scalar X X X X 602 Seconds scalar X X X X 603 Last master X X 601 Message scalar X X X X 602 Seconds scalar X X X X 603 Last master X X 604 604 605 605 =head1 jabber:iq:oob … … 607 607 Name Type Get Set Remove Defined Add 608 608 ========================== ========= === === ====== ======= === 609 Desc scalar X X X X 610 URL scalar X X X X 611 Oob master X X 609 Desc scalar X X X X 610 URL scalar X X X X 611 Oob master X X 612 612 613 613 =head1 jabber:iq:pass … … 615 615 Name Type Get Set Remove Defined Add 616 616 ========================== ========= === === ====== ======= === 617 Client scalar X X X X 618 ClientPort scalar X X X X 619 Close flag X X X X 620 Expire scalar X X X X 621 OneShot flag X X X X 622 Proxy scalar X X X X 623 ProxyPort scalar X X X X 624 Server scalar X X X X 625 ServerPort scalar X X X X 626 Pass master X X 617 Client scalar X X X X 618 ClientPort scalar X X X X 619 Close flag X X X X 620 Expire scalar X X X X 621 OneShot flag X X X X 622 Proxy scalar X X X X 623 ProxyPort scalar X X X X 624 Server scalar X X X X 625 ServerPort scalar X X X X 626 Pass master X X 627 627 628 628 =head1 jabber:iq:rpc … … 630 630 Name Type Get Set Remove Defined Add 631 631 ========================== ========= === === ====== ======= === 632 MethodCall child X X X X 633 MethodResponse child X X X X 632 MethodCall child X X X X 633 MethodResponse child X X X X 634 634 635 635 =head1 jabber:iq:rpc - array objects … … 637 637 Name Type Get Set Remove Defined Add 638 638 ========================== ========= === === ====== ======= === 639 Data child X 640 Datas child X X X 639 Data child X 640 Datas child X X X 641 641 642 642 =head1 jabber:iq:rpc - data objects … … 644 644 Name Type Get Set Remove Defined Add 645 645 ========================== ========= === === ====== ======= === 646 Value child X X X X 646 Value child X X X X 647 647 648 648 =head1 jabber:iq:rpc - fault objects … … 650 650 Name Type Get Set Remove Defined Add 651 651 ========================== ========= === === ====== ======= === 652 Value child X X X X 652 Value child X X X X 653 653 654 654 =head1 jabber:iq:rpc - member objects … … 656 656 Name Type Get Set Remove Defined Add 657 657 ========================== ========= === === ====== ======= === 658 Name scalar X X X X 659 Value child X X X X 660 Member master X X 658 Name scalar X X X X 659 Value child X X X X 660 Member master X X 661 661 662 662 =head1 jabber:iq:rpc - methodCall objects … … 664 664 Name Type Get Set Remove Defined Add 665 665 ========================== ========= === === ====== ======= === 666 MethodName scalar X X X X 667 Params child X X X X 668 MethodCall master X X 666 MethodName scalar X X X X 667 Params child X X X X 668 MethodCall master X X 669 669 670 670 =head1 jabber:iq:rpc - methodResponse objects … … 672 672 Name Type Get Set Remove Defined Add 673 673 ========================== ========= === === ====== ======= === 674 Fault child X X X X 675 Params child X X X X 674 Fault child X X X X 675 Params child X X X X 676 676 677 677 =head1 jabber:iq:rpc - param objects … … 679 679 Name Type Get Set Remove Defined Add 680 680 ========================== ========= === === ====== ======= === 681 Value child X X X X 681 Value child X X X X 682 682 683 683 =head1 jabber:iq:rpc - params objects … … 685 685 Name Type Get Set Remove Defined Add 686 686 ========================== ========= === === ====== ======= === 687 Param child X 688 Params child X X X 687 Param child X 688 Params child X X X 689 689 690 690 =head1 jabber:iq:rpc - struct objects … … 692 692 Name Type Get Set Remove Defined Add 693 693 ========================== ========= === === ====== ======= === 694 Member child X 695 Members child X X X 694 Member child X 695 Members child X X X 696 696 697 697 =head1 jabber:iq:rpc - value objects … … 699 699 Name Type Get Set Remove Defined Add 700 700 ========================== ========= === === ====== ======= === 701 Base64 scalar X X X X 702 Boolean scalar X X X X 703 DateTime scalar X X X X 704 Double scalar X X X X 705 I4 scalar X X X X 706 Int scalar X X X X 707 String scalar X X X X 708 Value scalar X X X X 709 Array child X X X X 710 Struct child X X X X 711 RPCValue master X X 701 Base64 scalar X X X X 702 Boolean scalar X X X X 703 DateTime scalar X X X X 704 Double scalar X X X X 705 I4 scalar X X X X 706 Int scalar X X X X 707 String scalar X X X X 708 Value scalar X X X X 709 Array child X X X X 710 Struct child X X X X 711 RPCValue master X X 712 712 713 713 =head1 jabber:iq:search … … 715 715 Name Type Get Set Remove Defined Add 716 716 ========================== ========= === === ====== ======= === 717 Email scalar X X X X 718 Family scalar X X X X 719 First scalar X X X X 720 Given scalar X X X X 721 Instructions scalar X X X X 722 Key scalar X X X X 723 Last scalar X X X X 724 Name scalar X X X X 725 Nick scalar X X X X 726 Truncated flag X X X X 727 Item child X 728 Items child X X X 729 Search master X X 717 Email scalar X X X X 718 Family scalar X X X X 719 First scalar X X X X 720 Given scalar X X X X 721 Instructions scalar X X X X 722 Key scalar X X X X 723 Last scalar X X X X 724 Name scalar X X X X 725 Nick scalar X X X X 726 Truncated flag X X X X 727 Item child X 728 Items child X X X 729 Search master X X 730 730 731 731 =head1 jabber:iq:search - item objects … … 733 733 Name Type Get Set Remove Defined Add 734 734 ========================== ========= === === ====== ======= === 735 Email scalar X X X X 736 Family scalar X X X X 737 First scalar X X X X 738 Given scalar X X X X 739 JID jid X X X X 740 Key scalar X X X X 741 Last scalar X X X X 742 Name scalar X X X X 743 Nick scalar X X X X 744 Item master X X 735 Email scalar X X X X 736 Family scalar X X X X 737 First scalar X X X X 738 Given scalar X X X X 739 JID jid X X X X 740 Key scalar X X X X 741 Last scalar X X X X 742 Name scalar X X X X 743 Nick scalar X X X X 744 Item master X X 745 745 746 746 =head1 jabber:iq:time … … 748 748 Name Type Get Set Remove Defined Add 749 749 ========================== ========= === === ====== ======= === 750 Display special X X X X 751 TZ special X X X X 752 UTC special X X X X 753 Time master X X 750 Display special X X X X 751 TZ special X X X X 752 UTC special X X X X 753 Time master X X 754 754 755 755 =head1 jabber:iq:version … … 757 757 Name Type Get Set Remove Defined Add 758 758 ========================== ========= === === ====== ======= === 759 Name scalar X X X X 760 OS special X X X X 761 Ver special X X X X 762 Version master X X 759 Name scalar X X X X 760 OS special X X X X 761 Ver special X X X X 762 Version master X X 763 763 764 764 =head1 jabber:x:autoupdate … … 766 766 Name Type Get Set Remove Defined Add 767 767 ========================== ========= === === ====== ======= === 768 JID jid X X X X 769 Autoupdate master X X 768 JID jid X X X X 769 Autoupdate master X X 770 770 771 771 =head1 jabber:x:conference … … 773 773 Name Type Get Set Remove Defined Add 774 774 ========================== ========= === === ====== ======= === 775 JID jid X X X X 776 Conference master X X 775 JID jid X X X X 776 Conference master X X 777 777 778 778 =head1 jabber:x:data … … 780 780 Name Type Get Set Remove Defined Add 781 781 ========================== ========= === === ====== ======= === 782 Form scalar X X X X 783 Instructions scalar X X X X 784 Title scalar X X X X 785 Type scalar X X X X 786 Field child X 787 Fields child X X X 788 Item child X 789 Items child X X X 790 Reported child X X X X 791 Data master X X 782 Form scalar X X X X 783 Instructions scalar X X X X 784 Title scalar X X X X 785 Type scalar X X X X 786 Field child X 787 Fields child X X X 788 Item child X 789 Items child X X X 790 Reported child X X X X 791 Data master X X 792 792 793 793 =head1 jabber:x:data - field objects … … 795 795 Name Type Get Set Remove Defined Add 796 796 ========================== ========= === === ====== ======= === 797 Desc scalar X X X X 798 Label scalar X X X X 799 Required flag X X X X 800 Type scalar X X X X 801 Value array X X X X 802 Var scalar X X X X 803 Option child X 804 Options child X X X 805 Field master X X 797 Desc scalar X X X X 798 Label scalar X X X X 799 Required flag X X X X 800 Type scalar X X X X 801 Value array X X X X 802 Var scalar X X X X 803 Option child X 804 Options child X X X 805 Field master X X 806 806 807 807 =head1 jabber:x:data - item objects … … 809 809 Name Type Get Set Remove Defined Add 810 810 ========================== ========= === === ====== ======= === 811 Field child X 812 Fields child X X X 813 Item master X X 811 Field child X 812 Fields child X X X 813 Item master X X 814 814 815 815 =head1 jabber:x:data - option objects … … 817 817 Name Type Get Set Remove Defined Add 818 818 ========================== ========= === === ====== ======= === 819 Label scalar X X X X 820 Value scalar X X X X 821 Option master X X 819 Label scalar X X X X 820 Value scalar X X X X 821 Option master X X 822 822 823 823 =head1 jabber:x:data - reported objects … … 825 825 Name Type Get Set Remove Defined Add 826 826 ========================== ========= === === ====== ======= === 827 Field child X 828 Fields child X X X 829 Reported master X X 827 Field child X 828 Fields child X X X 829 Reported master X X 830 830 831 831 =head1 jabber:x:delay … … 833 833 Name Type Get Set Remove Defined Add 834 834 ========================== ========= === === ====== ======= === 835 From jid X X X X 836 Message scalar X X X X 837 Stamp timestamp X X X X 838 Delay master X X 835 From jid X X X X 836 Message scalar X X X X 837 Stamp timestamp X X X X 838 Delay master X X 839 839 840 840 =head1 jabber:x:encrypted … … 842 842 Name Type Get Set Remove Defined Add 843 843 ========================== ========= === === ====== ======= === 844 Message scalar X X X X 845 Encrypted master X X 844 Message scalar X X X X 845 Encrypted master X X 846 846 847 847 =head1 jabber:x:event … … 849 849 Name Type Get Set Remove Defined Add 850 850 ========================== ========= === === ====== ======= === 851 Composing flag X X X X 852 Delivered flag X X X X 853 Displayed flag X X X X 854 ID scalar X X X X 855 Offline flag X X X X 856 Event master X X 851 Composing flag X X X X 852 Delivered flag X X X X 853 Displayed flag X X X X 854 ID scalar X X X X 855 Offline flag X X X X 856 Event master X X 857 857 858 858 =head1 jabber:x:expire … … 860 860 Name Type Get Set Remove Defined Add 861 861 ========================== ========= === === ====== ======= === 862 Seconds scalar X X X X 863 Expire master X X 862 Seconds scalar X X X X 863 Expire master X X 864 864 865 865 =head1 jabber:x:oob … … 867 867 Name Type Get Set Remove Defined Add 868 868 ========================== ========= === === ====== ======= === 869 Desc scalar X X X X 870 URL scalar X X X X 871 Oob master X X 869 Desc scalar X X X X 870 URL scalar X X X X 871 Oob master X X 872 872 873 873 =head1 jabber:x:roster … … 875 875 Name Type Get Set Remove Defined Add 876 876 ========================== ========= === === ====== ======= === 877 Item child X 878 Items child X X X 879 Roster master X X 877 Item child X 878 Items child X X X 879 Roster master X X 880 880 881 881 =head1 jabber:x:roster - item objects … … 883 883 Name Type Get Set Remove Defined Add 884 884 ========================== ========= === === ====== ======= === 885 Ask scalar X X X X 886 Group array X X X X 887 JID jid X X X X 888 Name scalar X X X X 889 Subscription scalar X X X X 890 Item master X X 885 Ask scalar X X X X 886 Group array X X X X 887 JID jid X X X X 888 Name scalar X X X X 889 Subscription scalar X X X X 890 Item master X X 891 891 892 892 =head1 jabber:x:signed … … 894 894 Name Type Get Set Remove Defined Add 895 895 ========================== ========= === === ====== ======= === 896 Signature scalar X X X X 897 Signed master X X 896 Signature scalar X X X X 897 Signed master X X 898 898 899 899 # DOC_BEGIN … … 902 902 Name Type Get Set Remove Defined Add 903 903 ========================== ========= === === ====== ======= === 904 Activate scalar X X X X 905 SID scalar X X X X 906 StreamHostUsedJID jid X X X X 907 StreamHost child X 908 StreamHosts child X X X 909 ByteStreams master X X 904 Activate scalar X X X X 905 SID scalar X X X X 906 StreamHostUsedJID jid X X X X 907 StreamHost child X 908 StreamHosts child X X X 909 ByteStreams master X X 910 910 911 911 =head1 http://jabber.org/protocol/bytestreams - streamhost objects … … 913 913 Name Type Get Set Remove Defined Add 914 914 ========================== ========= === === ====== ======= === 915 Host scalar X X X X 916 JID jid X X X X 917 Port scalar X X X X 918 ZeroConf scalar X X X X 919 StreamHost master X X 915 Host scalar X X X X 916 JID jid X X X X 917 Port scalar X X X X 918 ZeroConf scalar X X X X 919 StreamHost master X X 920 920 921 921 =head1 http://jabber.org/protocol/commands … … 923 923 Name Type Get Set Remove Defined Add 924 924 ========================== ========= === === ====== ======= === 925 Action scalar X X X X 926 Node scalar X X X X 927 SessionID scalar X X X X 928 Status scalar X X X X 929 Note child X 930 Notes child X X X 931 Command master X X 925 Action scalar X X X X 926 Node scalar X X X X 927 SessionID scalar X X X X 928 Status scalar X X X X 929 Note child X 930 Notes child X X X 931 Command master X X 932 932 933 933 =head1 http://jabber.org/protocol/commands - note objects … … 935 935 Name Type Get Set Remove Defined Add 936 936 ========================== ========= === === ====== ======= === 937 Message scalar X X X X 938 Type scalar X X X X 939 Note master X X 937 Message scalar X X X X 938 Type scalar X X X X 939 Note master X X 940 940 941 941 =head1 http://jabber.org/protocol/disco#info … … 943 943 Name Type Get Set Remove Defined Add 944 944 ========================== ========= === === ====== ======= === 945 Node scalar X X X X 946 Feature child X 947 Features child X X X 948 Identities child X X X 949 Identity child X 950 DiscoInfo master X X 945 Node scalar X X X X 946 Feature child X 947 Features child X X X 948 Identities child X X X 949 Identity child X 950 DiscoInfo master X X 951 951 952 952 =head1 http://jabber.org/protocol/disco#info - feature objects … … 954 954 Name Type Get Set Remove Defined Add 955 955 ========================== ========= === === ====== ======= === 956 Var scalar X X X X 957 Feature master X X 956 Var scalar X X X X 957 Feature master X X 958 958 959 959 =head1 http://jabber.org/protocol/disco#info - identity objects … … 961 961 Name Type Get Set Remove Defined Add 962 962 ========================== ========= === === ====== ======= === 963 Category scalar X X X X 964 Name scalar X X X X 965 Type scalar X X X X 966 Identity master X X 963 Category scalar X X X X 964 Name scalar X X X X 965 Type scalar X X X X 966 Identity master X X 967 967 968 968 =head1 http://jabber.org/protocol/disco#items … … 970 970 Name Type Get Set Remove Defined Add 971 971 ========================== ========= === === ====== ======= === 972 Node scalar X X X X 973 Item child X 974 Items child X X X 975 DiscoItems master X X 972 Node scalar X X X X 973 Item child X 974 Items child X X X 975 DiscoItems master X X 976 976 977 977 =head1 http://jabber.org/protocol/disco#items - item objects … … 979 979 Name Type Get Set Remove Defined Add 980 980 ========================== ========= === === ====== ======= === 981 Action scalar X X X X 982 JID jid X X X X 983 Name scalar X X X X 984 Node scalar X X X X 985 Item master X X 981 Action scalar X X X X 982 JID jid X X X X 983 Name scalar X X X X 984 Node scalar X X X X 985 Item master X X 986 986 987 987 =head1 http://jabber.org/protocol/feature-neg … … 989 989 Name Type Get Set Remove Defined Add 990 990 ========================== ========= === === ====== ======= === 991 FeatureNeg master X X 991 FeatureNeg master X X 992 992 993 993 =head1 http://jabber.org/protocol/muc … … 995 995 Name Type Get Set Remove Defined Add 996 996 ========================== ========= === === ====== ======= === 997 Password scalar X X X X 998 MUC master X X 997 Password scalar X X X X 998 MUC master X X 999 999 1000 1000 =head1 http://jabber.org/protocol/muc#admin … … 1002 1002 Name Type Get Set Remove Defined Add 1003 1003 ========================== ========= === === ====== ======= === 1004 Item child X 1005 Items child X X X 1006 Admin master X X 1004 Item child X 1005 Items child X X X 1006 Admin master X X 1007 1007 1008 1008 =head1 http://jabber.org/protocol/muc#admin - item objects … … 1010 1010 Name Type Get Set Remove Defined Add 1011 1011 ========================== ========= === === ====== ======= === 1012 ActorJID jid X X X X 1013 Affiliation scalar X X X X 1014 JID jid X X X X 1015 Nick scalar X X X X 1016 Reason scalar X X X X 1017 Role scalar X X X X 1018 Item master X X 1012 ActorJID jid X X X X 1013 Affiliation scalar X X X X 1014 JID jid X X X X 1015 Nick scalar X X X X 1016 Reason scalar X X X X 1017 Role scalar X X X X 1018 Item master X X 1019 1019 1020 1020 =head1 http://jabber.org/protocol/muc#user … … 1022 1022 Name Type Get Set Remove Defined Add 1023 1023 ========================== ========= === === ====== ======= === 1024 Alt scalar X X X X 1025 Password scalar X X X X 1026 StatusCode scalar X X X X 1027 Invite child X X X X 1028 Item child X X X X 1029 User master X X 1024 Alt scalar X X X X 1025 Password scalar X X X X 1026 StatusCode scalar X X X X 1027 Invite child X X X X 1028 Item child X X X X 1029 User master X X 1030 1030 1031 1031 =head1 http://jabber.org/protocol/muc#user - invite objects … … 1033 1033 Name Type Get Set Remove Defined Add 1034 1034 ========================== ========= === === ====== ======= === 1035 From jid X X X X 1036 Reason scalar X X X X 1037 To jid X X X X 1038 Invite master X X 1035 From jid X X X X 1036 Reason scalar X X X X 1037 To jid X X X X 1038 Invite master X X 1039 1039 1040 1040 =head1 http://jabber.org/protocol/muc#user - item objects … … 1042 1042 Name Type Get Set Remove Defined Add 1043 1043 ========================== ========= === === ====== ======= === 1044 ActorJID jid X X X X 1045 Affiliation scalar X X X X 1046 JID jid X X X X 1047 Nick scalar X X X X 1048 Reason scalar X X X X 1049 Role scalar X X X X 1050 Item master X X 1044 ActorJID jid X X X X 1045 Affiliation scalar X X X X 1046 JID jid X X X X 1047 Nick scalar X X X X 1048 Reason scalar X X X X 1049 Role scalar X X X X 1050 Item master X X 1051 1051 1052 1052 =head1 http://jabber.org/protocol/pubsub … … 1054 1054 Name Type Get Set Remove Defined Add 1055 1055 ========================== ========= === === ====== ======= === 1056 Affiliations child X X X X 1057 Configure child X X X X 1058 Create child X X X X 1059 Delete child X X X X 1060 Entities child X X X X 1061 Entity child X X X X 1062 Item child X X X X 1063 Items child X X X X 1064 Options child X X X X 1065 Publish child X X X X 1066 Purge child X X X X 1067 Retract child X X X X 1068 Subscribe child X X X X 1069 Unsubscribe child X X X X 1070 PubSub master X X 1056 Affiliations child X X X X 1057 Configure child X X X X 1058 Create child X X X X 1059 Delete child X X X X 1060 Entities child X X X X 1061 Entity child X X X X 1062 Item child X X X X 1063 Items child X X X X 1064 Options child X X X X 1065 Publish child X X X X 1066 Purge child X X X X 1067 Retract child X X X X 1068 Subscribe child X X X X 1069 Unsubscribe child X X X X 1070 PubSub master X X 1071 1071 1072 1072 =head1 http://jabber.org/protocol/pubsub - affiliations objects … … 1074 1074 Name Type Get Set Remove Defined Add 1075 1075 ========================== ========= === === ====== ======= === 1076 Entity child X X X X 1077 Affiliations master X X 1076 Entity child X X X X 1077 Affiliations master X X 1078 1078 1079 1079 =head1 http://jabber.org/protocol/pubsub - configure objects … … 1081 1081 Name Type Get Set Remove Defined Add 1082 1082 ========================== ========= === === ====== ======= === 1083 Node scalar X X X X 1084 Configure master X X 1083 Node scalar X X X X 1084 Configure master X X 1085 1085 1086 1086 =head1 http://jabber.org/protocol/pubsub - create objects … … 1088 1088 Name Type Get Set Remove Defined Add 1089 1089 ========================== ========= === === ====== ======= === 1090 Node scalar X X X X 1091 Create master X X 1090 Node scalar X X X X 1091 Create master X X 1092 1092 1093 1093 =head1 http://jabber.org/protocol/pubsub - delete objects … … 1095 1095 Name Type Get Set Remove Defined Add 1096 1096 ========================== ========= === === ====== ======= === 1097 Node scalar X X X X 1098 Delete master X X 1097 Node scalar X X X X 1098 Delete master X X 1099 1099 1100 1100 =head1 http://jabber.org/protocol/pubsub - entities objects … … 1102 1102 Name Type Get Set Remove Defined Add 1103 1103 ========================== ========= === === ====== ======= === 1104 Entity child X X X X 1105 Entities master X X 1104 Entity child X X X X 1105 Entities master X X 1106 1106 1107 1107 =head1 http://jabber.org/protocol/pubsub - entity objects … … 1109 1109 Name Type Get Set Remove Defined Add 1110 1110 ========================== ========= === === ====== ======= === 1111 Affiliation scalar X X X X 1112 JID jid X X X X 1113 Node scalar X X X X 1114 Subscription scalar X X X X 1115 SubscribeOptions child X X X X 1116 Entity master X X 1111 Affiliation scalar X X X X 1112 JID jid X X X X 1113 Node scalar X X X X 1114 Subscription scalar X X X X 1115 SubscribeOptions child X X X X 1116 Entity master X X 1117 1117 1118 1118 =head1 http://jabber.org/protocol/pubsub - item objects … … 1120 1120 Name Type Get Set Remove Defined Add 1121 1121 ========================== ========= === === ====== ======= === 1122 ID scalar X X X X 1123 Payload raw X X X X 1124 Item master X X 1122 ID scalar X X X X 1123 Payload raw X X X X 1124 Item master X X 1125 1125 1126 1126 =head1 http://jabber.org/protocol/pubsub - items objects … … 1128 1128 Name Type Get Set Remove Defined Add 1129 1129 ========================== ========= === === ====== ======= === 1130 MaxItems scalar X X X X 1131 Node scalar X X X X 1132 Item child X X X X 1133 Items master X X 1130 MaxItems scalar X X X X 1131 Node scalar X X X X 1132 Item child X X X X 1133 Items master X X 1134 1134 1135 1135 =head1 http://jabber.org/protocol/pubsub - options objects … … 1137 1137 Name Type Get Set Remove Defined Add 1138 1138 ========================== ========= === === ====== ======= === 1139 JID jid X X X X 1140 Node scalar X X X X 1141 Options master X X 1139 JID jid X X X X 1140 Node scalar X X X X 1141 Options master X X 1142 1142 1143 1143 =head1 http://jabber.org/protocol/pubsub - publish objects … … 1145 1145 Name Type Get Set Remove Defined Add 1146 1146 ========================== ========= === === ====== ======= === 1147 Node scalar X X X X 1148 Item child X X X X 1149 Publish master X X 1147 Node scalar X X X X 1148 Item child X X X X 1149 Publish master X X 1150 1150 1151 1151 =head1 http://jabber.org/protocol/pubsub - purge objects … … 1153 1153 Name Type Get Set Remove Defined Add 1154 1154 ========================== ========= === === ====== ======= === 1155 Node scalar X X X X 1156 Purge master X X 1155 Node scalar X X X X 1156 Purge master X X 1157 1157 1158 1158 =head1 http://jabber.org/protocol/pubsub - retract objects … … 1160 1160 Name Type Get Set Remove Defined Add 1161 1161 ========================== ========= === === ====== ======= === 1162 Node scalar X X X X 1163 Item child X X X X 1164 Retract master X X 1162 Node scalar X X X X 1163 Item child X X X X 1164 Retract master X X 1165 1165 1166 1166 =head1 http://jabber.org/protocol/pubsub - subscribe objects … … 1168 1168 Name Type Get Set Remove Defined Add 1169 1169 ========================== ========= === === ====== ======= === 1170 JID jid X X X X 1171 Node scalar X X X X 1172 Subscribe master X X 1170 JID jid X X X X 1171 Node scalar X X X X 1172 Subscribe master X X 1173 1173 1174 1174 =head1 http://jabber.org/protocol/pubsub - subscribe-options objects … … 1176 1176 Name Type Get Set Remove Defined Add 1177 1177 ========================== ========= === === ====== ======= === 1178 Required flag X X X X 1179 SubscribeOptions master X X 1178 Required flag X X X X 1179 SubscribeOptions master X X 1180 1180 1181 1181 =head1 http://jabber.org/protocol/pubsub - unsubscribe objects … … 1183 1183 Name Type Get Set Remove Defined Add 1184 1184 ========================== ========= === === ====== ======= === 1185 JID jid X X X X 1186 Node scalar X X X X 1187 Unsubscribe master X X 1185 JID jid X X X X 1186 Node scalar X X X X 1187 Unsubscribe master X X 1188 1188 1189 1189 =head1 http://jabber.org/protocol/pubsub#event … … 1191 1191 Name Type Get Set Remove Defined Add 1192 1192 ========================== ========= === === ====== ======= === 1193 Delete child X X X X 1194 Items child X X X X 1195 Event master X X 1193 Delete child X X X X 1194 Items child X X X X 1195 Event master X X 1196 1196 1197 1197 =head1 http://jabber.org/protocol/pubsub#event - delete objects … … 1199 1199 Name Type Get Set Remove Defined Add 1200 1200 ========================== ========= === === ====== ======= === 1201 Node scalar X X X X 1202 Delete master X X 1201 Node scalar X X X X 1202 Delete master X X 1203 1203 1204 1204 =head1 http://jabber.org/protocol/pubsub#event - item objects … … 1206 1206 Name Type Get Set Remove Defined Add 1207 1207 ========================== ========= === === ====== ======= === 1208 ID scalar X X X X 1209 Payload raw X X X X 1210 Item master X X 1208 ID scalar X X X X 1209 Payload raw X X X X 1210 Item master X X 1211 1211 1212 1212 =head1 http://jabber.org/protocol/pubsub#event - items objects … … 1214 1214 Name Type Get Set Remove Defined Add 1215 1215 ========================== ========= === === ====== ======= === 1216 Node scalar X X X X 1217 Item child X X X X 1218 Items master X X 1216 Node scalar X X X X 1217 Item child X X X X 1218 Items master X X 1219 1219 1220 1220 =head1 http://jabber.org/protocol/pubsub#owner … … 1222 1222 Name Type Get Set Remove Defined Add 1223 1223 ========================== ========= === === ====== ======= === 1224 Action scalar X X X X 1225 Configure child X X X X 1226 Owner master X X 1224 Action scalar X X X X 1225 Configure child X X X X 1226 Owner master X X 1227 1227 1228 1228 =head1 http://jabber.org/protocol/pubsub#owner - configure objects … … 1230 1230 Name Type Get Set Remove Defined Add 1231 1231 ========================== ========= === === ====== ======= === 1232 Node scalar X X X X 1233 Configure master X X 1232 Node scalar X X X X 1233 Configure master X X 1234 1234 1235 1235 =head1 http://jabber.org/protocol/si … … 1237 1237 Name Type Get Set Remove Defined Add 1238 1238 ========================== ========= === === ====== ======= === 1239 ID scalar X X X X 1240 MimeType scalar X X X X 1241 Profile scalar X X X X 1242 Stream master X X 1239 ID scalar X X X X 1240 MimeType scalar X X X X 1241 Profile scalar X X X X 1242 Stream master X X 1243 1243 1244 1244 =head1 http://jabber.org/protocol/si/profile/file-transfer … … 1246 1246 Name Type Get Set Remove Defined Add 1247 1247 ========================== ========= === === ====== ======= === 1248 Date scalar X X X X 1249 Desc scalar X X X X 1250 Hash scalar X X X X 1251 Name scalar X X X X 1252 Range flag X X X X 1253 RangeLength scalar X X X X 1254 RangeOffset scalar X X X X 1255 Size scalar X X X X 1256 File master X X 1248 Date scalar X X X X 1249 Desc scalar X X X X 1250 Hash scalar X X X X 1251 Name scalar X X X X 1252 Range flag X X X X 1253 RangeLength scalar X X X X 1254 RangeOffset scalar X X X X 1255 Size scalar X X X X 1256 File master X X 1257 1257 1258 1258 =head1 jabber:iq:agent - DEPRECATED … … 1260 1260 Name Type Get Set Remove Defined Add 1261 1261 ========================== ========= === === ====== ======= === 1262 Agents flag X X X X 1263 Description scalar X X X X 1264 GroupChat flag X X X X 1265 JID jid X X X X 1266 Name scalar X X X X 1267 Register flag X X X X 1268 Search flag X X X X 1269 Service scalar X X X X 1270 Transport scalar X X X X 1271 URL scalar X X X X 1272 Agent master X X 1262 Agents flag X X X X 1263 Description scalar X X X X 1264 GroupChat flag X X X X 1265 JID jid X X X X 1266 Name scalar X X X X 1267 Register flag X X X X 1268 Search flag X X X X 1269 Service scalar X X X X 1270 Transport scalar X X X X 1271 URL scalar X X X X 1272 Agent master X X 1273 1273 1274 1274 =head1 jabber:iq:agents - DEPRECATED … … 1276 1276 Name Type Get Set Remove Defined Add 1277 1277 ========================== ========= === === ====== ======= === 1278 Agent child X 1279 Agents child X X X 1278 Agent child X 1279 Agents child X X X 1280 1280 1281 1281 =head1 jabber:iq:autoupdate … … 1283 1283 Name Type Get Set Remove Defined Add 1284 1284 ========================== ========= === === ====== ======= === 1285 Beta child X 1286 Dev child X 1287 Release child X 1288 Releases child X X X 1285 Beta child X 1286 Dev child X 1287 Release child X 1288 Releases child X X X 1289 1289 1290 1290 =head1 jabber:iq:autoupdate - release objects … … 1292 1292 Name Type Get Set Remove Defined Add 1293 1293 ========================== ========= === === ====== ======= === 1294 Desc scalar X X X X 1295 Priority scalar X X X X 1296 URL scalar X X X X 1297 Version scalar X X X X 1298 Release master X X 1294 Desc scalar X X X X 1295 Priority scalar X X X X 1296 URL scalar X X X X 1297 Version scalar X X X X 1298 Release master X X 1299 1299 1300 1300 =head1 jabber:iq:browse - DEPRECATED … … 1302 1302 Name Type Get Set Remove Defined Add 1303 1303 ========================== ========= === === ====== ======= === 1304 Category scalar X X X X 1305 JID jid X X X X 1306 NS array X X X X 1307 Name scalar X X X X 1308 Type scalar X X X X 1309 Item child X 1310 Items child X X X 1311 Browse master X X 1304 Category scalar X X X X 1305 JID jid X X X X 1306 NS array X X X X 1307 Name scalar X X X X 1308 Type scalar X X X X 1309 Item child X 1310 Items child X X X 1311 Browse master X X 1312 1312 1313 1313 =head1 jabber:iq:browse - item objects - DEPRECATED … … 1315 1315 Name Type Get Set Remove Defined Add 1316 1316 ========================== ========= === === ====== ======= === 1317 Category scalar X X X X 1318 JID jid X X X X 1319 NS array X X X X 1320 Name scalar X X X X 1321 Type scalar X X X X 1322 Item child X 1323 Items child X X X 1324 Browse master X X 1317 Category scalar X X X X 1318 JID jid X X X X 1319 NS array X X X X 1320 Name scalar X X X X 1321 Type scalar X X X X 1322 Item child X 1323 Items child X X X 1324 Browse master X X 1325 1325 1326 1326 =head1 jabber:iq:conference … … 1328 1328 Name Type Get Set Remove Defined Add 1329 1329 ========================== ========= === === ====== ======= === 1330 ID scalar X X X X 1331 Name scalar X X X X 1332 Nick scalar X X X X 1333 Privacy flag X X X X 1334 Secret scalar X X X X 1335 Conference master X X 1330 ID scalar X X X X 1331 Name scalar X X X X 1332 Nick scalar X X X X 1333 Privacy flag X X X X 1334 Secret scalar X X X X 1335 Conference master X X 1336 1336 1337 1337 =head1 jabber:iq:filter - DEPRECATED … … 1339 1339 Name Type Get Set Remove Defined Add 1340 1340 ========================== ========= === === ====== ======= === 1341 Rule child X 1342 Rules child X X X 1341 Rule child X 1342 Rules child X X X 1343 1343 1344 1344 =head1 jabber:iq:filter - rule objects - DEPRECATED … … 1346 1346 Name Type Get Set Remove Defined Add 1347 1347 ========================== ========= === === ====== ======= === 1348 Body scalar X X X X 1349 Continued scalar X X X X 1350 Drop scalar X X X X 1351 Edit scalar X X X X 1352 Error scalar X X X X 1353 From scalar X X X X 1354 Offline scalar X X X X 1355 Reply scalar X X X X 1356 Resource scalar X X X X 1357 Show scalar X X X X 1358 Size scalar X X X X 1359 Subject scalar X X X X 1360 Time scalar X X X X 1361 Type scalar X X X X 1362 Unavailable scalar X X X X 1363 Rule master X X 1348 Body scalar X X X X 1349 Continued scalar X X X X 1350 Drop scalar X X X X 1351 Edit scalar X X X X 1352 Error scalar X X X X 1353 From scalar X X X X 1354 Offline scalar X X X X 1355 Reply scalar X X X X 1356 Resource scalar X X X X 1357 Show scalar X X X X 1358 Size scalar X X X X 1359 Subject scalar X X X X 1360 Time scalar X X X X 1361 Type scalar X X X X 1362 Unavailable scalar X X X X 1363 Rule master X X 1364 1364 1365 1365 =head1 jabber:iq:gateway … … 1367 1367 Name Type Get Set Remove Defined Add 1368 1368 ========================== ========= === === ====== ======= === 1369 Desc scalar X X X X 1370 JID jid X X X X 1371 Prompt scalar X X X X 1372 Gateway master X X 1369 Desc scalar X X X X 1370 JID jid X X X X 1371 Prompt scalar X X X X 1372 Gateway master X X 1373 1373 1374 1374 =head1 jabber:iq:last … … 1376 1376 Name Type Get Set Remove Defined Add 1377 1377 ========================== ========= === === ====== ======= === 1378 Message scalar X X X X 1379 Seconds scalar X X X X 1380 Last master X X 1378 Message scalar X X X X 1379 Seconds scalar X X X X 1380 Last master X X 1381 1381 1382 1382 =head1 jabber:iq:oob … … 1384 1384 Name Type Get Set Remove Defined Add 1385 1385 ========================== ========= === === ====== ======= === 1386 Desc scalar X X X X 1387 URL scalar X X X X 1388 Oob master X X 1386 Desc scalar X X X X 1387 URL scalar X X X X 1388 Oob master X X 1389 1389 1390 1390 =head1 jabber:iq:pass … … 1392 1392 Name Type Get Set Remove Defined Add 1393 1393 ========================== ========= === === ====== ======= === 1394 Client scalar X X X X 1395 ClientPort scalar X X X X 1396 Close flag X X X X 1397 Expire scalar X X X X 1398 OneShot flag X X X X 1399 Proxy scalar X X X X 1400 ProxyPort scalar X X X X 1401 Server scalar X X X X 1402 ServerPort scalar X X X X 1403 Pass master X X 1394 Client scalar X X X X 1395 ClientPort scalar X X X X 1396 Close flag X X X X 1397 Expire scalar X X X X 1398 OneShot flag X X X X 1399 Proxy scalar X X X X 1400 ProxyPort scalar X X X X 1401 Server scalar X X X X 1402 ServerPort scalar X X X X 1403 Pass master X X 1404 1404 1405 1405 =head1 jabber:iq:rpc … … 1407 1407 Name Type Get Set Remove Defined Add 1408 1408 ========================== ========= === === ====== ======= === 1409 MethodCall child X X X X 1410 MethodResponse child X X X X 1409 MethodCall child X X X X 1410 MethodResponse child X X X X 1411 1411 1412 1412 =head1 jabber:iq:rpc - array objects … … 1414 1414 Name Type Get Set Remove Defined Add 1415 1415 ========================== ========= === === ====== ======= === 1416 Data child X 1417 Datas child X X X 1416 Data child X 1417 Datas child X X X 1418 1418 1419 1419 =head1 jabber:iq:rpc - data objects … … 1421 1421 Name Type Get Set Remove Defined Add 1422 1422 ========================== ========= === === ====== ======= === 1423 Value child X X X X 1423 Value child X X X X 1424 1424 1425 1425 =head1 jabber:iq:rpc - fault objects … … 1427 1427 Name Type Get Set Remove Defined Add 1428 1428 ========================== ========= === === ====== ======= === 1429 Value child X X X X 1429 Value child X X X X 1430 1430 1431 1431 =head1 jabber:iq:rpc - member objects … … 1433 1433 Name Type Get Set Remove Defined Add 1434 1434 ========================== ========= === === ====== ======= === 1435 Name scalar X X X X 1436 Value child X X X X 1437 Member master X X 1435 Name scalar X X X X 1436 Value child X X X X 1437 Member master X X 1438 1438 1439 1439 =head1 jabber:iq:rpc - methodCall objects … … 1441 1441 Name Type Get Set Remove Defined Add 1442 1442 ========================== ========= === === ====== ======= === 1443 MethodName scalar X X X X 1444 Params child X X X X 1445 MethodCall master X X 1443 MethodName scalar X X X X 1444 Params child X X X X 1445 MethodCall master X X 1446 1446 1447 1447 =head1 jabber:iq:rpc - methodResponse objects … … 1449 1449 Name Type Get Set Remove Defined Add 1450 1450 ========================== ========= === === ====== ======= === 1451 Fault child X X X X 1452 Params child X X X X 1451 Fault child X X X X 1452 Params child X X X X 1453 1453 1454 1454 =head1 jabber:iq:rpc - param objects … … 1456 1456 Name Type Get Set Remove Defined Add 1457 1457 ========================== ========= === === ====== ======= === 1458 Value child X X X X 1458 Value child X X X X 1459 1459 1460 1460 =head1 jabber:iq:rpc - params objects … … 1462 1462 Name Type Get Set Remove Defined Add 1463 1463 ========================== ========= === === ====== ======= === 1464 Param child X 1465 Params child X X X 1464 Param child X 1465 Params child X X X 1466 1466 1467 1467 =head1 jabber:iq:rpc - struct objects … … 1469 1469 Name Type Get Set Remove Defined Add 1470 1470 ========================== ========= === === ====== ======= === 1471 Member child X 1472 Members child X X X 1471 Member child X 1472 Members child X X X 1473 1473 1474 1474 =head1 jabber:iq:rpc - value objects … … 1476 1476 Name Type Get Set Remove Defined Add 1477 1477 ========================== ========= === === ====== ======= === 1478 Base64 scalar X X X X 1479 Boolean scalar X X X X 1480 DateTime scalar X X X X 1481 Double scalar X X X X 1482 I4 scalar X X X X 1483 Int scalar X X X X 1484 String scalar X X X X 1485 Value scalar X X X X 1486 Array child X X X X 1487 Struct child X X X X 1488 RPCValue master X X 1478 Base64 scalar X X X X 1479 Boolean scalar X X X X 1480 DateTime scalar X X X X 1481 Double scalar X X X X 1482 I4 scalar X X X X 1483 Int scalar X X X X 1484 String scalar X X X X 1485 Value scalar X X X X 1486 Array child X X X X 1487 Struct child X X X X 1488 RPCValue master X X 1489 1489 1490 1490 =head1 jabber:iq:search … … 1492 1492 Name Type Get Set Remove Defined Add 1493 1493 ========================== ========= === === ====== ======= === 1494 Email scalar X X X X 1495 Family scalar X X X X 1496 First scalar X X X X 1497 Given scalar X X X X 1498 Instructions scalar X X X X 1499 Key scalar X X X X 1500 Last scalar X X X X 1501 Name scalar X X X X 1502 Nick scalar X X X X 1503 Truncated flag X X X X 1504 Item child X 1505 Items child X X X 1506 Search master X X 1494 Email scalar X X X X 1495 Family scalar X X X X 1496 First scalar X X X X 1497 Given scalar X X X X 1498 Instructions scalar X X X X 1499 Key scalar X X X X 1500 Last scalar X X X X 1501 Name scalar X X X X 1502 Nick scalar X X X X 1503 Truncated flag X X X X 1504 Item child X 1505 Items child X X X 1506 Search master X X 1507 1507 1508 1508 =head1 jabber:iq:search - item objects … … 1510 1510 Name Type Get Set Remove Defined Add 1511 1511 ========================== ========= === === ====== ======= === 1512 Email scalar X X X X 1513 Family scalar X X X X 1514 First scalar X X X X 1515 Given scalar X X X X 1516 JID jid X X X X 1517 Key scalar X X X X 1518 Last scalar X X X X 1519 Name scalar X X X X 1520 Nick scalar X X X X 1521 Item master X X 1512 Email scalar X X X X 1513 Family scalar X X X X 1514 First scalar X X X X 1515 Given scalar X X X X 1516 JID jid X X X X 1517 Key scalar X X X X 1518 Last scalar X X X X 1519 Name scalar X X X X 1520 Nick scalar X X X X 1521 Item master X X 1522 1522 1523 1523 =head1 jabber:iq:time … … 1525 1525 Name Type Get Set Remove Defined Add 1526 1526 ========================== ========= === === ====== ======= === 1527 Display special X X X X 1528 TZ special X X X X 1529 UTC special X X X X 1530 Time master X X 1527 Display special X X X X 1528 TZ special X X X X 1529 UTC special X X X X 1530 Time master X X 1531 1531 1532 1532 =head1 jabber:iq:version … … 1534 1534 Name Type Get Set Remove Defined Add 1535 1535 ========================== ========= === === ====== ======= === 1536 Name scalar X X X X 1537 OS special X X X X 1538 Ver special X X X X 1539 Version master X X 1536 Name scalar X X X X 1537 OS special X X X X 1538 Ver special X X X X 1539 Version master X X 1540 1540 1541 1541 =head1 jabber:x:autoupdate … … 1543 1543 Name Type Get Set Remove Defined Add 1544 1544 ========================== ========= === === ====== ======= === 1545 JID jid X X X X 1546 Autoupdate master X X 1545 JID jid X X X X 1546 Autoupdate master X X 1547 1547 1548 1548 =head1 jabber:x:conference … … 1550 1550 Name Type Get Set Remove Defined Add 1551 1551 ========================== ========= === === ====== ======= === 1552 JID jid X X X X 1553 Conference master X X 1552 JID jid X X X X 1553 Conference master X X 1554 1554 1555 1555 =head1 jabber:x:data … … 1557 1557 Name Type Get Set Remove Defined Add 1558 1558 ========================== ========= === === ====== ======= === 1559 Form scalar X X X X 1560 Instructions scalar X X X X 1561 Title scalar X X X X 1562 Type scalar X X X X 1563 Field child X 1564 Fields child X X X 1565 Item child X 1566 Items child X X X 1567 Reported child X X X X 1568 Data master X X 1559 Form scalar X X X X 1560 Instructions scalar X X X X 1561 Title scalar X X X X 1562 Type scalar X X X X 1563 Field child X 1564 Fields child X X X 1565 Item child X 1566 Items child X X X 1567 Reported child X X X X 1568 Data master X X 1569 1569 1570 1570 =head1 jabber:x:data - field objects … … 1572 1572 Name Type Get Set Remove Defined Add 1573 1573 ========================== ========= === === ====== ======= === 1574 Desc scalar X X X X 1575 Label scalar X X X X 1576 Required flag X X X X 1577 Type scalar X X X X 1578 Value array X X X X 1579 Var scalar X X X X 1580 Option child X 1581 Options child X X X 1582 Field master X X 1574 Desc scalar X X X X 1575 Label scalar X X X X 1576 Required flag X X X X 1577 Type scalar X X X X 1578 Value array X X X X 1579 Var scalar X X X X 1580 Option child X 1581 Options child X X X 1582 Field master X X 1583 1583 1584 1584 =head1 jabber:x:data - item objects … … 1586 1586 Name Type Get Set Remove Defined Add 1587 1587 ========================== ========= === === ====== ======= === 1588 Field child X 1589 Fields child X X X 1590 Item master X X 1588 Field child X 1589 Fields child X X X 1590 Item master X X 1591 1591 1592 1592 =head1 jabber:x:data - option objects … … 1594 1594 Name Type Get Set Remove Defined Add 1595 1595 ========================== ========= === === ====== ======= === 1596 Label scalar X X X X 1597 Value scalar X X X X 1598 Option master X X 1596 Label scalar X X X X 1597 Value scalar X X X X 1598 Option master X X 1599 1599 1600 1600 =head1 jabber:x:data - reported objects … … 1602 1602 Name Type Get Set Remove Defined Add 1603 1603 ========================== ========= === === ====== ======= === 1604 Field child X 1605 Fields child X X X 1606 Reported master X X 1604 Field child X 1605 Fields child X X X 1606 Reported master X X 1607 1607 1608 1608 =head1 jabber:x:delay … … 1610 1610 Name Type Get Set Remove Defined Add 1611 1611 ========================== ========= === === ====== ======= === 1612 From jid X X X X 1613 Message scalar X X X X 1614 Stamp timestamp X X X X 1615 Delay master X X 1612 From jid X X X X 1613 Message scalar X X X X 1614 Stamp timestamp X X X X 1615 Delay master X X 1616 1616 1617 1617 =head1 jabber:x:encrypted … … 1619 1619 Name Type Get Set Remove Defined Add 1620 1620 ========================== ========= === === ====== ======= === 1621 Message scalar X X X X 1622 Encrypted master X X 1621 Message scalar X X X X 1622 Encrypted master X X 1623 1623 1624 1624 =head1 jabber:x:event … … 1626 1626 Name Type Get Set Remove Defined Add 1627 1627 ========================== ========= === === ====== ======= === 1628 Composing flag X X X X 1629 Delivered flag X X X X 1630 Displayed flag X X X X 1631 ID scalar X X X X 1632 Offline flag X X X X 1633 Event master X X 1628 Composing flag X X X X 1629 Delivered flag X X X X 1630 Displayed flag X X X X 1631 ID scalar X X X X 1632 Offline flag X X X X 1633 Event master X X 1634 1634 1635 1635 =head1 jabber:x:expire … … 1637 1637 Name Type Get Set Remove Defined Add 1638 1638 ========================== ========= === === ====== ======= === 1639 Seconds scalar X X X X 1640 Expire master X X 1639 Seconds scalar X X X X 1640 Expire master X X 1641 1641 1642 1642 =head1 jabber:x:oob … … 1644 1644 Name Type Get Set Remove Defined Add 1645 1645 ========================== ========= === === ====== ======= === 1646 Desc scalar X X X X 1647 URL scalar X X X X 1648 Oob master X X 1646 Desc scalar X X X X 1647 URL scalar X X X X 1648 Oob master X X 1649 1649 1650 1650 =head1 jabber:x:roster … … 1652 1652 Name Type Get Set Remove Defined Add 1653 1653 ========================== ========= === === ====== ======= === 1654 Item child X 1655 Items child X X X 1656 Roster master X X 1654 Item child X 1655 Items child X X X 1656 Roster master X X 1657 1657 1658 1658 =head1 jabber:x:roster - item objects … … 1660 1660 Name Type Get Set Remove Defined Add 1661 1661 ========================== ========= === === ====== ======= === 1662 Ask scalar X X X X 1663 Group array X X X X 1664 JID jid X X X X 1665 Name scalar X X X X 1666 Subscription scalar X X X X 1667 Item master X X 1662 Ask scalar X X X X 1663 Group array X X X X 1664 JID jid X X X X 1665 Name scalar X X X X 1666 Subscription scalar X X X X 1667 Item master X X 1668 1668 1669 1669 =head1 jabber:x:signed … … 1671 1671 Name Type Get Set Remove Defined Add 1672 1672 ========================== ========= === === ====== ======= === 1673 Signature scalar X X X X 1674 Signed master X X 1673 Signature scalar X X X X 1674 Signed master X X 1675 1675 1676 1676 … … 1726 1726 } 1727 1727 1728 sub GetX { my $self = shift; $self->GetChild(@_); } 1728 sub GetX { my $self = shift; $self->GetChild(@_); } 1729 1729 sub DefinedX { my $self = shift; $self->DefinedChild(@_); } 1730 1730 sub NewX { my $self = shift; $self->NewChild(@_); } 1731 sub AddX { my $self = shift; $self->AddChild(@_); } 1731 sub AddX { my $self = shift; $self->AddChild(@_); } 1732 1732 sub RemoveX { my $self = shift; $self->RemoveChild(@_); } 1733 1733 … … 1735 1735 sub DefinedQuery { my $self = shift; $self->DefinedChild(@_); } 1736 1736 sub NewQuery { my $self = shift; $self->NewChild(@_); } 1737 sub AddQuery { my $self = shift; $self->AddChild(@_); } 1737 sub AddQuery { my $self = shift; $self->AddChild(@_); } 1738 1738 sub RemoveQuery { my $self = shift; $self->RemoveChild(@_); } 1739 1739 … … 1770 1770 my $self = shift; 1771 1771 my $value = shift; 1772 1772 1773 1773 if (!defined($value) && ($TIMEZONE == 1)) 1774 1774 { … … 1804 1804 my $self = shift; 1805 1805 my $value = shift; 1806 1806 1807 1807 if (defined($value)) 1808 1808 { … … 1826 1826 my %result; 1827 1827 my @xData = $item->GetX("jabber:x:data"); 1828 if ($#xData == -1) 1828 if ($#xData == -1) 1829 1829 { 1830 1830 %result = $item->GetItem(); -
perl/modules/Jabber/lib/Net/Jabber/XDB.pm
rc2bed55 r7869e48 41 41 namspaces and modules see Net::Jabber::Data. 42 42 43 To initialize the XDB with a Jabber <xdb/> you must pass it the 43 To initialize the XDB with a Jabber <xdb/> you must pass it the 44 44 XML::Parser Tree array. For example: 45 45 -
perl/modules/Jabber/lib/Net/XMPP.pm
ra8c55b5 r7869e48 40 40 like to utilize the XMPP Instant Messaging protocol. While not a 41 41 client in and of itself, it provides all of the necessary back-end 42 functions to make a CGI client or command-line perl client feasible 42 functions to make a CGI client or command-line perl client feasible 43 43 and easy to use. Net::XMPP is a wrapper around the rest of the 44 44 official Net::XMPP::xxxxxx packages. -
perl/modules/Jabber/lib/Net/XMPP/Client.pm
rc2bed55 r7869e48 143 143 sepecified account for you, if it 144 144 does not exist. 145 145 146 146 Process(integer) - takes the timeout period as an argument. If no 147 147 timeout is listed then the function blocks until … … 157 157 0 - Status ok, no data received. 158 158 undef - Status not ok, stop processing. 159 159 160 160 IMPORTANT: You need to check the output of every 161 161 Process. If you get an undef then the connection … … 190 190 bless($self, $proto); 191 191 $self->init(@_); 192 192 193 193 $self->{SERVER}->{port} = 5222; 194 194 $self->{SERVER}->{namespace} = "jabber:client"; … … 210 210 $auth{password} = $args{password}; 211 211 $auth{resource} = $args{resource} if exists($args{resource}); 212 212 213 213 return $self->AuthSend(%auth); 214 214 } … … 219 219 my $self = shift; 220 220 my (%args) = @_; 221 221 222 222 my %connect; 223 223 $connect{hostname} = $args{hostname}; -
perl/modules/Jabber/lib/Net/XMPP/Connection.pm
r3bf5516 r7869e48 59 59 60 60 bless($self, $proto); 61 61 62 62 $self->init(@_); 63 63 64 64 $self->{SERVER}->{namespace} = "unknown"; 65 65 … … 76 76 { 77 77 my $self = shift; 78 78 79 79 $self->{ARGS} = {}; 80 80 while($#_ >= 0) { $self->{ARGS}->{ lc(pop(@_)) } = pop(@_); } … … 103 103 debugtime => $self->{DEBUG}->GetTime(), 104 104 ); 105 105 106 106 $self->{RCVDB}->{currentID} = 0; 107 107 … … 132 132 $self->{DEBUG}->Log1("Connect: host($self->{SERVER}->{hostname}:$self->{SERVER}->{port}) namespace($self->{SERVER}->{namespace})"); 133 133 $self->{DEBUG}->Log1("Connect: timeout($self->{SERVER}->{timeout})"); 134 134 135 135 delete($self->{SESSION}); 136 136 $self->{SESSION} = … … 210 210 $self->{STREAM}->Disconnect($self->{SESSION}->{id}) 211 211 if ($self->{CONNECTED} == 1); 212 $self->{STREAM}->SetCallBacks(node=>undef); 212 $self->{STREAM}->SetCallBacks(node=>undef); 213 213 $self->{CONNECTED} = 0; 214 214 $self->{DISCONNECTED} = 1; … … 270 270 &{$self->{CB}->{onauthfail}}() 271 271 if exists($self->{CB}->{onauthfail}); 272 272 273 273 if (!$self->{SERVER}->{allow_register} || $args{register} == 0) 274 274 { … … 288 288 &{$self->{CB}->{onregisterfail}}() 289 289 if exists($self->{CB}->{onregisterfail}); 290 290 291 291 $self->Disconnect(); 292 292 &{$self->{CB}->{ondisconnect}}() … … 306 306 if exists($self->{CB}->{onauth}); 307 307 } 308 308 309 309 while($self->Connected()) 310 310 { -
perl/modules/Jabber/lib/Net/XMPP/Debug.pm
rb7b2a76 r7869e48 151 151 my %args; 152 152 while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); } 153 153 154 154 delete($args{file}) if (lc($args{file}) eq "stdout"); 155 155 -
perl/modules/Jabber/lib/Net/XMPP/IQ.pm
rc2bed55 r7869e48 198 198 199 199 $IQ->RemoveTo(); 200 200 201 201 RemoveFrom() - removes the from attribute from the <iq/>. 202 202 203 203 $IQ->RemoveFrom(); 204 204 205 205 RemoveID() - removes the id attribute from the <iq/>. 206 206 207 207 $IQ->RemoveID(); 208 208 209 209 RemoveType() - removes the type attribute from the <iq/>. 210 210 211 211 $IQ->RemoveType(); 212 212 213 213 RemoveError() - removes the <error/> element from the <iq/>. 214 214 215 215 $IQ->RemoveError(); 216 216 217 217 RemoveErrorCode() - removes the code attribute from the <error/> 218 218 element in the <iq/>. … … 222 222 =head2 Test functions 223 223 224 DefinedTo() - returns 1 if the to attribute is defined in the <iq/>, 224 DefinedTo() - returns 1 if the to attribute is defined in the <iq/>, 225 225 0 otherwise. 226 226 … … 232 232 $test = $IQ->DefinedFrom(); 233 233 234 DefinedID() - returns 1 if the id attribute is defined in the <iq/>, 234 DefinedID() - returns 1 if the id attribute is defined in the <iq/>, 235 235 0 otherwise. 236 236 … … 242 242 $test = $IQ->DefinedType(); 243 243 244 DefinedError() - returns 1 if <error/> is defined in the <iq/>, 244 DefinedError() - returns 1 if <error/> is defined in the <iq/>, 245 245 0 otherwise. 246 246 … … 285 285 286 286 $self->{FUNCS} = \%FUNCTIONS; 287 287 288 288 $self->_init(@_); 289 289 -
perl/modules/Jabber/lib/Net/XMPP/JID.pm
rc2bed55 r7869e48 29 29 30 30 Net::XMPP::JID is a companion to the Net::XMPP module. 31 It provides the user a simple interface to set and retrieve all 31 It provides the user a simple interface to set and retrieve all 32 32 parts of a Jabber ID (userid on a server). 33 33 … … 89 89 GetUserID() - returns a string with the userid of the JID. 90 90 If the string is an address (bob%jabber.org) then 91 the function will return it as an address 91 the function will return it as an address 92 92 (bob@jabber.org). 93 93 94 94 GetServer() - returns a string with the server of the JID. 95 95 96 GetResource() - returns a string with the resource of the JID. 96 GetResource() - returns a string with the resource of the JID. 97 97 98 98 GetJID() - returns a string that represents the JID stored … … 113 113 then both will be in the jid. If all 114 114 you pass is a string, then that string 115 is used as the JID. For valid settings 115 is used as the JID. For valid settings 116 116 read the specific Set functions below. 117 117 118 118 SetUserID(string) - sets the userid. Must be a valid userid or the 119 119 server will complain if you try to use this JID 120 to talk to the server. If the string is an 120 to talk to the server. If the string is an 121 121 address then it will be converted to the % 122 122 form suitable for using as a User ID. 123 123 124 SetServer(string) - sets the server. Must be a valid host on the 124 SetServer(string) - sets the server. Must be a valid host on the 125 125 network or the server will not be able to talk 126 126 to it. … … 283 283 my %jid; 284 284 285 if ($#_ > 0 ) { 285 if ($#_ > 0 ) { 286 286 while($#_ >= 0) { $jid{ lc pop(@_) } = pop(@_); } 287 287 -
perl/modules/Jabber/lib/Net/XMPP/Message.pm
r8574801 r7869e48 204 204 205 205 $Mess->RemoveTo(); 206 206 207 207 RemoveFrom() - removes the from attribute from the <message/>. 208 208 209 209 $Mess->RemoveFrom(); 210 210 211 211 RemoveType() - removes the type attribute from the <message/>. 212 212 213 213 $Mess->RemoveType(); 214 214 215 215 RemoveSubject() - removes the <subject/> element from the 216 216 <message/>. … … 220 220 RemoveBody() - removes the <body/> element from the 221 221 <message/>. 222 222 223 223 $Mess->RemoveBody(); 224 224 … … 226 226 227 227 $Mess->RemoveThread(); 228 228 229 229 RemoveError() - removes the <error/> element from the <message/>. 230 230 231 231 $Mess->RemoveError(); 232 232 233 233 RemoveErrorCode() - removes the code attribute from the <error/> 234 234 element in the <message/>. -
perl/modules/Jabber/lib/Net/XMPP/Namespaces.pm
rc2bed55 r7869e48 136 136 137 137 To repeat, here is an example call to add_ns(): 138 138 139 139 &add_ns(ns => "mynamespace", 140 140 tag => "mytag", … … 154 154 DefinedXXXX(), RemoveXXXX(), AddXXXX() calls. The basic options you 155 155 can pass in are: 156 156 157 157 type - This tells Stanza how to handle the call. The possible 158 158 values are: 159 159 160 160 array - The value to set and returned is an an array 161 161 reference. For example, <group/> in jabber:iq:roster. … … 265 265 ["Add"] 266 266 ["Get","Add","Defined"] 267 267 268 268 It all depends on how you want your API to look. 269 269 270 270 Once more... The following: 271 271 272 272 &add_ns(ns => "mynamespace", 273 273 tag => "mytag", … … 451 451 ); 452 452 } 453 453 454 454 #----------------------------------------------------------------------------- 455 455 # __netxmpp__:iq:privacy:list:item … … 588 588 589 589 # XXX error check... 590 590 591 591 $NS{$args{ns}}->{tag} = $args{tag} if exists($args{tag}); 592 592 $NS{$args{ns}}->{xpath} = $args{xpath}; -
perl/modules/Jabber/lib/Net/XMPP/Presence.pm
rc2bed55 r7869e48 123 123 124 124 SetTo(string) - sets the to attribute. You can either pass a string 125 SetTo(JID) or a JID object. They must be valid JIDs or the 125 SetTo(JID) or a JID object. They must be valid JIDs or the 126 126 server will return an error message. 127 127 (ie. bob@jabber.org/Silent Bob, etc...) … … 180 180 181 181 $Pres->RemoveTo(); 182 182 183 183 RemoveFrom() - removes the from attribute from the <presence/>. 184 184 185 185 $Pres->RemoveFrom(); 186 186 187 187 RemoveType() - removes the type attribute from the <presence/>. 188 188 189 189 $Pres->RemoveType(); 190 190 191 191 RemoveStatus() - removes the <status/> element from the <presence/>. 192 192 193 193 $Pres->RemoveStatus(); 194 194 195 195 RemovePriority() - removes the <priority/> element from the 196 196 <presence/>. 197 197 198 198 $Pres->RemovePriority(); 199 199 200 200 RemoveShow() - removes the <show/> element from the <presence/>. 201 201 202 202 $Pres->RemoveShow(); 203 203 204 204 =head2 Test functions 205 205 … … 264 264 265 265 $self->{FUNCS} = \%FUNCTIONS; 266 266 267 267 $self->_init(@_); 268 268 -
perl/modules/Jabber/lib/Net/XMPP/PrivacyLists.pm
rc2bed55 r7869e48 65 65 66 66 $self->{CONNECTION} = $args{connection}; 67 67 68 68 bless($self, $proto); 69 69 70 70 $self->init(); 71 71 72 72 return $self; 73 73 } … … 172 172 my $self = shift; 173 173 my $list = shift; 174 174 175 175 my $iq = $self->{CONNECTION}->PrivacyListsGet(list=>$list); 176 176 $self->handleIQ($iq); … … 251 251 { 252 252 my $query = $iq->GetChild("jabber:iq:privacy"); 253 253 254 254 my @lists = $query->GetLists(); 255 255 256 256 return unless ($#lists > -1); 257 257 258 258 my @items = $lists[0]->GetItems(); 259 259 260 260 if (($#lists == 0) && ($#items > -1)) 261 261 { … … 274 274 my $self = shift; 275 275 my $list = shift; 276 276 277 277 my $name = $list->GetName(); 278 278 … … 280 280 { 281 281 my %item = $item->GetItem(); 282 282 283 283 $self->addItem($name,%item); 284 284 } … … 290 290 my $self = shift; 291 291 my $lists = shift; 292 292 293 293 foreach my $list (@{$lists}) 294 294 { … … 326 326 { 327 327 $self->{CONNECTION}->{DEBUG}->Log3("PrivacyLists::remove: deleting $list from the DB"); 328 328 329 329 delete($self->{LISTS}->{$list}); 330 330 delete($self->{LISTS}) if (scalar(keys(%{$self->{LISTS}})) == 0); -
perl/modules/Jabber/lib/Net/XMPP/Protocol.pm
ra8c55b5 r7869e48 58 58 comes back. You can optionally specify a timeout so that 59 59 you do not block forever. 60 60 61 61 nonblock - send the packet with an ID, but then return that id and 62 62 control to the master program. Net::XMPP is still … … 69 69 combined with the XPath function because you can register 70 70 a one shot function tied to the id you get back. 71 71 72 72 73 73 =head2 Basic Functions … … 234 234 groups=>["foo"] 235 235 ); 236 236 237 237 $Con->RosterDBRemove("bob\@jabber.org"); 238 238 $Con->RosterDBRemove(Net::XMPP::JID); … … 244 244 245 245 @jids = $Con->RosterDBJIDs(); 246 246 247 247 if ($Con->RosterDBGroupExists("foo")) { ... 248 248 249 249 @groups = $Con->RosterDBGroups(); 250 250 251 251 @jids = $Con->RosterDBGroupJIDs("foo"); 252 252 253 253 @jids = $Con->RosterDBNonGroupJIDs(); 254 254 255 255 %hash = $Con->RosterDBQuery("bob\@jabber.org"); 256 256 %hash = $Con->RosterDBQuery(Net::XMPP::JID); … … 340 340 then you must *NOT* specify a callback for 341 341 presence in the SetCallBacks function. 342 342 343 343 Net::XMPP defines a few default 344 344 callbacks for various types: 345 345 346 346 "subscribe" - 347 347 replies with subscribed 348 348 349 349 "unsubscribe" - 350 350 replies with unsubscribed 351 351 352 352 "subscribed" - 353 353 replies with subscribed 354 354 355 355 "unsubscribed" - 356 356 replies with unsubscribed 357 357 358 358 359 359 SetMessageCallBacks(type=>function, - sets the callback functions for … … 441 441 0 - Status ok, no data received. 442 442 undef - Status not ok, stop processing. 443 443 444 444 IMPORTANT: You need to check the output of every 445 445 Process. If you get an undef then the connection … … 684 684 the has returned by RosterParse above, and 685 685 is the actual hash, not a reference. 686 686 687 687 RosterDBRemove(jid) - Remove a JID from the roster DB. The JID is 688 688 either a string, or a Net::XMPP::JID object. … … 696 696 RosterDBJIDs() - returns a list of Net::XMPP::JID objects that 697 697 represents all of the JIDs in the DB. 698 698 699 699 RosterDBGroups() - returns the complete list of roster groups in the 700 700 roster. 701 701 702 702 RosterDBGroupExists(group) - return 1 if the group is a group in the 703 703 roster DB, undef otherwise. … … 706 706 that represents all of the JIDs in the 707 707 specified roster group. 708 708 709 709 RosterDBNonGroupJIDs() - returns a list of Net::XMPP::JID objects 710 710 that represents all of the JIDs not in a … … 720 720 the given key. The available keys are: 721 721 name, ask, subsrcription and groups 722 The JID is either a string, or a 722 The JID is either a string, or a 723 723 Net::XMPP::JID object. 724 724 … … 827 827 my $id; 828 828 my $tree; 829 829 830 830 if (ref($object) !~ /^Net::XMPP/) 831 831 { … … 884 884 } 885 885 } 886 886 887 887 return if $direct_pass; 888 888 } … … 1093 1093 ############################################################################### 1094 1094 sub SetXPathCallBacks 1095 { 1095 { 1096 1096 my $self = shift; 1097 1097 my (%xpaths) = @_; … … 1133 1133 ############################################################################### 1134 1134 sub SetDirectXPathCallBacks 1135 { 1135 { 1136 1136 my $self = shift; 1137 1137 my (%xpaths) = @_; … … 1538 1538 1539 1539 $self->{DEBUG}->Log4("PresenceDBParse: pres(",$presence->GetXML(),")"); 1540 1540 1541 1541 my $type = $presence->GetType(); 1542 1542 $type = "" unless defined($type); … … 1942 1942 &{$self->{CB}->{update}}() if exists($self->{CB}->{update}); 1943 1943 } 1944 1944 1945 1945 #------------------------------------------------------------------------- 1946 1946 # The loop finished... but was it done? … … 1951 1951 return( "system","SASL timed out authenticating"); 1952 1952 } 1953 1953 1954 1954 #------------------------------------------------------------------------- 1955 1955 # Ok, it was done... but did we auth? … … 1960 1960 return ( "error", $self->{STREAM}->SASLClientError($sid)); 1961 1961 } 1962 1962 1963 1963 #------------------------------------------------------------------------- 1964 1964 # Phew... Restart the <stream:stream> per XMPP … … 1967 1967 $self->{SESSION} = $self->{STREAM}->OpenStream($sid); 1968 1968 $sid = $self->{SESSION}->{id}; 1969 1969 1970 1970 $self->{DEBUG}->Log1("AuthSASL: We got a new session. sid($sid)"); 1971 1971 … … 2012 2012 $iq->SetIQ(type=>"set"); 2013 2013 my $bind = $iq->NewChild(&ConstXMLNS("xmpp-bind")); 2014 2014 2015 2015 if (defined($resource) && ($resource ne "")) 2016 2016 { … … 2037 2037 $iq->SetIQ(type=>"set"); 2038 2038 my $session = $iq->NewChild(&ConstXMLNS("xmpp-session")); 2039 2039 2040 2040 my $result = $self->SendAndReceiveWithID($iq); 2041 2041 } … … 2096 2096 my %args; 2097 2097 while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); } 2098 2098 2099 2099 my $iq = $self->_iq(); 2100 2100 $iq->SetIQ(type=>"get"); … … 2122 2122 my %args; 2123 2123 while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); } 2124 2124 2125 2125 my $iq = $self->_iq(); 2126 2126 $iq->SetIQ(type=>"set"); … … 2181 2181 return $id; 2182 2182 } 2183 2183 2184 2184 return $self->SendWithID($iq) if ($args{mode} eq "nonblock"); 2185 2185 … … 2443 2443 $jid = $jid->GetJID(); 2444 2444 } 2445 2445 2446 2446 return unless exists($self->{ROSTERDB}); 2447 2447 return unless exists($self->{ROSTERDB}->{JIDS}); … … 2611 2611 $jid = $jid->GetJID(); 2612 2612 } 2613 2613 2614 2614 return unless $self->RosterDBExists($jid); 2615 2615 if (defined($key)) … … 2619 2619 } 2620 2620 return %{$self->{ROSTERDB}->{JIDS}->{$jid}}; 2621 } 2621 } 2622 2622 2623 2623 … … 2645 2645 } 2646 2646 } 2647 2647 2648 2648 delete($self->{ROSTERDB}->{JIDS}->{$jid}); 2649 2649 } … … 2692 2692 $self->TLSClientFailure($node); 2693 2693 } 2694 2694 2695 2695 if ($tag eq "proceed") 2696 2696 { … … 2711 2711 $timeout = 120 unless defined($timeout); 2712 2712 $timeout = 120 if ($timeout eq ""); 2713 2713 2714 2714 $self->TLSSendStartTLS(); 2715 2715 … … 2751 2751 $self->{TLS}->{error} = $message; 2752 2752 } 2753 2753 2754 2754 $self->RemoveDirectXPathCallBacks('/[@xmlns="'.&ConstXMLNS("xmpp-tls").'"]'=>$TLS_CALLBACK); 2755 2755 } … … 2764 2764 { 2765 2765 my $self = shift; 2766 2766 2767 2767 return $self->{TLS}->{secure}; 2768 2768 } … … 2777 2777 { 2778 2778 my $self = shift; 2779 2779 2780 2780 return $self->{TLS}->{done}; 2781 2781 } … … 2790 2790 { 2791 2791 my $self = shift; 2792 2792 2793 2793 return $self->{TLS}->{error}; 2794 2794 } … … 2804 2804 my $self = shift; 2805 2805 my $node = shift; 2806 2806 2807 2807 my $type = &XML::Stream::XPath($node,"*/name()"); 2808 2808 … … 2821 2821 my $self = shift; 2822 2822 my $type = shift; 2823 2823 2824 2824 $self->Send("<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>"); 2825 2825 } … … 2880 2880 $self->SASLAnswerChallenge($node); 2881 2881 } 2882 2882 2883 2883 if ($tag eq "failure") 2884 2884 { 2885 2885 $self->SASLClientFailure($node); 2886 2886 } 2887 2887 2888 2888 if ($tag eq "success") 2889 2889 { … … 2906 2906 my $challenge64 = &XML::Stream::XPath($node,"text()"); 2907 2907 my $challenge = MIME::Base64::decode_base64($challenge64); 2908 2908 2909 2909 my $response = $self->SASLGetClient()->client_step($challenge); 2910 2910 … … 2929 2929 2930 2930 return unless defined($mechanisms); 2931 2931 2932 2932 my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}), 2933 2933 callback=>{ user => $username, … … 2954 2954 { 2955 2955 my $self = shift; 2956 2956 2957 2957 return $self->{SASL}->{authed}; 2958 2958 } … … 2967 2967 { 2968 2968 my $self = shift; 2969 2969 2970 2970 return $self->{SASL}->{done}; 2971 2971 } … … 2980 2980 { 2981 2981 my $self = shift; 2982 2982 2983 2983 return $self->{SASL}->{error}; 2984 2984 } … … 2994 2994 my $self = shift; 2995 2995 my $node = shift; 2996 2996 2997 2997 my $type = &XML::Stream::XPath($node,"*/name()"); 2998 2998 … … 3011 3011 my $self = shift; 3012 3012 my $node = shift; 3013 3013 3014 3014 $self->{SASL}->{authed} = 1; 3015 3015 $self->{SASL}->{done} = 1; … … 3027 3027 { 3028 3028 my $self = shift; 3029 3029 3030 3030 return $self->{SASL}->{client}; 3031 3031 } … … 3068 3068 my $self = shift; 3069 3069 my $type = shift; 3070 3070 3071 3071 $self->Send("<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>"); 3072 3072 } … … 3232 3232 } 3233 3233 3234 3234 3235 3235 ############################################################################## 3236 3236 # … … 3309 3309 { 3310 3310 my $const = shift; 3311 3311 3312 3312 return $XMLNS{$const}; 3313 3313 } -
perl/modules/Jabber/lib/Net/XMPP/Roster.pm
rc2bed55 r7869e48 30 30 Net::XMPP::Roster is a module that provides a developer an easy 31 31 interface to an XMPP roster. It provides high level functions to 32 query, update, and manage a user's roster. 32 query, update, and manage a user's roster. 33 33 34 34 =head1 DESCRIPTION … … 38 38 registers with the connection to receivce the correct packets so 39 39 that it can track all roster updates, and presence packets. 40 40 41 41 =head2 Basic Functions 42 42 … … 91 91 These functions are only needed if you want to manually control 92 92 the Roster. 93 93 94 94 $Roster->add('bob@jabber.org', 95 95 name=>"Bob", … … 131 131 otherwise. The jid can either be a string, or a 132 132 Net::XMPP::JID object. 133 133 134 134 groupExists(group) - return 1 if the group exists in the database, 135 135 undef otherwise. … … 236 236 237 237 $self->{CONNECTION} = $args{connection}; 238 238 239 239 bless($self, $proto); 240 240 241 241 $self->init(); 242 242 243 243 return $self; 244 244 } … … 365 365 366 366 $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID"); 367 367 368 368 return unless exists($self->{JIDS}); 369 369 return unless exists($self->{JIDS}->{$jid}); … … 489 489 my $resource = $jid->GetResource(); 490 490 $resource = " " unless ($resource ne ""); 491 491 492 492 $jid = $jid->GetJID(); 493 493 $jid = "" unless defined($jid); … … 505 505 { 506 506 my %item; 507 507 508 508 $item{priority} = $presence->GetPriority(); 509 509 $item{priority} = 0 unless defined($item{priority}); … … 547 547 } 548 548 } 549 549 550 550 if ($type eq "group") 551 551 { … … 597 597 598 598 $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID"); 599 599 600 600 if (defined($resource)) 601 601 { … … 604 604 return $self->{JIDS}->{$jid}->{resources}->{$resource}->{priority}; 605 605 } 606 606 607 607 return unless exists($self->{JIDS}->{$jid}->{priorities}); 608 608 my @priorities = sort{ $b <=> $a } keys(%{$self->{JIDS}->{$jid}->{priorities}}); … … 623 623 624 624 $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID"); 625 625 626 626 return unless $self->exists($jid); 627 627 if (defined($key)) … … 649 649 { 650 650 $self->{CONNECTION}->{DEBUG}->Log3("Roster::remove: deleting $jid from the DB"); 651 651 652 652 if (defined($self->query($jid,"groups"))) 653 653 { … … 661 661 } 662 662 } 663 663 664 664 delete($self->{JIDS}->{$jid}); 665 665 delete($self->{JIDS}) if (scalar(keys(%{$self->{JIDS}})) == 0); … … 696 696 if ($self->{JIDS}->{$jid}->{priorities}->{$oldPriority}->[$index]->{resource} eq $resource); 697 697 } 698 698 699 699 splice(@{$self->{JIDS}->{$jid}->{priorities}->{$oldPriority}},$loc,1); 700 700 … … 742 742 my $jid = shift; 743 743 my $resource = shift; 744 744 745 745 $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID"); 746 746 … … 765 765 766 766 $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID"); 767 767 768 768 return unless $self->resourceExists($jid,$resource); 769 769 if (defined($key)) -
perl/modules/Jabber/lib/Net/XMPP/Stanza.pm
rc2bed55 r7869e48 59 59 60 60 =pod 61 62 For more information on what these namespaces are for, visit 61 62 For more information on what these namespaces are for, visit 63 63 http://www.jabber.org and browse the Jabber Programmers Guide. 64 64 … … 66 66 67 67 ny:private:ns 68 68 69 69 Name Type Get Set Remove Defined Add 70 70 ========================== ======= === === ====== ======= === 71 71 Foo scalar X X X X 72 Bar child X 72 Bar child X 73 73 Bars child X 74 74 Test master X X … … 77 77 78 78 GetFoo(), SetFoo(), RemoveFoo(), DefinedFoo() 79 79 80 80 AddBar() 81 81 82 82 GetBars(), DefinedBars() 83 83 84 84 GetTest(), SetMaster() 85 85 … … 94 94 Name Type Get Set Remove Defined Add 95 95 ========================== ========= === === ====== ======= === 96 Digest scalar X X X X 97 Hash scalar X X X X 98 Password scalar X X X X 99 Resource scalar X X X X 100 Sequence scalar X X X X 101 Token scalar X X X X 102 Username scalar X X X X 103 Auth master X X 96 Digest scalar X X X X 97 Hash scalar X X X X 98 Password scalar X X X X 99 Resource scalar X X X X 100 Sequence scalar X X X X 101 Token scalar X X X X 102 Username scalar X X X X 103 Auth master X X 104 104 105 105 =head1 jabber:iq:privacy … … 107 107 Name Type Get Set Remove Defined Add 108 108 ========================== ========= === === ====== ======= === 109 Active scalar X X X X 110 Default scalar X X X X 111 List child X 112 Lists child X X X 113 Privacy master X X 109 Active scalar X X X X 110 Default scalar X X X X 111 List child X 112 Lists child X X X 113 Privacy master X X 114 114 115 115 =head1 jabber:iq:privacy - item objects … … 117 117 Name Type Get Set Remove Defined Add 118 118 ========================== ========= === === ====== ======= === 119 Action scalar X X X X 120 IQ flag X X X X 121 Message flag X X X X 122 Order scalar X X X X 123 PresenceIn flag X X X X 124 PresenceOut flag X X X X 125 Type scalar X X X X 126 Value scalar X X X X 127 Item master X X 119 Action scalar X X X X 120 IQ flag X X X X 121 Message flag X X X X 122 Order scalar X X X X 123 PresenceIn flag X X X X 124 PresenceOut flag X X X X 125 Type scalar X X X X 126 Value scalar X X X X 127 Item master X X 128 128 129 129 =head1 jabber:iq:privacy - list objects … … 131 131 Name Type Get Set Remove Defined Add 132 132 ========================== ========= === === ====== ======= === 133 Name scalar X X X X 134 Item child X 135 Items child X X X 136 List master X X 133 Name scalar X X X X 134 Item child X 135 Items child X X X 136 List master X X 137 137 138 138 =head1 jabber:iq:register … … 140 140 Name Type Get Set Remove Defined Add 141 141 ========================== ========= === === ====== ======= === 142 Address scalar X X X X 143 City scalar X X X X 144 Date scalar X X X X 145 Email scalar X X X X 146 First scalar X X X X 147 Instructions scalar X X X X 148 Key scalar X X X X 149 Last scalar X X X X 150 Misc scalar X X X X 151 Name scalar X X X X 152 Nick scalar X X X X 153 Password scalar X X X X 154 Phone scalar X X X X 155 Registered flag X X X X 156 Remove flag X X X X 157 State scalar X X X X 158 Text scalar X X X X 159 URL scalar X X X X 160 Username scalar X X X X 161 Zip scalar X X X X 162 Register master X X 142 Address scalar X X X X 143 City scalar X X X X 144 Date scalar X X X X 145 Email scalar X X X X 146 First scalar X X X X 147 Instructions scalar X X X X 148 Key scalar X X X X 149 Last scalar X X X X 150 Misc scalar X X X X 151 Name scalar X X X X 152 Nick scalar X X X X 153 Password scalar X X X X 154 Phone scalar X X X X 155 Registered flag X X X X 156 Remove flag X X X X 157 State scalar X X X X 158 Text scalar X X X X 159 URL scalar X X X X 160 Username scalar X X X X 161 Zip scalar X X X X 162 Register master X X 163 163 164 164 =head1 jabber:iq:roster … … 166 166 Name Type Get Set Remove Defined Add 167 167 ========================== ========= === === ====== ======= === 168 Item child X 169 Items child X 170 Roster master X X 168 Item child X 169 Items child X 170 Roster master X X 171 171 172 172 =head1 jabber:iq:roster - item objects … … 174 174 Name Type Get Set Remove Defined Add 175 175 ========================== ========= === === ====== ======= === 176 Ask scalar X X X X 177 Group array X X X X 178 JID jid X X X X 179 Name scalar X X X X 180 Subscription scalar X X X X 181 Item master X X 176 Ask scalar X X X X 177 Group array X X X X 178 JID jid X X X X 179 Name scalar X X X X 180 Subscription scalar X X X X 181 Item master X X 182 182 183 183 =head1 urn:ietf:params:xml:ns:xmpp-bind … … 185 185 Name Type Get Set Remove Defined Add 186 186 ========================== ========= === === ====== ======= === 187 JID jid X X X X 188 Resource scalar X X X X 189 Bind master X X 187 JID jid X X X X 188 Resource scalar X X X X 189 Bind master X X 190 190 191 191 =head1 urn:ietf:params:xml:ns:xmpp-session … … 193 193 Name Type Get Set Remove Defined Add 194 194 ========================== ========= === === ====== ======= === 195 Session master X X 195 Session master X X 196 196 197 197 … … 233 233 234 234 $self->{FUNCS} = \%FUNCTIONS; 235 235 236 236 my $result = $self->_init(@_); 237 237 238 238 return $result if defined($result); 239 239 240 240 return $self; 241 241 } … … 309 309 # 310 310 ############################################################################## 311 sub GetXML 311 sub GetXML 312 312 { 313 313 my $self = shift; … … 324 324 { 325 325 my $self = shift; 326 326 327 327 return $self->{TAG}; 328 328 } … … 345 345 $node->remove_attrib("xmlns") 346 346 if (exists($self->{SKIPXMLNS}) && ($keepXMLNS == 0)); 347 347 348 348 foreach my $child (@{$self->{CHILDREN}}) 349 349 { … … 365 365 366 366 return $node; 367 } 367 } 368 368 369 369 … … 379 379 my $xmlns = shift; 380 380 my $tag = shift; 381 381 382 382 return unless exists($Net::XMPP::Namespaces::NS{$xmlns}); 383 383 … … 388 388 if exists($Net::XMPP::Namespaces::NS{$xmlns}); 389 389 } 390 390 391 391 my $node = new XML::Stream::Node($tag); 392 392 $node->put_attrib(xmlns=>$xmlns); … … 445 445 my $xmlns = shift; 446 446 my $tag = shift; 447 447 448 448 return unless exists($Net::XMPP::Namespaces::NS{$xmlns}); 449 449 … … 454 454 if exists($Net::XMPP::Namespaces::NS{$xmlns}); 455 455 } 456 456 457 457 my $node = new XML::Stream::Node($tag); 458 458 $node->put_attrib(xmlns=>$xmlns); … … 592 592 593 593 #$self->_debug("_xpath_AUTOLOAD: setFuncs(",join(",",@setFuncs),")"); 594 595 594 595 596 596 my $type = (exists($funcs->{$var}->{type}) ? 597 597 $funcs->{$var}->{type} : … … 607 607 608 608 my $child = ""; 609 609 610 610 #------------------------------------------------------------------------- 611 611 # When this is a master function... change the above variables... … … 630 630 (ref($funcType) eq "ARRAY")); 631 631 } 632 632 633 633 $child = \@newSetFuncs; 634 634 } … … 644 644 { 645 645 $child = $funcs->{$var}->{child}; 646 646 647 647 #$self->_debug("_xpath_AUTOLOAD: child($child)"); 648 648 649 649 if (exists($child->{ns})) 650 650 { 651 651 my $addXMLNS = $child->{ns}; 652 652 653 653 my $addFuncs = $Net::XMPP::Namespaces::NS{$addXMLNS}->{xpath}; 654 654 my @calls = … … 691 691 692 692 my $funcs; 693 693 694 694 my $coreFuncs = $self->{FUNCS}; 695 695 #eval "\$coreFuncs = \\%".$package."::FUNCTIONS"; … … 750 750 751 751 #$self->_debug("_xpath: call($call) args(",join(",",@_),")"); 752 752 753 753 if ($call eq "Get") { return $self->_xpath_get(@_) ; } 754 754 elsif ($call eq "Set") { return $self->_xpath_set(@_); } … … 761 761 ############################################################################## 762 762 # 763 # _xpath_get - returns the value stored in the node 763 # _xpath_get - returns the value stored in the node 764 764 # 765 765 ############################################################################## … … 771 771 my $childtype = shift; 772 772 my ($arg0) = shift; 773 773 774 774 #$self->_debug("_xpath_get: self($self) type($type) xpath($xpath) childtype($childtype)"); 775 775 #$self->{TREE}->debug(); … … 777 777 my $subType; 778 778 ($type,$subType) = $self->_xpath_resolve_types($type); 779 779 780 780 781 781 #------------------------------------------------------------------------- … … 785 785 { 786 786 my %fields; 787 787 788 788 foreach my $func (sort {$a cmp $b} @{$childtype}) 789 789 { … … 808 808 return %fields; 809 809 } 810 810 811 811 #------------------------------------------------------------------------- 812 812 # type == node … … 814 814 # XXX Remove this if there are no problems 815 815 #if ($type eq "node") 816 #{ 816 #{ 817 817 #$self->_debug("_xpath_get: node: xmlns($arg0)") if defined($arg0); 818 818 … … 825 825 #push(@results,$child) 826 826 # if (!defined($arg0) || 827 # ($arg0 eq "") || 827 # ($arg0 eq "") || 828 828 # ($child->GetTree(1)->get_attrib("xmlns") eq $arg0)); 829 829 #} … … 866 866 return $#nodes > -1; 867 867 } 868 868 869 869 #------------------------------------------------------------------------- 870 870 # type == array … … 875 875 return $nodes[0]; 876 876 } 877 877 878 878 #------------------------------------------------------------------------- 879 879 # type == raw … … 884 884 885 885 return join("",@{$self->{RAWXML}}) if ($#{$self->{RAWXML}} > -1); 886 886 887 887 foreach my $node (@nodes) 888 888 { … … 1047 1047 #$self->_debug("_xpath_set: val($val)") unless !defined($val); 1048 1048 #$self->_debug("_xpath_set: path($path)"); 1049 1049 1050 1050 my $childPath = ""; 1051 1051 while(($path !~ /^\/?\@/) && ($path !~ /^\/?text\(\)/)) … … 1056 1056 #$self->_debug("_xpath_set: path($path)"); 1057 1057 #$self->_debug("_xpath_set: childPath($childPath)"); 1058 1058 1059 1059 if (($type eq "scalar") || ($type eq "jid") || ($type eq "timestamp")) 1060 1060 { 1061 1061 my $tmpPath = $child; 1062 1062 $tmpPath = "$childPath/$child" if ($childPath ne ""); 1063 1063 1064 1064 my @nodes = $self->{TREE}->XPath("$tmpPath"); 1065 1065 #$self->_debug("_xpath_set: \$#nodes($#nodes)"); … … 1092 1092 return; 1093 1093 } 1094 1094 1095 1095 $childPath .= "/" unless ($childPath eq ""); 1096 1096 $childPath .= $child; … … 1098 1098 1099 1099 my ($piece) = ($path =~ /^\/?([^\/]+)/); 1100 1100 1101 1101 #$self->_debug("_xpath_set: piece($piece)"); 1102 1102 … … 1145 1145 my @nodes = $self->{TREE}->XPath($xpath); 1146 1146 my $defined = ($#nodes > -1); 1147 1147 1148 1148 #$self->_debug("_xpath_defined: nodes(",join(",",@nodes),")"); 1149 1149 #$self->_debug("_xpath_defined: ",$#nodes); 1150 1150 1151 1151 if (!$defined && (($type eq "child") || ($type eq "children") || ($type eq "node"))) 1152 1152 { … … 1155 1155 $ns = $childtype->{ns}; 1156 1156 } 1157 1157 1158 1158 foreach my $packet (@{$self->{CHILDREN}}) 1159 1159 { … … 1174 1174 ############################################################################## 1175 1175 # 1176 # _xpath_add - returns the value stored in the node 1176 # _xpath_add - returns the value stored in the node 1177 1177 # 1178 1178 ############################################################################## … … 1242 1242 1243 1243 #$self->_debug("_xpath_remove: nodes($#nodes)"); 1244 1244 1245 1245 if ($xpath =~ /\@(\S+)/) 1246 1246 { 1247 1247 my $attrib = $1; 1248 1248 #$self->_debug("_xpath_remove: attrib($attrib)"); 1249 1249 1250 1250 if ($nodePath eq "") 1251 1251 { … … 1261 1261 return; 1262 1262 } 1263 1263 1264 1264 foreach my $node (@nodes) 1265 1265 { … … 1292 1292 my $self = shift; 1293 1293 my $type = shift; 1294 1294 1295 1295 my $subType = ""; 1296 1296 if (ref($type) eq "ARRAY") … … 1307 1307 } 1308 1308 } 1309 1309 1310 1310 #$self->_debug("_xpath_resolve_types: type($type) subtype($subType)"); 1311 1311 -
perl/modules/Jabber/lib/XML/Stream.pm
ra8d5a39 r7869e48 317 317 318 318 my $lc = lc($module); 319 319 320 320 eval("\$HANDLERS{\$lc}->{startElement} = \\&XML::Stream::${module}::_handle_element;"); 321 321 eval("\$HANDLERS{\$lc}->{endElement} = \\&XML::Stream::${module}::_handle_close;"); … … 600 600 601 601 my $root = $self->GetRoot($sid); 602 602 603 603 if ($root->{xmlns} ne $self->{SIDS}->{$serverid}->{namespace}) 604 604 { … … 668 668 } 669 669 while($#_ >= 0) { $self->{SIDS}->{newconnection}->{ lc pop(@_) } = pop(@_); } 670 670 671 671 my $timeout = exists($self->{SIDS}->{newconnection}->{timeout}) ? 672 672 delete($self->{SIDS}->{newconnection}->{timeout}) : … … 674 674 675 675 $self->debug(4,"Connect: timeout($timeout)"); 676 676 677 677 678 678 if (exists($self->{SIDS}->{newconnection}->{srv})) … … 683 683 my $res = Net::DNS::Resolver->new(); 684 684 my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV"); 685 685 686 686 if ($query) 687 { 687 { 688 688 $self->{SIDS}->{newconnection}->{hostname} = ($query->answer)[0]->target(); 689 689 $self->{SIDS}->{newconnection}->{port} = ($query->answer)[0]->port(); … … 771 771 $self->{SIDS}->{newconnection}->{sock} = 772 772 new FileHandle(">&STDOUT"); 773 } 773 } 774 774 775 775 #--------------------------------------------------------------------------- … … 1030 1030 #--------------------------------------------------------------------------- 1031 1031 my %stream_args; 1032 1032 1033 1033 if (($self->{SIDS}->{$currsid}->{connectiontype} eq "tcpip") || 1034 1034 ($self->{SIDS}->{$currsid}->{connectiontype} eq "http")) … … 1036 1036 $stream_args{to}= $self->{SIDS}->{$currsid}->{hostname} 1037 1037 unless exists($self->{SIDS}->{$currsid}->{to}); 1038 1038 1039 1039 $stream_args{to} = $self->{SIDS}->{$currsid}->{to} 1040 1040 if exists($self->{SIDS}->{$currsid}->{to}); … … 1044 1044 ($self->{SIDS}->{$currsid}->{myhostname} ne "") 1045 1045 ); 1046 1046 1047 1047 $stream_args{from} = $self->{SIDS}->{$currsid}->{from} 1048 1048 if exists($self->{SIDS}->{$currsid}->{from}); 1049 1049 1050 1050 $stream_args{id} = $self->{SIDS}->{$currsid}->{id} 1051 1051 if (exists($self->{SIDS}->{$currsid}->{id}) && … … 1055 1055 $stream_args{namespaces} = $self->{SIDS}->{$currsid}->{namespaces}; 1056 1056 } 1057 1057 1058 1058 my $stream = 1059 1059 $self->StreamHeader( … … 1172 1172 } 1173 1173 } 1174 1174 1175 1175 return $self->GetRoot($sid); 1176 1176 } … … 1333 1333 #--------------------------------------------------------------------------- 1334 1334 $self->{SIDS}->{$sid}->{streamfeatures}->{received} = 0; 1335 1335 1336 1336 #--------------------------------------------------------------------------- 1337 1337 # First acitivty is the connection... duh. =) … … 1522 1522 $self->debug(4,"Process: sid($sid) time(",time,") timeout(undef)"); 1523 1523 } 1524 1524 1525 1525 $self->Respond($sid) 1526 1526 if (exists($self->{SIDS}->{$sid}->{activitytimeout}) && … … 1637 1637 $self->debug(3,"Send: sid($sid)"); 1638 1638 $self->debug(3,"Send: status($self->{SIDS}->{$sid}->{status})"); 1639 1639 1640 1640 $self->{SIDS}->{$sid}->{keepalive} = time; 1641 1641 … … 1677 1677 return; 1678 1678 } 1679 1679 1680 1680 $self->debug(4,"Send: SENDWRITTEN($self->{SENDWRITTEN})"); 1681 1681 … … 1736 1736 } 1737 1737 } 1738 1738 1739 1739 #------------------------------------------------------------------------- 1740 1740 # XMPP-TLS - 1.0 … … 1753 1753 } 1754 1754 } 1755 1755 1756 1756 #------------------------------------------------------------------------- 1757 1757 # XMPP-Bind - 1.0 … … 1762 1762 $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-bind'} = 1; 1763 1763 } 1764 1764 1765 1765 #------------------------------------------------------------------------- 1766 1766 # XMPP-Session - 1.0 … … 1771 1771 $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-session'} = 1; 1772 1772 } 1773 1773 1774 1774 } 1775 1775 … … 1833 1833 $self->TLSClientFailure($sid,$node); 1834 1834 } 1835 1835 1836 1836 if ($tag eq "proceed") 1837 1837 { … … 1853 1853 $timeout = 120 unless defined($timeout); 1854 1854 $timeout = 120 if ($timeout eq ""); 1855 1855 1856 1856 $self->TLSStartTLS($sid); 1857 1857 … … 1904 1904 return; 1905 1905 } 1906 1906 1907 1907 IO::Socket::SSL->start_SSL($self->{SIDS}->{$sid}->{sock},{SSL_verify_mode=>0x00}); 1908 1908 … … 1910 1910 $self->debug(1,"TLSClientProceed: SSL: We are secure") 1911 1911 if ($self->{SIDS}->{$sid}->{sock}); 1912 1912 1913 1913 $self->{SIDS}->{$sid}->{tls}->{done} = 1; 1914 1914 $self->{SIDS}->{$sid}->{tls}->{secure} = 1; … … 1925 1925 my $self = shift; 1926 1926 my $sid = shift; 1927 1927 1928 1928 return $self->{SIDS}->{$sid}->{tls}->{secure}; 1929 1929 } … … 1939 1939 my $self = shift; 1940 1940 my $sid = shift; 1941 1941 1942 1942 return $self->{SIDS}->{$sid}->{tls}->{done}; 1943 1943 } … … 1953 1953 my $self = shift; 1954 1954 my $sid = shift; 1955 1955 1956 1956 return $self->{SIDS}->{$sid}->{tls}->{error}; 1957 1957 } … … 1968 1968 my $sid = shift; 1969 1969 my $node = shift; 1970 1970 1971 1971 my $type = &XPath($node,"*/name()"); 1972 1972 … … 1986 1986 my $sid = shift; 1987 1987 my $type = shift; 1988 1988 1989 1989 $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>"); 1990 1990 } … … 2018 2018 $self->SASLAnswerChallenge($sid,$node); 2019 2019 } 2020 2020 2021 2021 if ($tag eq "failure") 2022 2022 { 2023 2023 $self->SASLClientFailure($sid,$node); 2024 2024 } 2025 2025 2026 2026 if ($tag eq "success") 2027 2027 { … … 2045 2045 my $challenge64 = &XPath($node,"text()"); 2046 2046 my $challenge = MIME::Base64::decode_base64($challenge64); 2047 2047 2048 2048 #------------------------------------------------------------------------- 2049 2049 # As far as I can tell, if the challenge contains rspauth, then we authed. … … 2112 2112 2113 2113 return unless defined($mechanisms); 2114 2114 2115 2115 my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}), 2116 2116 callback=>{ … … 2140 2140 my $self = shift; 2141 2141 my $sid = shift; 2142 2142 2143 2143 return $self->{SIDS}->{$sid}->{sasl}->{authed}; 2144 2144 } … … 2154 2154 my $self = shift; 2155 2155 my $sid = shift; 2156 2156 2157 2157 return $self->{SIDS}->{$sid}->{sasl}->{done}; 2158 2158 } … … 2168 2168 my $self = shift; 2169 2169 my $sid = shift; 2170 2170 2171 2171 return $self->{SIDS}->{$sid}->{sasl}->{error}; 2172 2172 } … … 2183 2183 my $sid = shift; 2184 2184 my $node = shift; 2185 2185 2186 2186 my $type = &XPath($node,"*/name()"); 2187 2187 … … 2201 2201 my $sid = shift; 2202 2202 my $node = shift; 2203 2203 2204 2204 $self->{SIDS}->{$sid}->{sasl}->{authed} = 1; 2205 2205 $self->{SIDS}->{$sid}->{sasl}->{done} = 1; … … 2217 2217 my $sid = shift; 2218 2218 my $type = shift; 2219 2219 2220 2220 $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>"); 2221 2221 } … … 2292 2292 # Make sure we are receiving a valid stream on the same namespace. 2293 2293 #--------------------------------------------------------------------- 2294 2294 2295 2295 $self->debug(3,"_handle_root: ($self->{SIDS}->{$self->{SIDS}->{$sid}->{serverid}}->{namespace})"); 2296 2296 $self->{SIDS}->{$sid}->{status} = … … 2328 2328 } 2329 2329 } 2330 2330 2331 2331 #------------------------------------------------------------------------- 2332 2332 # Sometimes we will get an error, so let's parse the tag assuming that we … … 2335 2335 my $stream_prefix = $self->StreamPrefix($sid); 2336 2336 $self->debug(5,"_handle_root: stream_prefix($stream_prefix)"); 2337 2337 2338 2338 if ($tag eq $stream_prefix.":error") 2339 2339 { … … 2441 2441 $self->{SIDS}->{$sid}->{streamerror}->{type} = "unknown"; 2442 2442 $self->{SIDS}->{$sid}->{streamerror}->{node} = $node; 2443 2443 2444 2444 #------------------------------------------------------------------------- 2445 2445 # Check for older 0.9 streams and handle the errors for them. … … 2676 2676 my $tree = shift; 2677 2677 my $path = shift; 2678 2678 2679 2679 my $query = new XML::Stream::XPath::Query($path); 2680 2680 my $result = $query->execute($tree); … … 2683 2683 my %attribs = $result->getAttribs(); 2684 2684 return %attribs if (scalar(keys(%attribs)) > 0); 2685 2685 2686 2686 my @values = $result->getValues(); 2687 2687 @values = $result->getList() unless ($#values > -1); … … 2703 2703 my $tree = shift; 2704 2704 my $path = shift; 2705 2705 2706 2706 my $query = new XML::Stream::XPath::Query($path); 2707 2707 my $result = $query->execute($tree); … … 2891 2891 { 2892 2892 my $const = shift; 2893 2893 2894 2894 return $XMLNS{$const}; 2895 2895 } … … 2905 2905 my $self = shift; 2906 2906 my $sid = shift; 2907 2907 2908 2908 return $self->ns2prefix($sid,&ConstXMLNS("stream")); 2909 2909 } … … 2991 2991 2992 2992 $self->debug(1,"LoadSSL: Load the IO::Socket::SSL module"); 2993 2993 2994 2994 if (defined($SSL) && ($SSL == 1)) 2995 2995 { … … 2997 2997 return 1; 2998 2998 } 2999 2999 3000 3000 if (defined($SSL) && ($SSL == 0)) 3001 3001 { … … 3106 3106 $stream .= " ".$ns->GetStream(); 3107 3107 } 3108 3108 3109 3109 $stream .= ">"; 3110 3110 -
perl/modules/Jabber/lib/XML/Stream/Namespace.pm
rc2bed55 r7869e48 25 25 =head1 NAME 26 26 27 XML::Stream::Namespace - Object to make defining Namespaces easier in 27 XML::Stream::Namespace - Object to make defining Namespaces easier in 28 28 XML::Stream. 29 29 … … 49 49 GetAttributes() returns a hash ( attrib1=>"value1",attrib2=>"value2") 50 50 GetStream() returns the following string: 51 "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 52 mynamespace:attrib1='value1' 51 "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 52 mynamespace:attrib1='value1' 53 53 mynamespace:attrib2='value2'" 54 54 … … 71 71 # of the stream to foo.bar.org:1234... 72 72 # 73 # <stream:stream 73 # <stream:stream 74 74 # xmlns:stream="http://etherx.jabber.org/streams" 75 75 # to="foo.bar.org" 76 # xmlns="foo:bar" 76 # xmlns="foo:bar" 77 77 # xmlns:mynamespace="http://www.mynamespace.org/xmlns" 78 78 # mynamespace:foo="bar" 79 79 # mynamespace:bob="vila"> 80 80 # 81 81 82 82 83 83 =head1 AUTHOR … … 183 183 $string .= "='".$self->GetAttributes($attrib)."'"; 184 184 } 185 185 186 186 return $string; 187 187 } -
perl/modules/Jabber/lib/XML/Stream/Node.pm
rc2bed55 r7869e48 85 85 86 86 remove_child(node) - removes the child node from the current node. 87 87 88 88 remove_cdata() - removes all of the cdata children from the current node. 89 89 … … 120 120 121 121 XPath(path) - run XML::Stream::XPath on this node. 122 122 123 123 XPathCheck(path) - run XML::Stream::XPath on this node and return 1 or 0 124 124 to see if it matches or not. … … 266 266 267 267 return $cdata; 268 } 268 } 269 269 270 270 … … 286 286 splice(@{$self->{CHILDREN}},$index,1); 287 287 } 288 } 288 } 289 289 290 290 … … 294 294 return () unless exists($self->{ATTRIBS}); 295 295 return %{$self->{ATTRIBS}}; 296 } 296 } 297 297 298 298 … … 308 308 309 309 sub put_attrib 310 { 310 { 311 311 my $self = shift; 312 312 my (%att) = @_; … … 366 366 my ($tag) = @_; 367 367 368 $self->{TAG} = $tag; 368 $self->{TAG} = $tag; 369 369 } 370 370 … … 513 513 514 514 $self->debug(2,"Node: _handle_close: check2(",$#{$self->{SIDS}->{$sid}->{node}},")"); 515 515 516 516 if($#{$self->{SIDS}->{$sid}->{node}} == -1) 517 517 { … … 521 521 { 522 522 my $stream_prefix = $self->StreamPrefix($sid); 523 523 524 524 if(defined($self->{SIDS}->{$sid}->{node}->[0]) && 525 525 ($self->{SIDS}->{$sid}->{node}->[0]->get_tag() =~ /^${stream_prefix}\:/)) … … 542 542 { 543 543 my $xmlns = $node->get_attrib("xmlns"); 544 544 545 545 $self->ProcessSASLPacket($sid,$node) 546 546 if ($xmlns eq &XML::Stream::ConstXMLNS("xmpp-sasl")); -
perl/modules/Jabber/lib/XML/Stream/Parser.pm
rc2bed55 r7869e48 324 324 $self->{CNAME}->[$self->{CURR}] = $name; 325 325 } 326 326 327 327 $self->{XML} = substr($self->{XML},$close+1,length($self->{XML})-$close-1); 328 328 next; … … 337 337 return $self->returnData(0); 338 338 } 339 339 340 340 &{$self->{HANDLER}->{characters}}($self,substr($self->{XML},9,$cdataclose-9)); 341 341 342 342 $self->{XML} = substr($self->{XML},$cdataclose+3,length($self->{XML})-$cdataclose-3); 343 343 next; … … 510 510 return unless ($self->{DOC} == 1); 511 511 512 if ($self->{STYLE} eq "debug") 512 if ($self->{STYLE} eq "debug") 513 513 { 514 514 my $str = $cdata; … … 530 530 push @{$self->{TREE}[$#{$self->{TREE}}]}, 0; 531 531 push @{$self->{TREE}[$#{$self->{TREE}}]}, $cdata; 532 } 532 } 533 533 } 534 534 } -
perl/modules/Jabber/lib/XML/Stream/Tree.pm
rc2bed55 r7869e48 142 142 push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, 0; 143 143 push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, $cdata; 144 } 144 } 145 145 } 146 146 … … 187 187 if(defined($self->{SIDS}->{$sid}->{tree}->[0]) && 188 188 ($self->{SIDS}->{$sid}->{tree}->[0] =~ /^${stream_prefix}\:/)) 189 { 189 { 190 190 my @tree = @{$self->{SIDS}->{$sid}->{tree}}; 191 191 $self->{SIDS}->{$sid}->{tree} = []; … … 196 196 my @tree = @{$self->{SIDS}->{$sid}->{tree}}; 197 197 $self->{SIDS}->{$sid}->{tree} = []; 198 198 199 199 my @special = 200 200 &XML::Stream::XPath( … … 384 384 return 1; 385 385 } 386 386 387 387 #--------------------------------------------------------------------- 388 388 # Return the raw CDATA value without mark ups, or the value of the … … 592 592 593 593 my $str = ""; 594 if (ref($parseTree->[0]) eq "") 594 if (ref($parseTree->[0]) eq "") 595 595 { 596 596 if ($parseTree->[0] eq "0") … … 608 608 { 609 609 $str .= ">"; 610 610 611 611 my $index = 1; 612 612 while($index <= $#{$parseTree->[1]}) … … 616 616 $index += 2; 617 617 } 618 618 619 619 $str .= $rawXML if defined($rawXML); 620 620 $str .= "</".$parseTree->[0].">"; -
perl/modules/Jabber/lib/XML/Stream/XPath/Op.pm
rc2bed55 r7869e48 50 50 $self->{TYPE} = shift; 51 51 $self->{VALUE} = shift; 52 52 53 53 return $self; 54 54 } … … 165 165 { 166 166 push(@valid_elems,$elem); 167 } 168 } 169 170 $$ctxt->setList(@valid_elems); 171 167 } 168 } 169 170 $$ctxt->setList(@valid_elems); 171 172 172 if ($#valid_elems == -1) 173 173 { … … 224 224 225 225 my @valid_elems; 226 226 227 227 foreach my $elem (@elems) 228 228 { 229 229 push(@valid_elems,$self->descend($elem)); 230 230 } 231 231 232 232 $$ctxt->setList(@valid_elems); 233 233 … … 247 247 248 248 my @valid_elems; 249 249 250 250 if (($self->{VALUE} eq "*") || (&XML::Stream::GetXMLData("tag",$elem) eq $self->{VALUE})) 251 251 { 252 252 push(@valid_elems,$elem); 253 253 } 254 254 255 255 foreach my $child (&XML::Stream::GetXMLData("child array",$elem,"*")) 256 256 { 257 257 push(@valid_elems,$self->descend($child)); 258 258 } 259 259 260 260 return @valid_elems; 261 261 } … … 326 326 } 327 327 } 328 328 329 329 $$ctxt->setList(@valid_elems); 330 330 … … 343 343 my $elem = shift; 344 344 return &XML::Stream::GetXMLData("value",$elem); 345 } 345 } 346 346 347 347 … … 374 374 $tmp_ctxt->setList($$ctxt->getList()); 375 375 $tmp_ctxt->in_context(0); 376 376 377 377 if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt)) 378 378 { … … 393 393 @valid_elems = $$ctxt->getList(); 394 394 } 395 395 396 396 $$ctxt->setList(@valid_elems); 397 397 … … 414 414 print $space," op_l: "; 415 415 $self->{OP_L}->display($space." "); 416 416 417 417 print $space," op_r: "; 418 418 $self->{OP_R}->display($space." "); … … 449 449 $tmp_ctxt->setList($$ctxt->getList()); 450 450 $tmp_ctxt->in_context(0); 451 451 452 452 if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt)) 453 453 { … … 468 468 @valid_elems = $$ctxt->getList(); 469 469 } 470 470 471 471 $$ctxt->setList(@valid_elems); 472 472 … … 489 489 print $space," op_l: "; 490 490 $self->{OP_L}->display($space." "); 491 491 492 492 print $space," op_r: "; 493 493 $self->{OP_R}->display($space." "); … … 524 524 my @values; 525 525 my %attribs; 526 526 527 527 foreach my $elem (@elems) 528 528 { … … 558 558 return; 559 559 } 560 560 561 561 return 1; 562 562 } … … 607 607 my $opl = $self->{OP_L}->isValid($ctxt); 608 608 my $opr = $self->{OP_R}->isValid($ctxt); 609 609 610 610 if ($opl && $opr) 611 611 { … … 628 628 print $space," op_l: \n"; 629 629 $self->{OP_L}->display($space." "); 630 630 631 631 print $space," op_r: \n"; 632 632 $self->{OP_R}->display($space." "); … … 672 672 my $opl = $self->{OP_L}->isValid(\$tmp_ctxt_l); 673 673 my $opr = $self->{OP_R}->isValid(\$tmp_ctxt_r); 674 674 675 675 if ($opl || $opr) 676 676 { 677 677 push(@valid_elems,$elem); 678 } 679 } 680 681 $$ctxt->setList(@valid_elems); 682 678 } 679 } 680 681 $$ctxt->setList(@valid_elems); 682 683 683 if ($#valid_elems == -1) 684 684 { … … 699 699 print "$space op_l: "; 700 700 $self->{OP_L}->display("$space "); 701 701 702 702 print "$space op_r: "; 703 703 $self->{OP_R}->display("$space "); … … 750 750 my $self = shift; 751 751 my $elem = shift; 752 752 753 753 my $result; 754 754 eval("\$result = &{\$XML::Stream::XPath::VALUES{\$self->{VALUE}}}(\$elem);"); … … 790 790 push(@valid_elems,$elem); 791 791 push(@valid_values,$text); 792 } 792 } 793 793 } 794 794 795 795 $$ctxt->setList(@valid_elems); 796 796 $$ctxt->setValues(@valid_values); 797 797 798 798 if ($#valid_elems == -1) 799 799 { … … 819 819 { 820 820 push(@valid_elems,$elem); 821 } 822 } 823 824 $$ctxt->setList(@valid_elems); 825 821 } 822 } 823 824 $$ctxt->setList(@valid_elems); 825 826 826 if ($#valid_elems == -1) 827 827 { … … 848 848 push(@valid_elems,$elem); 849 849 push(@valid_values,$text); 850 } 850 } 851 851 } 852 852 853 853 $$ctxt->setList(@valid_elems); 854 854 $$ctxt->setValues(@valid_values); 855 855 856 856 if ($#valid_elems == -1) 857 857 { … … 878 878 { 879 879 push(@valid_elems,$elem); 880 } 881 } 882 883 $$ctxt->setList(@valid_elems); 884 880 } 881 } 882 883 $$ctxt->setList(@valid_elems); 884 885 885 if ($#valid_elems == -1) 886 886 { -
perl/modules/Jabber/lib/XML/Stream/XPath/Query.pm
rc2bed55 r7869e48 37 37 bless($self,$proto); 38 38 39 $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 39 $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 40 40 $self->{QUERY} = shift; 41 41 42 42 if (!defined($self->{QUERY}) || ($self->{QUERY} eq "")) 43 43 { 44 44 confess("No query string specified"); 45 45 } 46 46 47 47 $self->parseQuery(); 48 48 49 49 return $self; 50 50 } … … 52 52 53 53 sub getNextToken 54 { 54 { 55 55 my $self = shift; 56 56 my $pos = shift; … … 104 104 my $token_start = ++$$pos; 105 105 my $ident; 106 106 107 107 if (defined($token)) 108 108 { … … 193 193 return; 194 194 } 195 195 196 196 $$pos = $token_start; 197 197 my $val = $self->getNextIdentifier($pos); … … 234 234 235 235 $self->getOp($pos,$token); 236 236 237 237 foreach my $arg ($op_pos..$#{$self->{OPS}}) 238 238 { … … 241 241 242 242 splice(@{$self->{OPS}},$op_pos); 243 243 244 244 } 245 245 elsif ($token eq ")") … … 261 261 confess("Found ',' but not in a function"); 262 262 } 263 263 264 264 } 265 265 elsif ($token eq "=") … … 280 280 } 281 281 $$pos++; 282 282 283 283 my $tmp_op; 284 284 while(!defined($tmp_op)) … … 307 307 confess("Token undefined"); 308 308 } 309 309 310 310 $loop = 0 unless $in_context; 311 311 } -
perl/modules/Jabber/lib/XML/Stream/XPath/Value.pm
rc2bed55 r7869e48 96 96 97 97 sub getAttribs 98 { 98 { 99 99 my $self = shift; 100 100 return unless (scalar(keys(%{$self->{ATTRIBS}})) > 0); -
perl/modules/Twitter/lib/BarnOwl/Module/Twitter.pm
rb8a3e00 r7869e48 137 137 my $twitter_args = { username => $cfg->{user}, 138 138 password => $cfg->{password}, 139 source => 'barnowl', 139 source => 'barnowl', 140 140 }; 141 141 if (defined $cfg->{service}) { … … 230 230 my $handle = find_account($account); 231 231 $handle->twitter(@_); 232 } 232 } 233 233 else { 234 234 # broadcast … … 258 258 summary => 'Send a Twitter @ message', 259 259 usage => 'twitter-atreply USER [ACCOUNT]', 260 description => 'Send a Twitter @reply Message to USER on ACCOUNT (defaults to default_sender,' 260 description => 'Send a Twitter @reply Message to USER on ACCOUNT (defaults to default_sender,' 261 261 . "\nor first service if no default is provided)" 262 262 } -
perl/modules/Twitter/lib/BarnOwl/Module/Twitter/Handle.pm
r4ebbfbc r7869e48 397 397 type => 'Twitter', 398 398 sender => $self->{cfg}->{user} || $self->{user}, 399 recipient => $who, 399 recipient => $who, 400 400 direction => 'out', 401 401 body => $msg, -
perl/modules/WordWrap/inc/Module/Install/Metadata.pm
r1375a6a r7869e48 482 482 sub _perl_version { 483 483 my $v = $_[-1]; 484 $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; 484 $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; 485 485 $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; 486 486 $v =~ s/(\.\d\d\d)000$/$1/; … … 505 505 sub write_mymeta { 506 506 my $self = shift; 507 507 508 508 # If there's no existing META.yml there is nothing we can do 509 509 return unless -f 'META.yml';
Note: See TracChangeset
for help on using the changeset viewer.