Difference between revisions of "Projects/KNS2/Handler"

< Projects‎ | KNS2
Jump to: navigation, search
(Proposed API)
Line 15: Line 15:
 
* '''Handler(QString packageName, QString packageVersion)''' Creates a bundler that operates on the given directory.
 
* '''Handler(QString packageName, QString packageVersion)''' Creates a bundler that operates on the given directory.
 
* '''install()''' Extracts (installs) the package, and puts the .desktop file in $KDEHOME/services/. See [[../Layout|here]] for more informations.
 
* '''install()''' Extracts (installs) the package, and puts the .desktop file in $KDEHOME/services/. See [[../Layout|here]] for more informations.
''* '''QString author()''' Returns a pluginInfo object. You can retrive most of the metadata from it.''' <- check with KNS::Entry
+
* '''''QString author()''' Returns a pluginInfo object. You can retrive most of the metadata from it.''' <- check with KNS::Entry
 
* '''initLayout()''' Initializes the layout. It should be called only once. It will use KStandardDirs::saveLocation() to create needed dirs. See [[../Layout|the layout section]] for more informations.
 
* '''initLayout()''' Initializes the layout. It should be called only once. It will use KStandardDirs::saveLocation() to create needed dirs. See [[../Layout|the layout section]] for more informations.
 
* installDesktopFile() ''Obsoleted by install()?''
 
* installDesktopFile() ''Obsoleted by install()?''
 
* ...
 
* ...

Revision as of 09:39, 15 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

  • Handler(QString 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
  • Handler(KUrl dir) Creates a bundler that operates on the given directory.
  • Handler(QString packageName, QString packageVersion) Creates a bundler that operates on the given directory.
  • install() Extracts (installs) the package, and puts the .desktop file in $KDEHOME/services/. See here for more informations.
  • QString author()' Returns a pluginInfo object. You can retrive most of the metadata from it. <- check with KNS::Entry
  • initLayout() Initializes the layout. It should be called only once. It will use KStandardDirs::saveLocation() to create needed dirs. See the layout section for more informations.
  • installDesktopFile() Obsoleted by install()?
  • ...

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