Saturday, September 01, 2007

How to restart device pragmatically


enum TSWStartupReason
{
// Normal startup reasons (100..149)

// Nothing set the (default value).
ESWNone = 100,

// Restore Factory Settings (Normal)
ESWRestoreFactorySet = 101,

// Language Switched
ESWLangSwitch = 102,

// Warranty transfer
ESWWarrantyTransfer = 103,

// Possibly needed for handling power off & charger connected use case.
ESWChargerConnected = 104,

// Restore Factory Settings (Deep)
ESWRestoreFactorySetDeep = 105
};

class SysStartup
{
public:
IMPORT_C static TInt ShutdownAndRestart(const class TUid& aSource, TSWStartupReason aReason);
};

Implementation

TUid uid = {0x};
SysStartup::ShutdownAndRestart( uid, ESWNone);


1 comment:

Unknown said...

Hi, i want to use the reboot code for my application, my question is which library or header must be included to use sysstartup class. I just couldn't find it at anywhere so any help will be godlike, yhanks.

stats counter