aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/BridgeManager.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-06-01 06:42:21 +1000
committerBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-06-01 07:06:09 +1000
commit1ef6e97b9089042316b49bb6c01668b531e2eae5 (patch)
treef36ea3f02ee5fbb2eec9f56beb1384125cee2e6b /heimdall/source/BridgeManager.cpp
parent47faaf001de6342b7839f1108034ab65d35f1faf (diff)
downloadexternal_heimdall-1ef6e97b9089042316b49bb6c01668b531e2eae5.zip
external_heimdall-1ef6e97b9089042316b49bb6c01668b531e2eae5.tar.gz
external_heimdall-1ef6e97b9089042316b49bb6c01668b531e2eae5.tar.bz2
1.2.0b Heimdall command line update. Large update that adds lots of PIT file functionality and better support for more devices.
Diffstat (limited to 'heimdall/source/BridgeManager.cpp')
-rw-r--r--heimdall/source/BridgeManager.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/heimdall/source/BridgeManager.cpp b/heimdall/source/BridgeManager.cpp
index 0b94dfb..caa3978 100644
--- a/heimdall/source/BridgeManager.cpp
+++ b/heimdall/source/BridgeManager.cpp
@@ -32,6 +32,7 @@
#include "DumpResponse.h"
#include "EndModemFileTransferPacket.h"
#include "EndPhoneFileTransferPacket.h"
+#include "EndSessionPacket.h"
#include "FileTransferPacket.h"
#include "FlashPartFileTransferPacket.h"
#include "FlashPartPitFilePacket.h"
@@ -41,7 +42,6 @@
#include "PitFilePacket.h"
#include "PitFileResponse.h"
#include "ReceiveFilePartPacket.h"
-#include "RebootDevicePacket.h"
#include "ResponsePacket.h"
#include "SendFilePartPacket.h"
#include "SendFilePartResponse.h"
@@ -54,10 +54,9 @@
using namespace Heimdall;
const DeviceIdentifier BridgeManager::supportedDevices[BridgeManager::kSupportedDeviceCount] = {
- DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxySDownloadMode)/*,
- DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxySInternational),
- DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxySNewInternational),
- DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidVibrantCanadaBell)*/
+ DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxyS),
+ DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidGalaxyS2),
+ DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidDroidCharge)
};
enum
@@ -428,9 +427,9 @@ bool BridgeManager::EndSession(void) const
{
InterfaceManager::Print("Ending session...\n");
- RebootDevicePacket *rebootDevicePacket = new RebootDevicePacket(RebootDevicePacket::kRequestEndSession);
- bool success = SendPacket(rebootDevicePacket);
- delete rebootDevicePacket;
+ EndSessionPacket *endSessionPacket = new EndSessionPacket(EndSessionPacket::kRequestEndSession);
+ bool success = SendPacket(endSessionPacket);
+ delete endSessionPacket;
if (!success)
{
@@ -438,9 +437,9 @@ bool BridgeManager::EndSession(void) const
return (false);
}
- ResponsePacket *rebootDeviceResponse = new ResponsePacket(ResponsePacket::kResponseTypeRebootDevice);
- success = ReceivePacket(rebootDeviceResponse);
- delete rebootDeviceResponse;
+ ResponsePacket *endSessionResponse = new ResponsePacket(ResponsePacket::kResponseTypeEndSession);
+ success = ReceivePacket(endSessionResponse);
+ delete endSessionResponse;
if (!success)
{
@@ -539,7 +538,7 @@ bool BridgeManager::ReceivePacket(InboundPacket *packet, int timeout) const
}
if (verbose)
- InterfaceManager::PrintError("\n");
+ InterfaceManager::PrintError("\n");
}
if (communicationDelay != 0)
@@ -1062,17 +1061,17 @@ bool BridgeManager::RebootDevice(void) const
{
InterfaceManager::Print("Rebooting device...\n");
- RebootDevicePacket *rebootDevicePacket = new RebootDevicePacket(RebootDevicePacket::kRequestRebootDevice);
+ EndSessionPacket *rebootDevicePacket = new EndSessionPacket(EndSessionPacket::kRequestRebootDevice);
bool success = SendPacket(rebootDevicePacket);
delete rebootDevicePacket;
if (!success)
{
- InterfaceManager::PrintError("Failed to send end session packet!\n");
+ InterfaceManager::PrintError("Failed to send reboot device packet!\n");
return (false);
}
- ResponsePacket *rebootDeviceResponse = new ResponsePacket(ResponsePacket::kResponseTypeRebootDevice);
+ ResponsePacket *rebootDeviceResponse = new ResponsePacket(ResponsePacket::kResponseTypeEndSession);
success = ReceivePacket(rebootDeviceResponse);
delete rebootDeviceResponse;