#ident "$Id: decomp_common.h,v 1.3 2007/02/21 22:27:02 craig Exp $"
/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef DECOMP_COMMON_H
#define DECOMP_COMMON_H

#include <sys/types.h>

#include "es_int.h"
#include "types.h"
#include "DF_structs.h"

ESTitleMeta *readTmdFromPartition(FILE *inFile,
                                  const partition_t* const partition,
                                  const off_t partitionAddr,
                                  const s64 diskOffsetToFile);
void * readCertBlobFromPartition (FILE *inFile,
                                  const partition_t* const partition,
                                  const off_t partitionAddr,
                                  const s64 diskOffsetToFile);
bool readPartitionLengths(FILE *inFile,
                          const char* const inFileName,
                          const u32 numPartitions,
                          const DF_PartitionInfo* const partitionInfoArray,
                          const s64 diskOffsetToFile,
                          off_t *partitionLengths);

bool fileSize(const char* const fileName, off_t *fileSize);

extern const char* partitionTypeToString[];
extern const int   NumPartitionTypes;
#endif
