diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2013-03-07 14:00:52 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2013-03-07 14:12:27 +0100 |
commit | ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 (patch) | |
tree | 2267ec17efe5435887cb68169a56418acf7a9f05 /heimdall/source/BridgeManager.h | |
parent | Previous libusbx fix was a red herring of sorts. Inadvertedly it did fix the (diff) | |
download | Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.gz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.bz2 Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.lz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.xz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.zst Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.zip |
Diffstat (limited to '')
-rw-r--r-- | heimdall/source/BridgeManager.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/heimdall/source/BridgeManager.h b/heimdall/source/BridgeManager.h index 2978340..4402710 100644 --- a/heimdall/source/BridgeManager.h +++ b/heimdall/source/BridgeManager.h @@ -21,6 +21,9 @@ #ifndef BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
+// libpit
+#include "libpit.h"
+
// Heimdall
#include "Heimdall.h"
@@ -81,6 +84,17 @@ namespace Heimdall kPidGalaxyCamera = 0x6860 // Is this necessary?
};
+ enum class UsbLogLevel
+ {
+ None = 0,
+ Error,
+ Warning,
+ Info,
+ Debug,
+
+ Default = Error
+ };
+
private:
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
@@ -109,13 +123,14 @@ namespace Heimdall unsigned int fileTransferPacketSize;
unsigned int fileTransferSequenceTimeout;
+ UsbLogLevel usbLogLevel;
+
int FindDeviceInterface(void);
bool ClaimDeviceInterface(void);
bool SetupDeviceInterface(void);
void ReleaseDeviceInterface(void);
- bool CheckProtocol(void) const;
- bool InitialiseProtocol(void) const;
+ bool InitialiseProtocol(void);
public:
@@ -123,7 +138,7 @@ namespace Heimdall ~BridgeManager();
bool DetectDevice(void);
- int Initialise(void);
+ int Initialise(bool resume);
bool BeginSession(void);
bool EndSession(bool reboot) const;
@@ -133,12 +148,18 @@ namespace Heimdall bool RequestDeviceType(unsigned int request, int *result) const;
- bool SendPitFile(FILE *file) const;
+ bool SendPitData(const libpit::PitData *pitData) const;
int ReceivePitFile(unsigned char **pitBuffer) const;
int DownloadPitFile(unsigned char **pitBuffer) const; // Thin wrapper around ReceivePitFile() with additional logging.
bool SendFile(FILE *file, unsigned int destination, unsigned int deviceType, unsigned int fileIdentifier = 0xFFFFFFFF) const;
- bool ReceiveDump(unsigned int chipType, unsigned int chipId, FILE *file) const;
+
+ void SetUsbLogLevel(UsbLogLevel usbLogLevel);
+
+ UsbLogLevel GetUsbLogLevel(void) const
+ {
+ return usbLogLevel;
+ }
bool IsVerbose(void) const
{
|