Update of /cvsroot/freevo/freevo/WIP/Ruelle
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3865

Added Files:
        powershutdown.py 
Log Message:
adding in powershutdown for its "fans"


--- NEW FILE: powershutdown.py ---
#if 0 /*
# -----------------------------------------------------------------------
# powershutdown.py - 
# -----------------------------------------------------------------------
# $Id: powershutdown.py,v 1.1 2004/06/27 00:36:45 mikeruelle Exp $
#
# Notes:
# Todo:        
#
# -----------------------------------------------------------------------
# $Log: powershutdown.py,v $
# Revision 1.1  2004/06/27 00:36:45  mikeruelle
# adding in powershutdown for its "fans"
#
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ----------------------------------------------------------------------- */
#endif

import config
import plugin
import event as em
import shutdown
 
TRUE = 1
FALSE = 0
 
# Set to 1 for debug output
#DEBUG = config.DEBUG
DEBUG = TRUE

class PluginInterface(plugin.DaemonPlugin):
    """
    shut freevo down when you see the power button
    """
    def __init__(self):
        plugin.DaemonPlugin.__init__(self)
        self.plugin_name = "POWERSHUTDOWN"
        self.event_listener = TRUE
        self.poll_menu_only = TRUE
        self.poll_interval = 0
 
    def eventhandler(self, event = None, menuw=None, arg=None):
        """
        eventhandler to handle the events. Always return false since we
        are just a listener and really can"t send back true.
        """
        _debug_("Saver saw %s" % event.name)
 
        if event == em.BUTTON and event.arg == "POWER":
            _debug_("Shutting Down")
            shutdown.shutdown(menuw=menuw, argshutdown=config.ENABLE_SHUTDOWN_SYS, 
argrestart=FALSE)
 
        return FALSE



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to