aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/BridgeManager.h
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-08-14 10:01:22 -0700
committerKoushik Dutta <koushd@gmail.com>2013-08-14 10:01:22 -0700
commit49a02b8c916e8ef011d9f56901d208eca626b85b (patch)
tree1148a42ede0e6661854b8f92d4bbe52a4290d02b /heimdall/source/BridgeManager.h
parentc82df274ecea32cd6528f070a21528bf80a2f466 (diff)
parentf95619028fa5c80284e6ade2ced7772e41040424 (diff)
downloadexternal_heimdall-49a02b8c916e8ef011d9f56901d208eca626b85b.zip
external_heimdall-49a02b8c916e8ef011d9f56901d208eca626b85b.tar.gz
external_heimdall-49a02b8c916e8ef011d9f56901d208eca626b85b.tar.bz2
Merge remote-tracking branch 'bd/master' into cm-10.2
Conflicts: Linux/README OSX/README.txt heimdall-frontend/doc-pak/README heimdall/doc-pak/README Change-Id: Ib5867d7a2be030290a3896ab82fe48a7f0a97e63
Diffstat (limited to 'heimdall/source/BridgeManager.h')
-rw-r--r--heimdall/source/BridgeManager.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/heimdall/source/BridgeManager.h b/heimdall/source/BridgeManager.h
index 2978340..e67c679 100644
--- a/heimdall/source/BridgeManager.h
+++ b/heimdall/source/BridgeManager.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012 Benjamin Dobell, Glass Echidna
+/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -21,6 +21,9 @@
#ifndef BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
+// libpit
+#include "libpit.h"
+
// Heimdall
#include "Heimdall.h"
@@ -53,7 +56,7 @@ namespace Heimdall
enum
{
- kSupportedDeviceCount = 4
+ kSupportedDeviceCount = 3
};
enum
@@ -77,8 +80,18 @@ namespace Heimdall
{
kPidGalaxyS = 0x6601,
kPidGalaxyS2 = 0x685D,
- kPidDroidCharge = 0x68C3,
- kPidGalaxyCamera = 0x6860 // Is this necessary?
+ kPidDroidCharge = 0x68C3
+ };
+
+ enum class UsbLogLevel
+ {
+ None = 0,
+ Error,
+ Warning,
+ Info,
+ Debug,
+
+ Default = Error
};
private:
@@ -109,13 +122,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 +137,7 @@ namespace Heimdall
~BridgeManager();
bool DetectDevice(void);
- int Initialise(void);
+ int Initialise(bool resume);
bool BeginSession(void);
bool EndSession(bool reboot) const;
@@ -133,12 +147,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
{