# 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: dtformats/output_writers.py
# class OutputWriter(object):
# class StdoutWriter(OutputWriter):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


import argparse
import logging
import sys
import pyolecf
from dtformats import jump_list
from dtformats import output_writers

  argument_parser.add_argument(
      'source', nargs='?', action='store', metavar='PATH',
      default=None, help='path of the Windows Jump List file.')

  options = argument_parser.parse_args()

  if not options.source:
    print('Source file missing.')
    print('')
    argument_parser.print_help()
    print('')
    return False

  logging.basicConfig(
      level=logging.INFO, format='[%(levelname)s] %(message)s')

  output_writer = output_writers.StdoutWriter()

  try:
    output_writer.Open()
  except IOError as exception:
    print('Unable to open output writer with error: {0!s}'.format(exception))
    print('')
    return False

  if pyolecf.check_file_signature(options.source):
    jump_list_file = jump_list.AutomaticDestinationsFile(
        debug=options.debug, output_writer=output_writer)
  else:

# 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: dtformats/output_writers.py
# class OutputWriter(object):
# class StdoutWriter(OutputWriter):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


# Path: scripts/jump_list.py
import argparse
import logging
import sys
import pyolecf
from dtformats import jump_list
from dtformats import output_writers


  argument_parser.add_argument(
      'source', nargs='?', action='store', metavar='PATH',
      default=None, help='path of the Windows Jump List file.')

  options = argument_parser.parse_args()

  if not options.source:
    print('Source file missing.')
    print('')
    argument_parser.print_help()
    print('')
    return False

  logging.basicConfig(
      level=logging.INFO, format='[%(levelname)s] %(message)s')

  output_writer = output_writers.StdoutWriter()

  try:
    output_writer.Open()
  except IOError as exception:
    print('Unable to open output writer with error: {0!s}'.format(exception))
    print('')
    return False

  if pyolecf.check_file_signature(options.source):
    jump_list_file = jump_list.AutomaticDestinationsFile(
        debug=options.debug, output_writer=output_writer)
  else:

    jump_list_file = jump_list.CustomDestinationsFile(