ASPN ActiveState Programmer Network  
ActiveState, a division of Sophos
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Documentation | Mailing Lists | Modules | Products | Rx Cookbook | User Groups
Modules
Perl Modules
Python Modules

PPM
  PPM 3.0
  PPM Module Status
  PPM Repository
  PPM Zip Archives
  Thread-Safe Packages

Advertise Jobs

MP3::Napster::Channel

Perl module - Part of CPAN distribution MP3-Napster 2.04.



NAME

MP3::Napster::Channel - Object-oriented access to Napster channels

SYNOPSIS

  @channels = $nap->channels;
  foreach $chan (@channels) {
     print $chan->name,"\n";
     print $chan->topic,"\n";
     print $chan->user_count,"\n";
     print $chan->server,"\n";
     @users = $chan->users,"\n";
  }
  $chan->join && print "Welcome to $chan!\n";
  $chan->part && print "Goodbye!\n";

DESCRIPTION

MP3::Napster::Channel provides object-oriented access to discussion channels on the Napster service.

OBJECT CONSTRUCTION

Channel objects are normally not constructed from scratch but are returned by the MPEG::Napster channels() method.

OBJECT METHODS

Methods provide access to various attributes of the Channel object and allow you to join and depart the channel.

Accessors

The accessors provide read-only access to the following Channel attributes.

  Accessor                Description
  --------                -----------
  $channel->name          Channel name
  $channel->user_count    Number of users enrolled in channel
  $channel->topic         Channel's topic (welcome banner)
  $channel->server        MP3::Napster object from which channel was derived
@users = $channel->users
This method returns the current list of users subscribed to the channel. The return value is an array of MP3::Napster::User objects.
$result = $channel->join
Attempt to join the channel, and return a true result if successful.
$result = $channel->join
Attempt to join the channel, returning a true result if successful.
$result = $channel->part
Attempt to depart from the channel, returning a true result if successful.
String Overloading
If used in a string context, MPEG::Napster::Channel objects will invoke the name() method, allowing the objects to be directly interpolated into strings, printed, and pattern matched.

AUTHOR

Lincoln Stein <lstein@cshl.org>.

COPYRIGHT

Copyright (c) 2000 Cold Spring Harbor Laboratory. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

MP3::Napster, MP3::Napster::Song, MP3::Napster::User, and MPEG::Napster::Transfer



Privacy Policy | Email Opt-out | Feedback | Syndication
© 2006 ActiveState Software Inc. All rights reserved.