Home · All Namespaces · All Classes · Main Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Karoliina T. Salminen <karoliina.t.salminen@nokia.com> 00006 ** 00007 ** This file is part of duicontrolpanel. 00008 ** 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Lesser General Public 00012 ** License version 2.1 as published by the Free Software Foundation 00013 ** and appearing in the file LICENSE.LGPL included in the packaging 00014 ** of this file. 00015 ** 00016 ****************************************************************************/ 00017 00018 /* -*- Mode: C; indent-tabs-mode: s; c-basic-offset: 4; tab-width: 4 -*- */ 00019 /* vim:set et ai sw=4 ts=4 sts=4: tw=80 cino="(0,W2s,i2s,t0,l1,:0" */ 00020 #ifndef DCPWRONGAPPLETS_H 00021 #define DCPWRONGAPPLETS_H 00022 00023 #include <QSet> 00024 #include <QHash> 00025 #include <QString> 00026 #include <QObject> 00027 00028 class DcpAppletMetadata; 00029 00031 /* 00032 * To disable the applet segfault protection please check the 00033 * DcpWrongApplets::sm_Disabled in the dcpwrongapplets.cpp file. 00034 */ 00035 class DcpWrongApplets: 00036 public QObject 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 static void connectSupervisorSignals(); 00042 static DcpWrongApplets* instance (); 00043 static void destroyInstance(); 00044 static void disable(); 00045 static bool isDisabled() { return sm_Disabled; } 00046 00047 void markAsMaybeBad ( 00048 const QString &badSoPath, 00049 const char *caller); 00050 00051 void unmarkAsMaybeBad ( 00052 const QString &badSoPath, 00053 const char *caller); 00054 00055 static bool 00056 isAppletRecentlyCrashed ( 00057 const QString &badSoPath); 00058 00059 static bool isAppletRecentlyCrashed ( 00060 const DcpAppletMetadata *metadata); 00061 00062 const QSet<QString> &badApplets () const; 00063 static QSet <QString> 00064 queryBadApplets (); 00065 00066 private: 00067 DcpWrongApplets(); 00068 ~DcpWrongApplets(); 00069 // not a public header so private data members are allowed here 00070 static DcpWrongApplets *sm_Instance; 00071 void removeBadsOnDcpTimeStampChange(); 00072 00073 // some speed up caches to avoid unnecessery gconf access 00074 QSet<QString> m_BadApplets; 00075 static bool sm_Disabled; 00076 00077 friend class Ut_DcpWrongApplets; 00078 }; 00079 00080 00081 #endif 00082
Copyright © 2009 Nokia Corporation | Generated on Tue Jul 5 2011 15:01:31 Doxygen 1.7.1 |
Meego control panel |