Difference between revisions of "Projects/KNS2/Handler"

< Projects‎ | KNS2
Jump to: navigation, search
m (Projects/KNS2/Bundler moved to Projects/KNS2/Handler: much more appropriate name)
(The Bundler)
Line 1: Line 1:
 
{{warning|Names are just temporary. Infos can be as well. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.}}
 
{{warning|Names are just temporary. Infos can be as well. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.}}
  
= The Bundler =
+
= The Handler =
 
This class is meant to provide a non-GUI and class to manage KNS packages. It's meant to be used from application themselves.
 
This class is meant to provide a non-GUI and class to manage KNS packages. It's meant to be used from application themselves.
  

Revision as of 21:28, 14 March 2007

noframe
 
Warning
Names are just temporary. Infos can be as well. Please don't trust this page as probably most of the things are going to heavily change during this 1 month developement marathone.


The Handler

This class is meant to provide a non-GUI and class to manage KNS packages. It's meant to be used from application themselves.

It will be able to:

  • Unpack packages
  • Map package files to standard QFiles
  • more...

Proposed API

  • Bundler(QString/QFile filename) Creates a bundler that operates on the given package. Note that the package needs to be unpacked somewhere first, so operating on a dir is much faster
  • Bundler(KUrl dir) Creates a bundler that operates on the given directory.
  • extractTo(KUrl baseDir) Extracts (installs) the package into the given baseDir. It's not the directory where the package itself will be extracted, but the one called 'newstuff/' here.
  • KPluginInfo metadata() Returns a pluginInfo object. You can retrive most of the metadata from it.
  • QFile mapFile(QString filename)
  • bool initLayout(QString dir = "newstuff") Initializes the layout. It should be called only once, when app configuration files are created. It will use KStandardDirs::saveLocation() to create dirs. See the layout section for more informations.
  • ...

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal