#ifndef _BLESS_PRIVATE_H_
#define _BLESS_PRIVATE_H_
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/cdefs.h>
#include <TargetConditionals.h>
#include <AvailabilityMacros.h>
#include "bless.h"
#define kBootBlocksSize 1024
#define kBootBlockTradOSSig 0x4c4b
#ifndef BLESS_EMBEDDED
#if defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED
#define BLESS_EMBEDDED 1
#else
#define BLESS_EMBEDDED 0
#endif
#endif
#if BLESS_EMBEDDED
#define USE_DISKARBITRATION 0
#define USE_CORETEXT 0
#define USE_COREGRAPHICS 0
#define USE_MEDIAKIT 0
#define SUPPORT_RAID 0
#define SUPPORT_APPLE_PARTITION_MAP 0
#define SUPPORT_CSM_LEGACY_BOOT 0
#else
#define USE_DISKARBITRATION 1
#if defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
#define USE_CORETEXT 1
#else
#define USE_CORETEXT 0
#endif
#define USE_COREGRAPHICS 1
#define USE_MEDIAKIT 1
#define SUPPORT_RAID 1
#define SUPPORT_APPLE_PARTITION_MAP 1
#define SUPPORT_CSM_LEGACY_BOOT 1
#endif
#if DISABLE_DISK_ARBITRATION
#undef USE_DISKARBITRATION
#define USE_DISKARBITRATION 0
#endif
int setefidevice(BLContextPtr context, const char * bsdname, int bootNext,
int bootLegacy, const char *legacyHint,
const char *optionalData, bool shortForm);
int setefifilepath(BLContextPtr context, const char * path, int bootNext,
const char *optionalData, bool shortForm);
int setefinetworkpath(BLContextPtr context, CFStringRef booterXML,
CFStringRef kernelXML, CFStringRef mkextXML,
CFStringRef kernelcacheXML, int bootNext);
int efinvramcleanup(BLContextPtr context);
int setit(BLContextPtr context, mach_port_t masterPort, const char *bootvar,
CFStringRef xmlstring);
int _forwardNVRAM(BLContextPtr context, CFStringRef from, CFStringRef to);
uint32_t BLBlockChecksum(const void *buf , uint32_t length);
int BLCopyFileFromCFData(BLContextPtr context, const CFDataRef data,
const char * dest, int shouldPreallocate);
char *BLGetCStringDescription(CFTypeRef typeRef);
int contextprintf(BLContextPtr context, int loglevel, char const *fmt, ...) __printflike(3, 4);;
char * blostype2string(uint32_t type, char buf[5]);
int blsustatfs(const char *path, struct statfs *buf);
bool isDVDWithElToritoWithUEFIBootableOS (BLContextPtr inContext, const char* inDevBSD, int* outBootEntry, int* outPartitionStart, int* outPartitionSize);
#endif // _BLESS_PRIVATE_H_