#
# MerlinWebInterface
#
# Coded by dre (c) 2012 - 2021
# Support: board.dreamboxtools.de
# E-Mail: dre@dreamboxtools.de
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed on hardware which
# is licensed by Dream Property GmbH.
# In other words:
# It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
# to hardware which is NOT licensed by Dream Property GmbH.
# It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
# on hardware which is NOT licensed by Dream Property GmbH.
#
# If you want to use or modify the code or parts of it,
# you have to keep MY license and inform me about the modifications by mail.

from enigma import eServiceReference
from Screens.Screen import Screen
from Tools.BoundFunction import boundFunction
#from WebComponents.Sources.RequestData import RequestData
from Plugins.Extensions.WebInterface.WebScreens import WebScreen
from Plugins.Extensions.MerlinWebInterface.WebComponents.Sources.MerlinSettings import MerlinSettings
#from Plugins.Extensions.MerlinWebInterface.WebComponents.Sources.MerlinPlugins import MerlinPlugins
from Plugins.Extensions.MerlinWebInterface.WebComponents.Sources.MerlinMemoryInfo import MerlinMemoryInfo
from Plugins.Extensions.MerlinWebInterface.WebComponents.Sources.PiconMappings import PiconMappings
#from Plugins.Extensions.MerlinWebInterface.WebComponents.Sources.PreferredModes import PreferredModes

class MerlinSettingsWebScreen(WebScreen):
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		print "in MerlinSettingsWebScreen"
		self["MerlinSettings"] = MerlinSettings(session, MerlinSettings.MERLINSETTINGS)
		self["MerlinSettingsSave"] = MerlinSettings(session, MerlinSettings.MERLINSETTINGSSAVE)
		self["ChannellistSettings"] = MerlinSettings(session, MerlinSettings.CHANNELLISTSETTINGS)
		self["ChannellistSettingsSave"] = MerlinSettings(session, MerlinSettings.CHANNELLISTSETTINGSSAVE)
		self["DMMSettings"] = MerlinSettings(session, MerlinSettings.DMMSETTINGS)
		self["DMMSettingsSave"] = MerlinSettings(session, MerlinSettings.DMMSETTINGSSAVE)
		#self["AVSettings"] = MerlinSettings(session, MerlinSettings.AVSETTINGS)
		#self["AVSettingsSave"] = MerlinSettings(session, MerlinSettings.AVSETTINGSSAVE)
		#self["AVPreferredModes"] = PreferredModes(session, PreferredModes.AVPREFERREDMODES)

class PiconMapperWebScreen(WebScreen):
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		print "in PiconMapperWebScreen"
		self["PiconMappings"] = PiconMappings(session, PiconMappings.PICONMAPPINGS)

"""		
class MerlinPluginsWebScreen(WebScreen):
	def __init__(self,session, request):
		WebScreen.__init__(self, session, request)
		print "in MerlinPluginsWebScreen"
		self["MerlinPlugins"] = MerlinPlugins(session, MerlinPlugins.MENU)
"""
		
class MerlinMemoryWebScreen(WebScreen):
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		print "in MerlinMemoryWebScreen"
		self["MerlinMemoryInfo"] = MerlinMemoryInfo(session, MerlinMemoryInfo.MEMORY)

