GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::XMPP2::IM::CONTACT (3)

.ds Aq ’

NAME

Net::XMPP2::IM::Contact - Instant messaging roster contact

CONTENTS

SYNOPSIS



   my $con = Net::XMPP2::IM::Connection->new (...);
   ...
   my $ro  = $con->roster;
   if (my $c = $ro->get_contact (test@example.com)) {
      $c->make_message ()->add_body ("Hello there!")->send;
   }



DESCRIPTION

This module represents a class for contact objects which populate a roster (Net::XMPP2::IM::Roster.

You can get an instance of this class only by calling the get_contact function on a roster object.

METHODS

<B>send_update ($cb, B>%upd<B>)B> This method updates a contact. If the request is finished it will call $cb. If it resulted in an error the first argument of that callback will be a Net::XMPP2::Error::IQ object.

The %upd hash should have one of the following keys and defines what parts of the contact to update:
name => $name Updates the name of the contact. $name = ’’ erases the contact.
add_group => $groups Addes the contact to the groups in the arrayreference $groups.
remove_group => $groups Removes the contact from the groups in the arrayreference $groups.
groups => $groups This sets the groups of the contact. $groups should be an array reference of the groups.

<B>send_subscribe ()B> This method sends this contact a subscription request.
<B>send_subscribed ()B> This method accepts a contact’s subscription request.
<B>send_unsubscribe ()B> This method sends this contact a unsubscription request.
<B>send_unsubscribed ()B> This method sends this contact a unsubscription request which unsubscribes ones own presence from him (he wont get any further presence from us).
<B>update ($item)B> This method wants a Net::XMPP2::Node in $item which should be a roster item received from the server. The method will update the contact accordingly and return it self.
<B>update_presence ($presence)B> This method updates the presence of contacts on the roster. $presence must be a Net::XMPP2::Node object and should be a presence packet.
<B>get_presence ($jid)B> This method returns a presence of this contact if it is available. The return value is an instance of Net::XMPP2::IM::Presence or undef if no such presence exists.
<B>get_presencesB> Returns all presences of this contact in form of Net::XMPP2::IM::Presence objects.
<B>get_priority_presenceB> Returns the presence with the highest priority.
<B>groupsB> Returns the list of groups (strings) this contact is in.
<B>jidB> Returns the bare JID of this contact.
<B>nameB> Returns the (nick)name of this contact.
<B>is_on_roster ()B> Returns 1 if this is a contact that is officially on the roster and not just a contact we’ve received presence information for.
<B>subscriptionB> Returns the subscription state of this contact, which can be one of:



   none, to, from, both



If the contact isn’t on the roster anymore this method returns:



   remove



<B>askB> Returns ’subscribe’ if we asked this contact for subscription.
<B>subscription_pendingB> Returns true if this contact has a pending subscription. That means: the contact has to aknowledge the subscription.
<B>nicknameB> Returns the nickname of this contact.
<B>make_message (%args)B> This method returns a Net::XMPP2::IM::Message object with the to field set to this contacts JID.

%args are further arguments for the message constructor.

AUTHOR

Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>

COPYRIGHT & LICENSE

Copyright 2007 Robin Redeker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::XMPP2::IM::CONTACT (3) 2007-10-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.