# Path: resources/lib/utils.py
# class LoggingComponent(object):
#     """
#     Prepends log statements with the calling class' name
#     """
#     # pylint: disable=too-few-public-methods
#     def __init__(self, nx_common):
#         self._log = nx_common.log
# 
#     def log(self, msg, level=xbmc.LOGDEBUG):
#         """
#         Log a message
#         """
#         self._log('{}: {}'.format(self.__class__.__name__, msg), level)


import os
    import cPickle as pickle
    import pickle
import xbmcvfs
from resources.lib.utils import LoggingComponent
# -*- coding: utf-8 -*-
# Author: caphm
# Module: storage
# Created on: 06.08.2018
# License: MIT https://goo.gl/5bMj3H
# pylint: disable=import-error

"""
Easily accessible persistent storage
"""

try:
except ImportError:




class PersistentStorage(LoggingComponent):
    """
    Key-Value storage with a backing file on disk.
    Reads entire dict structure into memory on first access and updates
    the backing file with each changed entry.

    IMPORTANT: Changes to mutable objects inserted into the key-value-store
    are not automatically written to disk. You need to call commit() to
    persist these changes.
    """
    def __init__(self, storage_id, nx_common):

# Path: resources/lib/utils.py
# class LoggingComponent(object):
#     """
#     Prepends log statements with the calling class' name
#     """
#     # pylint: disable=too-few-public-methods
#     def __init__(self, nx_common):
#         self._log = nx_common.log
# 
#     def log(self, msg, level=xbmc.LOGDEBUG):
#         """
#         Log a message
#         """
#         self._log('{}: {}'.format(self.__class__.__name__, msg), level)


# Path: resources/lib/storage.py
import os
    import cPickle as pickle
    import pickle
import xbmcvfs
from resources.lib.utils import LoggingComponent

# -*- coding: utf-8 -*-
# Author: caphm
# Module: storage
# Created on: 06.08.2018
# License: MIT https://goo.gl/5bMj3H
# pylint: disable=import-error

"""
Easily accessible persistent storage
"""

try:
except ImportError:




class PersistentStorage(LoggingComponent):
    """
    Key-Value storage with a backing file on disk.
    Reads entire dict structure into memory on first access and updates
    the backing file with each changed entry.

    IMPORTANT: Changes to mutable objects inserted into the key-value-store
    are not automatically written to disk. You need to call commit() to
    persist these changes.
    """
    def __init__(self, storage_id, nx_common):

        LoggingComponent.__init__(self, nx_common)