#ident "$Id: partition_common.h,v 1.7 2006/06/30 04:08:31 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 _PARTITION_COMMON_H_
#define _PARTITION_COMMON_H_

#include "types.h"
#include "estypes.h"            // From NC/GBA tree
#include "es_int.h"             // From NC/GBA tree
#include "iosccert.h"           // From NC/GBA tree

bool generateEticket(const char* const binRoot,
                     const char* const encryptedTitleKeyFile, 
                     const u64 titleID,
                     const bool production,
                     const bool verbose,
                     char *ticketName);
bool readCertBlob(const char* const pkiRoot, u8 **certArray, u32 *certBlobSize,
                  const bool production, const bool verbose);
bool readFileIntoArray(const char* const fileName, u8 **array, u32 *size);
bool fileExists(const char* const fileName);
bool fileSize(const char* const fileName, off_t *fileSize);
bool copyFileToOutFile(FILE *outFile, const char* const inFileName);
void processOptions(int argc, char* argv[], char **contentName,
               char **outputName, u32 *titleId, char **IOSversion,
               char **groupID, bool *keep, u64 *accessBits);
void getRoot(char **binRoot, char** pkiRoot);
#endif
