Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

packagelistdoclnk.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  ***************************************************************************/
00009 // (c) 2002 Patrick S. Vogt <tille@handhelds.org>
00010 #include "packagelistdoclnk.h"
00011 
00012 #include <qpe/applnk.h>
00013 #include <qpe/config.h>
00014 #include <qlist.h>
00015 
00016 #include "package.h"
00017 #include "pksettings.h"
00018 
00019 PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s, QObject *parent, const char *name)
00020         : PackageList(s)
00021 {
00022         PackageListDocLnk(parent, name);
00023 }
00024 
00025 PackageListDocLnk::PackageListDocLnk(QObject *parent, const char *name)
00026         : PackageList(parent, name)
00027 {
00028         Config cfg( "oipkg", Config::User );
00029         cfg.setGroup( "Common" );
00030         docLnkDir = cfg.readEntry( "docLnkDir", "/root/" );
00031         pvDebug(2,"opening DocLnkSet "+docLnkDir);
00032         doclnkset = new DocLnkSet(docLnkDir,"application/ipkg");
00033 }
00034 
00035 PackageListDocLnk::~PackageListDocLnk()
00036 {
00037         Config cfg( "oipkg", Config::User );
00038         cfg.setGroup( "Common" );
00039         cfg.writeEntry( "docLnkDir", docLnkDir );
00040         delete doclnkset;
00041 }
00042 
00043 
00044 
00045 void PackageListDocLnk::update()
00046 {
00047         pvDebug(2,"PackageListDocLnk::update ");        
00048         QList<DocLnk> packlist = doclnkset->children();
00049   for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() )
00050   {
00051     insertPackage( new OipkgPackage(pack->file(), settings ) );
00052   }
00053 }

Generated on Sat Nov 5 16:18:10 2005 for OPIE by  doxygen 1.4.2