Re: [JDEV] Perl code sample needed...

2003-01-27 Thread Curtis Hawthorne
Rebbaj,

I don't know about 1.0028, but I pretty much got that
example out of the 1.28 (current release) documentation. 
More information here:

http://search.cpan.org/author/REATMON/Net-Jabber-1.28/Jabber/Protocol.pm#IQ_Roster_Functions.

(Also, scroll down a ways for a more in depth description
of the Roster methods).

Curtis H.

--- rebbaj rebbaj <[EMAIL PROTECTED]> wrote:
> 
> Thanks Curtis,
> I have not seen any referenced to the RosterParse in
> Jabber::Net 1.0028.  It only seems to show up in the
> 1.0024 documentation.  Is there a way to do this using
> 1.0028?
>  Curtis Hawthorne <[EMAIL PROTECTED]> wrote:Rebbaj,
> 
> I think what you want is the RosterParse method in
> Net::Jabber. It returns a hash with all the information
> you need. For instance:
> 
> sub InIQ {
> my $sid = shift;
> my $iq = shift;
> 
> my %rosterupdate = $iq->RosterParse($iq);
> 
> foreach (keys %rosterupdate) {
> print "Name: ", $_->{name}, "\n";
> print "Subscription: ", $_->{subscription}, "\n";
> print "Ask: ", $_->{ask}, "\n";
> print "Groups: ", $_->{groups}, "\n";
> }
> }
> 
> From there you could turn it into an array if you wanted,
> but I would think a hash would be easier to work with.
> 
> Curtis H.
> 
> --- rebbaj rebbaj wrote:
> > 
> > After some more testing, I got the impression that the
> > following callback logic would work. Getting the s
> > does not seem to work. Has anybody ever made this work
> > before?? 
> > sub InIQ
> > {
> > my $sid = shift;
> > my $iq = shift; 
> > my $id = $iq->GetID();
> > print "id = $id\n"; # works 
> > my $type = $iq->GetType();
> > print "type = $type\n"; #works 
> > my $xmlns = $iq->GetQueryXMLNS();
> > print "xmlns = $xmlns\n"; #works 
> > foreach my $query ($iq->GetQuery->GetItems) {
> > print ("JID = $query->GetItem()->GetJID\n"); # prints a
> > hash
> > print ("Name = $query->GetItem()->GetName\n"); #
> > prints a hash
> > print ("Subscription =
> > $query->GetItem()->GetSubscription\n"); # prints a hash
> > print ("Group = $query->GetItem()->GetGroup[0]\n"); #
> > prints a hash
> > }
> > } 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> ___
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev
> 
> 
> 
> -
> With Yahoo! Mail you can get a bigger mailbox -- choose a
> size that fits your needs
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [JDEV] (no subject)

2003-01-27 Thread Pat Magnan
At 04:13 PM 1/27/2003 -0700, you wrote:

Daniel MD wrote:


hello, i was wondering what is wrong with the protocol that it can't take 
dynamic IP's ?   Jabber server, thus moving Jabber closer to a 
peer-to-peer model (currently this would require each device to have its 
own fully qualified domain name). I really would like to implement a p2p 
jabber network.

So does the Internet. If you want to change that, take it up with the guys 
who built it ;).

You can probably setup the jabberd server to be called 'localhost' and make 
the clients connect by IP address, why would you want to.. Every client is 
a server, then who gets to be tom or john? How do you route messages with 
such chaos?

Napster et all don't work completely dynamically either, someone somewhere 
controls who you are (server), and says you are johny28382, and then 
figures out you want to talk to susie12 and connects the two IPs directly. 
That server had to be registered in DNS (or have a fixed IP).

Jabber isn't crippled this way. No one cares who the client's IP is, only 
the server must be a known entity. I use Jabber for what is essentially P2P 
communications right now (two instances of my program exchange information 
over jabber), without issues.

If you want p2p file sharing, there's other things that accomplish that 
that are GPL and you can build what you like on top of them. Or use Jabber 
as the server, and the 'clients' can exchange 'file list' type messages 
with multiple other clients simultaneously as a result of a search. 
Personally, that's over engineering an established solution in my books, 
I'd grab a GPL'd p2p program, and extend it rather than kludging an IM 
solution to do it. But, that's my preference.

Jabber does exactly what its been designed to do. And is flexible enough 
(with sufficient work on the developer's part) to do more. Losing the 
'authoritative' server won't make it more flexible imho :).

___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev


Re: [JDEV] Perl code sample needed...

2003-01-27 Thread rebbaj rebbaj
H
I seem to be making progress but I do not understand why:)  Perhaps someone can explain what is going on.  In the IQ callback, I can get the first item in the roster by referencing it as follows with the Net::Jabber 1.0028 pm release.  
my @query = $iq->GetQuery();print ("name = ", $query[0]->GetItems->GetName(), "\n");print ("JID = ", $query[0]->GetItems->GetJID(), "\n"); print ("Subscription = ", $query[0]->GetItems->GetSubscription(), "\n");print ("Group = ", $query[0]->GetItems->GetGroup(), "\n");
How do I get the second item?  Using $query[1] does not do not as the array appears to have only one element although there are 10 items in the roster..  
What does the GetItem object do?  It is typed as a Master but I am not sure I understand what that means..
Any help is greatly appreciated as I get (slowly) through this learning curve.
Regards 
 rebbaj rebbaj <[EMAIL PROTECTED]> wrote:

Thanks Curtis, 
I have not seen any referenced to the RosterParse in Jabber::Net 1.0028.  It only seems to show up in the 1.0024 documentation.  Is there a way to do this using 1.0028? 
 Curtis Hawthorne <[EMAIL PROTECTED]> wrote: 
Rebbaj,I think what you want is the RosterParse method inNet::Jabber. It returns a hash with all the informationyou need. For instance:sub InIQ {my $sid = shift;my $iq = shift;my %rosterupdate = $iq->RosterParse($iq);foreach (keys %rosterupdate) {print "Name: ", $_->{name}, "\n";print "Subscription: ", $_->{subscription}, "\n";print "Ask: ", $_->{ask}, "\n";print "Groups: ", $_->{groups}, "\n";}}From there you could turn it into an array if you wanted,but I would think a hash would be easier to work with.Curtis H.--- rebbaj rebbaj <[EMAIL PROTECTED]>wrote:> > After some more testing, I got the impression that the> following callback logic would work. Getting the s> does not seem to work. Has anybody ever made this work> before?? > sub InIQ> {> my $sid = shift;> my $iq = shift; > my $id = $iq->GetID();> print "id = $id\n"; # works > my $type = $iq->GetType();> print "type = $type\n"; #works > my $xmlns = $iq->GetQueryXMLNS();> print "xmlns = $xmlns\n"; #works > foreach my $query ($iq->GetQuery->GetItems) {> print ("JID = $query->GetItem()->GetJID\n"); # prints a> hash> print ("Name = $query->GetItem()->GetName\n"); #> prints a hash> print ("Subscription => $query->GetItem()->GetSubscription\n"); # prints a hash> print ("Group = $query->GetItem()->GetGroup[0]\n"); #> prints a hash> }> } __Do you Yahoo!?Yahoo! Mail Plus - Powerful. Affordable. Sign up now.http://mailplus.yahoo.com___jdev mailing list[EMAIL PROTECTED]http://mailman.jabber.org/listinfo/jdev



With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needsWith Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs

Re: [JDEV] (no subject)

2003-01-27 Thread Chris Wilkes
On Mon, Jan 27, 2003 at 11:05:49PM -, Daniel MD wrote:
> hello, i was wondering what is wrong with the protocol that it can't
> take dynamic IP's ?

I'm not sure what you mean with that.  Do you mean that clients can't
have a dynamic IP address?  They can.  Servers can have it too as long
as a DNS name points to it.

> Jabber server, thus moving Jabber closer to a peer-to-peer model
> (currently this would require each device to have its own fully
> qualified domain name).

I think you're right in that if you want to send a message "directly" to
someone they will have to have a jabber server running on their end.

> I really would like to implement a p2p jabber network.

What do you mean "p2p"?  Do you mean that if A and B are talking through
a jabber server you should be able to send a message from A directly to
B, bypassing the server?

The problem with this is that if you start to go down the p2p route
you're going to introduce problems of identity.  How do I know the
identity of someone sending me a message?  Right now with a jabber
server there's some assurances (well there can be) that a person is who
they say they are.

If you can send pgp signed messages then that opens up some
possibilities of a p2p network.

Another problem I see with p2p is that if you're going to start doing
that on a larger scale you're going to get into a problem with spammers
send messages to you directly.  That's a problem right now with the
server model, but at least you can put a stop to it on the server.  With
limited bandwidth to cell phones and the like that could cause some
major problems.

Another practical problem with p2p is that if you're behind a firewall
then it isn't likely it will work without some major efforts.

Chris
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [JDEV] (no subject)

2003-01-27 Thread David Waite
The location of a server is determined by DNS, and thus servers changing 
IPs will cause loss of messages.

-David Waite

Daniel MD wrote:

hello, i was wondering what is wrong with the protocol that it can't 
take dynamic IP's ?   Jabber server, thus moving Jabber closer to a 
peer-to-peer model (currently this would require each device to have 
its own fully qualified domain name). I really would like to implement 
a p2p jabber network.

 

 

Best Regards,

Daniel MD

 


___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



[JDEV] (no subject)

2003-01-27 Thread Daniel MD








hello, i was wondering what is wrong
with the protocol that it can't take dynamic IP's ?   Jabber server, thus moving Jabber closer to a
peer-to-peer model (currently this would require each device to have its own
fully qualified domain name). I really would like to implement a p2p jabber
network.

 

 

Best Regards, 

Daniel MD

 








Re: [JDEV] Re:YAHOO ISSUES

2003-01-27 Thread Matthias Wimmer
zhang wrote:


hi paul
in fact the yahoo transport can not support the japanese word , just 
like ICQ 7 ,  how to :-(  deal it i?  I yet can not find a way to deal 
yahoo transport to let it support japanese yahoo server  ,

You can configure the server and charmap the transport is using in its 
configuration file:


   
  
   
   cs.yahoo.co.jp
   5050
   SHIFT-JIS



Tot kijk
   Matthias

--
Fon: +49-(0)70 0770 07770   http://matthias-wimmer.de/
Fax: +49-(0)89-312 88 654   jabber:[EMAIL PROTECTED]
HAM: DB1MW   OpenPGP: http://matthias-wimmer.de/encryption



msg08493/pgp0.pgp
Description: PGP signature


Re: [JDEV] Wondering if someone can help me out with keymappings in tkabber.

2003-01-27 Thread Jamin W. Collins
On Sun, Jan 26, 2003 at 11:05:55PM -0500, Christopher Smith wrote:

> Finally got tkabber working on my OSX machine.  However, I am having
> some trouble finding docs on how to make a custom set of keymappings
> for that will suit my machine. 
> 
> If someone can point me to a doc or give me some examples, I would be
> happy to write up the method that I used in getting tkabber working on
> my machine and post it to the list.

Perhaps this would be better suited for the tkabber list?
([EMAIL PROTECTED])

-- 
Jamin W. Collins
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [JDEV] Re:YAHOO ISSUES

2003-01-27 Thread zhang
hi paul
in fact the yahoo transport can not support the japanese word , just 
like ICQ 7 ,  how to :-(  deal it i?  I yet can not find a way to deal 
yahoo transport to let it support japanese yahoo server  ,

Paul Curtis wrote:

SARADHI wrote:
>
> and now itself wiht the latest Tranport installed in my jabber server
> and it works fine and I can communicate with all my MSN, AOL , ICQ and
> Yahoo buddies.

I cannot understand either  if there is a specific yahoo-t 
problem, let the list know, and I'll try to answer it.

As another poster asked about Japanese and Yahoo  I believe that 
the Japanese Yahoo server is different than the one in the default 
configuration. Can anyone help with that server name?

paul

___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev


--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/


___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev


[JDEV] Re: jdev digest, Vol 1 #1785 - 1 msg

2003-01-27 Thread Jean-Louis Seguineau/EXC/TEC
Mathias,

In XMPP, the server is responsible of broadcasting presence for the client.
There is no support in any implementation of the jabber servers for
splitting this broadcasting according to groups. Nor is there currently
support for multiple roster list.
So in the present state of the technology, I have the feeling that you have
to send different individual presence to all contacts of each subgroups to
achieve what you want. In short, this must be client based.

Hope it helps

Jean-Louis Seguineau


- Original Message -
> Message: 1
> From: "Mathias Waag" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Fri, 24 Jan 2003 18:21:49 +0100
> Subject: [JDEV] Presence Hierarchy
> Reply-To: [EMAIL PROTECTED]
>
> Hi,
>
> I have some question about Presence Information. I am just reading
> "Programming Jabber" from DJ Adams, so I know the normal way of
subscribing
> to the Presence of somebody else. And I also know how the Presence Infos
are
> sent to the subscribers(via the roster).
> Now we suppose that I have created the following Presence "Hierarchy":
> - online
> - at home
> - watching tv
> - available for chat
> - at work
> - meeting in room 5
> - on the phone
> - coffee break
> - offline
> I have two groups in my roster. coworkers and friends/family. How is it
> possible that the 2 groups receive different Presence Information? For
> example the coworkes shouldn´t know what I am doing at home. They should
> just receive the presence information "at home" while me friends should
> receive a more detailed information. Is it necessary to send 2 Presence
> Infos, each for one group?
>
> cheers
> mathias waag
>
>
>
> --__--__--
>
> ___
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev
>
>
> End of jdev Digest
>

___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



[JDEV] ANN: GreenThumb 2.0

2003-01-27 Thread Ulrich Staudinger
Hi all,

GreenThumb 2.0 has been released. It works pretty fine, at least in my
private test environment. 

http://greenhtumb.jabberstudio.org

tia, 
- ulrich

-- 
Ulrich Staudinger http://www.die-horde.de http://www.igpp.de 
Product Manager @ http://complat.sourceforge.net/jnlp/ 
JID: [EMAIL PROTECTED] 

___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev