Net::UPnP::AV::Item man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Net::UPnP::AV::Item(3)User Contributed Perl DocumentatioNet::UPnP::AV::Item(3)

NAME
       Net::UPnP::AV::Item - Perl extension for UPnP.

SYNOPSIS
	   use Net::UPnP::ControlPoint;
	   use Net::UPnP::AV::MediaServer;

	   my $obj = Net::UPnP::ControlPoint->new();

	   @dev_list = $obj->search(st =>'upnp:rootdevice', mx => 3);

	   $devNum= 0;
	   foreach $dev (@dev_list) {
	       $device_type = $dev->getdevicetype();
	       if  ($device_type ne 'urn:schemas-upnp-org:device:MediaServer:1') {
		   next;
	       }
	       print "[$devNum] : " . $dev->getfriendlyname() . "\n";
	       unless ($dev->getservicebyname('urn:schemas-upnp-org:service:ContentDirectory:1')) {
		   next;
	       }
	       $mediaServer = Net::UPnP::AV::MediaServer->new();
	       $mediaServer->setdevice($dev);
	       @content_list = $mediaServer->getcontentlist(ObjectID => 0);
	       foreach $content (@content_list) {
		   print_content($mediaServer, $content, 1);
	       }
	       $devNum++;
	   }

	   sub print_content {
	       my ($mediaServer, $content, $indent) = @_;
	       my $id = $content->getid();
	       my $title = $content->gettitle();
	       for ($n=0; $n<$indent; $n++) {
		   print "\t";
	       }
	       print "$id = $title";
	       if ($content->isitem()) {
		   print " (" . $content->geturl();
		   if (length($content->getdate())) {
		       print " - " . $content->getdate();
		   }
		   print " - " . $content->getcontenttype() . ")";
	       }
	       print "\n";
	       unless ($content->iscontainer()) {
		   return;
	       }
	       @child_content_list = $mediaServer->getcontentlist(ObjectID => $id );
	       if (@child_content_list <= 0) {
		   return;
	       }
	       $indent++;
	       foreach my $child_content (@child_content_list) {
		   print_content($mediaServer, $child_content, $indent);
	       }
	   }

DESCRIPTION
       The package is a extention UPnP/AV media server, and a sub class of
       Net::UPnP::AV::Content.

METHODS
       isitem - Check if the content is a item.
	       $isItem = $item->isisitem();

	   Check if the content is a item.

       getid - Get the content ID.
	       $id = $item->getid();

	   Get the content ID.

       gettitle - Get the content title.
	       $title = $item->gettitle();

	   Get the content title.

       getdate - Get the content date.
	       $date = $item->getdate();

	   Get the content date.

       geturl - get the content URL
	       $url = $item->getcontenttype();

	   Get the content URL.

       getcontenttype - get the content type
	       $content_type = $item->getcontenttype();

	   Get the content type.

SEE ALSO
       Net::UPnP::AV::Content

       Net::UPnP::AV::Container

AUTHOR
       Satoshi Konno skonno@cybergarage.org

       CyberGarage http://www.cybergarage.org

COPYRIGHT AND LICENSE
       Copyright (C) 2005 by Satoshi Konno

       It may be used, redistributed, and/or modified under the terms of BSD
       License.

perl v5.14.0			  2009-07-27		Net::UPnP::AV::Item(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net