<filename>src/Modules/Rules/rules.py
"""
@name:      PyHouse/src/Modules/Rules/rules.py
@author:    <NAME>
@contact:   <EMAIL>
@copyright: (c) 2015-2015 by <NAME>
@license:   MIT License
@note:      Created on Aug 27, 2015
@Summary:

"""

# Import system type stuff

# Import PyMh files and modules.
from Modules.Rules.rules_xml import Xml as rulesXML
from Modules.Computer import logging_pyh as Logger

LOG = Logger.getLogger('PyHouse.RulesXml       ')

class API (object):

    def __init__(self, p_pyhouse_obj):
        self.m_pyhouse_obj = p_pyhouse_obj

    def Start(self):
        l_count = 0
        LOG.info('{} Rules were loaded'.format(l_count))

    def Stop(self):
        pass

    def LoadXml(self, p_pyhouse_obj):
        """ Load the Mqtt xml info.
        """
        l_rules = rulesXML.read_rules_xml(self.m_pyhouse_obj)
        return l_rules

    def SaveXml(self, p_xml):
        l_xml = rulesXML.write_rules_xml(self.m_pyhouse_obj)
        p_xml.append(l_xml)
        LOG.info("Saved Rules XML.")
        return p_xml

# ## END DBK

<filename>src/Modules/Rules/rules.py
"""
@name:      PyHouse/src/Modules/Rules/rules.py
@author:    <NAME>
@contact:   <EMAIL>
@copyright: (c) 2015-2015 by <NAME>
@license:   MIT License
@note:      Created on Aug 27, 2015
@Summary:

"""

# Import system type stuff

# Import PyMh files and modules.
from Modules.Rules.rules_xml import Xml as rulesXML
from Modules.Computer import logging_pyh as Logger

LOG = Logger.getLogger('PyHouse.RulesXml       ')

class API (object):

    def __init__(self, p_pyhouse_obj):
        self.m_pyhouse_obj = p_pyhouse_obj

    def Start(self):
        l_count = 0
        LOG.info('{} Rules were loaded'.format(l_count))

    def Stop(self):
        pass

    def LoadXml(self, p_pyhouse_obj):
        """ Load the Mqtt xml info.
        """
        l_rules = rulesXML.read_rules_xml(self.m_pyhouse_obj)
        return l_rules

    def SaveXml(self, p_xml):
        l_xml = rulesXML.write_rules_xml(self.m_pyhouse_obj)
        p_xml.append(l_xml)
        LOG.info("Saved Rules XML.")
        return p_xml

# ## END DBK

@name:      PyHouse/src/Modules/Rules/rules.py
 @author:    <NAME>
 @contact:   <EMAIL>
 @copyright: (c) 2015-2015 by <NAME>
 @license:   MIT License
 @note:      Created on Aug 27, 2015
 @Summary: # Import system type stuff # Import PyMh files and modules. Load the Mqtt xml info. # ## END DBK