Hi all,

As reminder, the goal of this package  is to provide a set of function to
implement easily a installer for every type of applications on Tizen.( i.e
wgt/xpk and native app tpk).

The git repository for this new package is stored here :
platform/appfw/app_installers


As decided with Samsung Team led by Pawel Sitorsky, the C++ language will
be preferred to C language.
As the package should be aligned with the global architecture of Tizen, (
https://wiki.tizen.org/w/images/2/2c/Architecture_Overview_.jpg)  CAPI
should be used to access to a platform service. So we need to wrap them
because CAPI are mainly written in C.



The proposal is described here :
https://wiki.tizen.org/wiki/Applications_Installer#Implementation_concept

The idea is to be able to initialize easily an app_installer by declare a
list of step as below :


for widget as example
int
main (int argc, char **argv)
{
  int result;
  AppInstaller Installer = new AppInstaller();
  /* get request data */
  pi = pkgmgr_installer_new ();
  if (!pi)
    return ENOMEM;
  result = pkgmgr_installer_receive_request (pi, argc, argv);
  if (result)
    {
      pkgmgr_installer_free (pi);
      return -result;
    }

  /* treat the request */
  switch (pkgmgr_installer_get_request_type (pi))
    {
    case PKGMGR_REQ_INSTALL:
        Installer->AddStep(step_unpack);
        Installer->AddStep(step_check_signature);
        Installer->AddStep(step_check_wgt);
        Installer->AddStep(step_manifest_wgt);
        Installer->AddStep(&step_register_app);
        Installer->Run();
      break;

    case PKGMGR_REQ_UNINSTALL:
    .............


    default:
      /* unsupported operation */
      result = EINVAL;
      break;
    }
  pkgmgr_installer_free (pi);
  return result;
}


Any point fo view are welcomed on this architecture.

Thanks in advance
BR

Baptiste
-- 
Baptiste DURAND
Eurogiciel Vannes/FR
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to