JobWidgetInstall refactoring - TaskConfiguration
authorTomasz Iwanek <t.iwanek@samsung.com>
Tue, 27 Aug 2013 09:24:00 +0000 (11:24 +0200)
committerSoo-Hyun Choi <sh9.choi@samsung.com>
Tue, 3 Sep 2013 09:24:24 +0000 (18:24 +0900)
commit24590c9410abc652cc77bdb24f7e58b1a4687719
treee7a15bed3a5ca32c9bfd9040a65e50f3556d5e60
parent73933b71c73f249db46154732687db081aa6e7e8
JobWidgetInstall refactoring - TaskConfiguration

[Issue#]   LINUXWRT-820
[Feature]  Refactoring
[Cause]    There is too much logic in JobWidgetInstall
[Solution] This commit just moves code of JobWIdgetInstall to TaskConfiguration.

ALL OTHER CHANGES ARE MARKED as TODO (job_install_refactoring) and will be done later.
Following changes to be do in next:
- make proper steps in TaskConfiguration,
- clean getInstallerSTruct in TaskConfiguration,
- remove second parsing of config.xml,
- refactor TaskUnzip leftovers,
- fix TODOs in JobWidgetInstall context,
- header clean up in TaskConfiguration, JobWidgetInstall,
- (maybe) functions appendTaskList* shoule be refactored to seperate abstraction,

Jobs now uses MutableTaskList and tasks can be appended in running state.
There is no change in code because most of code uses installer context anyway.
Two additional fields were temporary supplied to installer context:
needEncryption and configureResult (those was internal variables in JobWidgetInstall).
Failure task was moved to seperate file.

[Verification] There was finally changed only few branches of code.
Do following steps (this tests two extracted to install context variables):
1. run wrt-installer -p - plugins should be installed.
2. Get widegt with some files (prefer with dozens of file e.g. use some game)
- install this widget and run it - success,
- run wrt-installer -i again and run widget - success,
- uninstall widget and isntall it again - widget should be runnign properly,
3. Get wigdet with encryption set (repeat steps from point 2.).
4. Get malformed zip file.
 - try to install and observe failure message:
     ## wrt-installer :  installation has failed - invalid widget package

[SCMRequest] This change requires: https://review.tizendev.org/gerrit/87851

Change-Id: Ib0abe152a1e524310692e213255a34c19cfb14e3
src/CMakeLists.txt
src/jobs/job.h
src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_install/job_widget_install.h
src/jobs/widget_install/task_configuration.cpp [new file with mode: 0644]
src/jobs/widget_install/task_configuration.h [new file with mode: 0644]
src/jobs/widget_install/task_installer_fail.cpp [new file with mode: 0644]
src/jobs/widget_install/task_installer_fail.h [new file with mode: 0644]
src/jobs/widget_install/widget_install_context.h