Code refactoring
- Rewrite queue management code.
Data Struture.
* struct backend_queue:
store each backend's informations(backend path, slot num, job list)
* struct backend_job:
store each job(request)'s infomations(req type, uid, pkgid, ...)
The pkgmgr-server has two hash tables which map each backend, each table
use type(tpk, wgt) and slot number as key.
And there is another table which stores informations about the job
currently processed.
The pkgmgr-server will push job to each queue, pop it at idler, and
insert the job into the backend info table(using slot num as key).
When the backend finished the job, the server will get the job info
and free it(by removing from the table).
All the memories for the request data will be allocated dynamically,
and nerver duplicated.
- Remove unused code.
- Rename enums/internal apis.
- Fix some code style.
Change-Id: Ie95b369608dc6675aeccc6a66b255b28ca200059
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>