# Path: module/plugins/internal/misc.py
# def decode(value, encoding=None, errors='strict'):
#     """
#     Encoded string (default to own system encoding) -> unicode string
#     """
#     if isinstance(value, str):
#         res = unicode(
#             value, encoding or get_console_encoding(
#                 sys.stdout.encoding), errors)
# 
#     elif isinstance(value, unicode):
#         res = value
# 
#     else:
#         res = unicode(value)
# 
#     # Hotfix UnicodeDecodeError
#     try:
#         str(res)
#     except UnicodeEncodeError:
#         return normalize(res)
# 
#     return res
# 
# def encode(value, encoding='utf-8', errors='backslashreplace'):
#     """
#     Unicode string -> encoded string (default to UTF-8)
#     """
#     if isinstance(value, unicode):
#         res = value.encode(encoding, errors)
# 
#     elif isinstance(value, str):
#         decoding = get_console_encoding(sys.stdin.encoding)
#         if encoding == decoding:
#             res = value
#         else:
#             res = transcode(value, decoding, encoding)
# 
#     else:
#         res = str(value)
# 
#     return res


import re
import xml.dom.minidom
import Crypto.Cipher.AES
from ..internal.Container import Container
from ..internal.misc import decode, encode
# -*- coding: utf-8 -*-

from __future__ import with_statement





class DLC(Container):
    __name__ = "DLC"
    __type__ = "container"
    __version__ = "0.31"
    __status__ = "testing"

    __pattern__ = r'(.+\.dlc|[\w\+^_]+==[\w\+^_/]+==)$'

# Path: module/plugins/internal/misc.py
# def decode(value, encoding=None, errors='strict'):
#     """
#     Encoded string (default to own system encoding) -> unicode string
#     """
#     if isinstance(value, str):
#         res = unicode(
#             value, encoding or get_console_encoding(
#                 sys.stdout.encoding), errors)
# 
#     elif isinstance(value, unicode):
#         res = value
# 
#     else:
#         res = unicode(value)
# 
#     # Hotfix UnicodeDecodeError
#     try:
#         str(res)
#     except UnicodeEncodeError:
#         return normalize(res)
# 
#     return res
# 
# def encode(value, encoding='utf-8', errors='backslashreplace'):
#     """
#     Unicode string -> encoded string (default to UTF-8)
#     """
#     if isinstance(value, unicode):
#         res = value.encode(encoding, errors)
# 
#     elif isinstance(value, str):
#         decoding = get_console_encoding(sys.stdin.encoding)
#         if encoding == decoding:
#             res = value
#         else:
#             res = transcode(value, decoding, encoding)
# 
#     else:
#         res = str(value)
# 
#     return res


# Path: module/plugins/container/DLC.py
import re
import xml.dom.minidom
import Crypto.Cipher.AES
from ..internal.Container import Container
from ..internal.misc import decode, encode

# -*- coding: utf-8 -*-

from __future__ import with_statement





class DLC(Container):
    __name__ = "DLC"
    __type__ = "container"
    __version__ = "0.31"
    __status__ = "testing"

    __pattern__ = r'(.+\.dlc|[\w\+^_]+==[\w\+^_/]+==)$'

    __config__ = [("activated", "bool", "Activated", True),