Implemented factory reset

This commit is contained in:
Zaid Abdulla committed 2013-03-27 10:43:12 +03:00
1 parent 94affab377
commit 850f0241e5
2 files changed
+26

No files matched your search

+12
View File
@@ -128,6 +128,18 @@ this.reboot = (task, methodResponse, callback) ->
callback(null, STATUS_FINISHED)
this.factoryReset = (task, methodResponse, callback) ->
if methodResponse.faultcode?
task.fault = methodResponse
callback(null, STATUS_FAULT)
return
if methodResponse.type isnt 'FactoryResetResponse'
callback(null, STATUS_STARTED, {methodRequest : {type : 'FactoryReset'}})
else
callback(null, STATUS_FINISHED)
this.download = (task, methodResponse, callback) ->
if methodResponse.faultcode?
task.fault = methodResponse