# Path: dtformats/jump_list.py
# class LNKFileEntry(object):
# class AutomaticDestinationsFile(data_format.BinaryDataFile):
# class CustomDestinationsFile(data_format.BinaryDataFile):
#   def __init__(self, identifier):
#   def Close(self):
#   def GetShellItems(self):
#   def Open(self, file_object):
#   def __init__(self, debug=False, output_writer=None):
#   def _FormatIntegerAsPathSize(self, integer):
#   def _ReadDestList(self, olecf_file):
#   def _ReadDestListEntry(self, olecf_item, stream_offset):
#   def _ReadDestListHeader(self, olecf_item):
#   def _ReadLNKFile(self, olecf_item):
#   def _ReadLNKFiles(self, olecf_file):
#   def ReadFileObject(self, file_object):
#   def __init__(self, debug=False, output_writer=None):
#   def _ReadFileFooter(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadLNKFile(self, file_object):
#   def _ReadLNKFiles(self, file_object):
#   def ReadFileObject(self, file_object):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('jump_list.yaml')
#   _DEBUG_INFO_DEST_LIST_ENTRY = [
#       ('unknown1', 'Unknown1', '_FormatIntegerAsHexadecimal8'),
#       ('droid_volume_identifier', 'Droid volume identifier',
#        '_FormatUUIDAsString'),
#       ('droid_file_identifier', 'Droid file identifier', '_FormatUUIDAsString'),
#       ('birth_droid_volume_identifier', 'Birth droid volume identifier',
#        '_FormatUUIDAsString'),
#       ('birth_droid_file_identifier', 'Birth droid file identifier',
#        '_FormatUUIDAsString'),
#       ('hostname', 'Hostname', '_FormatString'),
#       ('entry_number', 'Entry number', '_FormatIntegerAsDecimal'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('unknown3', 'Unknown3', '_FormatFloatingPoint'),
#       ('last_modification_time', 'Last modification time',
#        '_FormatIntegerAsFiletime'),
#       ('pin_status', 'Pin status', '_FormatIntegerAsDecimal'),
#       ('unknown4', 'Unknown4', '_FormatIntegerAsDecimal'),
#       ('unknown5', 'Unknown5', '_FormatIntegerAsHexadecimal8'),
#       ('unknown6', 'Unknown6', '_FormatIntegerAsHexadecimal8'),
#       ('unknown4', 'Unknown4', '_FormatIntegerAsPathSize'),
#       ('path', 'Path', '_FormatString'),
#       ('unknown7', 'Unknown7', '_FormatIntegerAsHexadecimal8')]
#   _DEBUG_INFO_DEST_LIST_HEADER = [
#       ('format_version', 'Format version', '_FormatIntegerAsDecimal'),
#       ('number_of_entries', 'Number of entries', '_FormatIntegerAsDecimal'),
#       ('number_of_pinned_entries', 'Number of pinned entries',
#        '_FormatIntegerAsDecimal'),
#       ('unknown1', 'Unknown1', '_FormatFloatingPoint'),
#       ('last_entry_number', 'Last entry number', '_FormatIntegerAsDecimal'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('last_revision_number', 'Last revision number',
#        '_FormatIntegerAsDecimal'),
#       ('unknown3', 'Unknown3', '_FormatIntegerAsHexadecimal8')]
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('jump_list.yaml')
#   _FILE_FOOTER_SIGNATURE = 0xbabffbab
#   _LNK_GUID = (
#       b'\x01\x14\x02\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x46')
#   _DEBUG_INFO_FILE_FOOTER = [
#       ('signature', 'Signature', '_FormatIntegerAsHexadecimal8')]
#   _DEBUG_INFO_FILE_HEADER = [
#       ('unknown1', 'Unknown1', '_FormatIntegerAsHexadecimal8'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('unknown3', 'Unknown3', '_FormatIntegerAsHexadecimal8'),
#       ('header_values_type', 'Header value type', '_FormatIntegerAsDecimal')]
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


import unittest
import pyolecf
from dtformats import jump_list
from tests import test_lib

    with open(test_file_path, 'rb') as file_object:
      olecf_file = pyolecf.file()
      olecf_file.open_file_object(file_object)

      try:
        test_file._ReadDestList(olecf_file)

      finally:
        olecf_file.close()

  # TODO: add tests for _ReadDestListEntry.
  # TODO: add tests for _ReadDestListHeader.
  # TODO: add tests for _ReadLNKFile.
  # TODO: add tests for _ReadLNKFiles.

  def testReadFileObjectOnV1File(self):
    """Tests the ReadFileObject function on a format version 1 file."""
    output_writer = test_lib.TestOutputWriter()
    test_file = jump_list.AutomaticDestinationsFile(output_writer=output_writer)

    test_file_path = self._GetTestFilePath([
        '1b4dd67f29cb1962.automaticDestinations-ms'])
    self._SkipIfPathNotExists(test_file_path)

    test_file.Open(test_file_path)

  def testReadFileObjectOnV3File(self):
    """Tests the ReadFileObject function on a format version 3 file."""
    output_writer = test_lib.TestOutputWriter()

# Path: dtformats/jump_list.py
# class LNKFileEntry(object):
# class AutomaticDestinationsFile(data_format.BinaryDataFile):
# class CustomDestinationsFile(data_format.BinaryDataFile):
#   def __init__(self, identifier):
#   def Close(self):
#   def GetShellItems(self):
#   def Open(self, file_object):
#   def __init__(self, debug=False, output_writer=None):
#   def _FormatIntegerAsPathSize(self, integer):
#   def _ReadDestList(self, olecf_file):
#   def _ReadDestListEntry(self, olecf_item, stream_offset):
#   def _ReadDestListHeader(self, olecf_item):
#   def _ReadLNKFile(self, olecf_item):
#   def _ReadLNKFiles(self, olecf_file):
#   def ReadFileObject(self, file_object):
#   def __init__(self, debug=False, output_writer=None):
#   def _ReadFileFooter(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadLNKFile(self, file_object):
#   def _ReadLNKFiles(self, file_object):
#   def ReadFileObject(self, file_object):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('jump_list.yaml')
#   _DEBUG_INFO_DEST_LIST_ENTRY = [
#       ('unknown1', 'Unknown1', '_FormatIntegerAsHexadecimal8'),
#       ('droid_volume_identifier', 'Droid volume identifier',
#        '_FormatUUIDAsString'),
#       ('droid_file_identifier', 'Droid file identifier', '_FormatUUIDAsString'),
#       ('birth_droid_volume_identifier', 'Birth droid volume identifier',
#        '_FormatUUIDAsString'),
#       ('birth_droid_file_identifier', 'Birth droid file identifier',
#        '_FormatUUIDAsString'),
#       ('hostname', 'Hostname', '_FormatString'),
#       ('entry_number', 'Entry number', '_FormatIntegerAsDecimal'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('unknown3', 'Unknown3', '_FormatFloatingPoint'),
#       ('last_modification_time', 'Last modification time',
#        '_FormatIntegerAsFiletime'),
#       ('pin_status', 'Pin status', '_FormatIntegerAsDecimal'),
#       ('unknown4', 'Unknown4', '_FormatIntegerAsDecimal'),
#       ('unknown5', 'Unknown5', '_FormatIntegerAsHexadecimal8'),
#       ('unknown6', 'Unknown6', '_FormatIntegerAsHexadecimal8'),
#       ('unknown4', 'Unknown4', '_FormatIntegerAsPathSize'),
#       ('path', 'Path', '_FormatString'),
#       ('unknown7', 'Unknown7', '_FormatIntegerAsHexadecimal8')]
#   _DEBUG_INFO_DEST_LIST_HEADER = [
#       ('format_version', 'Format version', '_FormatIntegerAsDecimal'),
#       ('number_of_entries', 'Number of entries', '_FormatIntegerAsDecimal'),
#       ('number_of_pinned_entries', 'Number of pinned entries',
#        '_FormatIntegerAsDecimal'),
#       ('unknown1', 'Unknown1', '_FormatFloatingPoint'),
#       ('last_entry_number', 'Last entry number', '_FormatIntegerAsDecimal'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('last_revision_number', 'Last revision number',
#        '_FormatIntegerAsDecimal'),
#       ('unknown3', 'Unknown3', '_FormatIntegerAsHexadecimal8')]
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('jump_list.yaml')
#   _FILE_FOOTER_SIGNATURE = 0xbabffbab
#   _LNK_GUID = (
#       b'\x01\x14\x02\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x46')
#   _DEBUG_INFO_FILE_FOOTER = [
#       ('signature', 'Signature', '_FormatIntegerAsHexadecimal8')]
#   _DEBUG_INFO_FILE_HEADER = [
#       ('unknown1', 'Unknown1', '_FormatIntegerAsHexadecimal8'),
#       ('unknown2', 'Unknown2', '_FormatIntegerAsHexadecimal8'),
#       ('unknown3', 'Unknown3', '_FormatIntegerAsHexadecimal8'),
#       ('header_values_type', 'Header value type', '_FormatIntegerAsDecimal')]
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


# Path: tests/jump_list.py
import unittest
import pyolecf
from dtformats import jump_list
from tests import test_lib


    with open(test_file_path, 'rb') as file_object:
      olecf_file = pyolecf.file()
      olecf_file.open_file_object(file_object)

      try:
        test_file._ReadDestList(olecf_file)

      finally:
        olecf_file.close()

  # TODO: add tests for _ReadDestListEntry.
  # TODO: add tests for _ReadDestListHeader.
  # TODO: add tests for _ReadLNKFile.
  # TODO: add tests for _ReadLNKFiles.

  def testReadFileObjectOnV1File(self):
    """Tests the ReadFileObject function on a format version 1 file."""
    output_writer = test_lib.TestOutputWriter()
    test_file = jump_list.AutomaticDestinationsFile(output_writer=output_writer)

    test_file_path = self._GetTestFilePath([
        '1b4dd67f29cb1962.automaticDestinations-ms'])
    self._SkipIfPathNotExists(test_file_path)

    test_file.Open(test_file_path)

  def testReadFileObjectOnV3File(self):
    """Tests the ReadFileObject function on a format version 3 file."""
    output_writer = test_lib.TestOutputWriter()

    test_file = jump_list.AutomaticDestinationsFile(output_writer=output_writer)