Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv8942

Added Files:
        freevo-rendezvous.py 
Log Message:
?



--- NEW FILE: freevo-rendezvous.py ---
import socket
import Rendezvous
import time
import plugin
from freevo.version import __version__
import config

class PluginInterface(plugin.DaemonPlugin):
    """
    Rendezvous Broadcaster Plugin
    See: http://www.porchdogsoft.com/products/howl/ (Win32 Plugin/Linux/FreeBSD)

    This plugin has been tested with 
       * Safari on Mac OS X Panther
       * IE6 + Howl on Windows XP

    To enable this plugin, add 
        plugin.activate('freevo-rendezvous')
    to your local_conf.py
    """

    r = RendezVous.Rendezvous()

    def __init__(self):
        plugin.DaemonPlugin.__init__(self)
        desc = {'version':__version__}
        myip = self.my_ipaddr('localhost')
        info = Rendezvous.ServiceInfo("_http._tcp.local.", "Freevo 
Web._http._tcp.local.", address=socket.inet_aton(myip), 
            port=config.WWW_PORT, weight=0, priority=0, properties=desc, 
server=socket.gethostname)
        r.registerService(info)

    def my_ipaddr(self,interface_hostname=None):
        # give the hostname of the interface you want the ipaddr of
        hostname = interface_hostname or socket.gethostname()
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.bind((hostname, 0))
        ipaddr, port = s.getsockname()
        s.close()
        return ipaddr  # returns 'nnn.nnn.nnn.nnn' (StringType)

    def shutdown(self):
        r.unregisterService(info)
        r.close()









-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to