# Path: deluge/component.py
# class ComponentAlreadyRegistered(Exception):
# class Component(object):
# class ComponentRegistry(object):
#     def __init__(self, name, interval=1, depend=None):
#     def _component_start_timer(self):
#     def _component_start(self):
#         def on_start(result):
#         def on_start_fail(result):
#     def _component_stop(self):
#         def on_stop(result):
#     def _component_pause(self):
#         def on_pause(result):
#     def _component_resume(self):
#         def on_resume(result):
#     def _component_shutdown(self):
#         def on_stop(result):
#     def __init__(self):
#     def register(self, obj):
#     def deregister(self, name):
#             def on_stop(result, name):
#     def start(self, names=[]):
#         def on_depends_started(result, name):
#     def stop(self, names=[]):
#     def pause(self, names=[]):
#     def resume(self, names=[]):
#     def shutdown(self):
#     def update(self):
# def get(name):


import smtplib
import deluge.configmanager
                import socket
from twisted.internet import defer, threads
from deluge import component
from deluge.event import known_events
from deluge.log import LOG as log
from deluge.plugins.pluginbase import CorePluginBase
from deluge.core.rpcserver import export
from notifications.common import CustomNotifications
#    In addition, as a special exception, the copyright holders give
#    permission to link the code of portions of this program with the OpenSSL
#    library.
#    You must obey the GNU General Public License in all respects for all of
#    the code used other than OpenSSL. If you modify file(s) with this
#    exception, you may extend this exception to your version of the file(s),
#    but you are not obligated to do so. If you do not wish to do so, delete
#    this exception statement from your version. If you delete this exception
#    statement from all source files in the program, then also delete it here.
#



DEFAULT_PREFS = {
    "smtp_enabled": False,
    "smtp_host": "",
    "smtp_port": 25,
    "smtp_user": "",
    "smtp_pass": "",
    "smtp_from": "",
    "smtp_tls": False, # SSL or TLS
    "smtp_recipients": [],
    # Subscriptions
    "subscriptions": {
        "email": []
    }
}

class CoreNotifications(CustomNotifications):


# Path: deluge/component.py
# class ComponentAlreadyRegistered(Exception):
# class Component(object):
# class ComponentRegistry(object):
#     def __init__(self, name, interval=1, depend=None):
#     def _component_start_timer(self):
#     def _component_start(self):
#         def on_start(result):
#         def on_start_fail(result):
#     def _component_stop(self):
#         def on_stop(result):
#     def _component_pause(self):
#         def on_pause(result):
#     def _component_resume(self):
#         def on_resume(result):
#     def _component_shutdown(self):
#         def on_stop(result):
#     def __init__(self):
#     def register(self, obj):
#     def deregister(self, name):
#             def on_stop(result, name):
#     def start(self, names=[]):
#         def on_depends_started(result, name):
#     def stop(self, names=[]):
#     def pause(self, names=[]):
#     def resume(self, names=[]):
#     def shutdown(self):
#     def update(self):
# def get(name):


# Path: deluge/plugins/notifications/notifications/core.py
import smtplib
import deluge.configmanager
                import socket
from twisted.internet import defer, threads
from deluge import component
from deluge.event import known_events
from deluge.log import LOG as log
from deluge.plugins.pluginbase import CorePluginBase
from deluge.core.rpcserver import export
from notifications.common import CustomNotifications

#    In addition, as a special exception, the copyright holders give
#    permission to link the code of portions of this program with the OpenSSL
#    library.
#    You must obey the GNU General Public License in all respects for all of
#    the code used other than OpenSSL. If you modify file(s) with this
#    exception, you may extend this exception to your version of the file(s),
#    but you are not obligated to do so. If you do not wish to do so, delete
#    this exception statement from your version. If you delete this exception
#    statement from all source files in the program, then also delete it here.
#



DEFAULT_PREFS = {
    "smtp_enabled": False,
    "smtp_host": "",
    "smtp_port": 25,
    "smtp_user": "",
    "smtp_pass": "",
    "smtp_from": "",
    "smtp_tls": False, # SSL or TLS
    "smtp_recipients": [],
    # Subscriptions
    "subscriptions": {
        "email": []
    }
}

class CoreNotifications(CustomNotifications):


    def enable(self):