Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > b080c029bbb269236f3c41fd898c839d > files > 1213

kdelibs-2.2.1-6.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>Source: kded.h</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>Source: kded.h</h1>
		</TD>
		<TD valign="top" align="right" colspan="1"></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<pre>
/*  This file is part of the KDE libraries
 *  Copyright (C) 1999 David Faure <faure@kde.org>
 *            (C) 1999 Waldo Bastian <bastian@kde.org>
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Library General Public
 *  License version 2 as published by the Free Software Foundation;
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU Library General Public License
 *  along with this library; see the file COPYING.LIB.  If not, write to
 *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 *  Boston, MA 02111-1307, USA.
 **/

#ifndef __kded_h__
#define __kded_h__ 

#include <time.h>

#include <qobject.h>
#include <qstring.h>
#include <qtimer.h>

#include <dcopclient.h>
#include <dcopobject.h>

#include <ksycoca.h>
#include <ksycocatype.h>
#include <kdedmodule.h>

class KDirWatch;

// No need for this in libkio - apps only get readonly access
class Kded : public QObject, public DCOPObject, public DCOPObjectProxy
{
  Q_OBJECT
public:
   Kded(bool checkUpdates, int pollInterval, int NFSPollInterval);
   virtual ~Kded();

   /**
    * Catch calls to unknown objects.
    */
   bool process(const QCString &obj, const QCString &fun, 
                const QByteArray &data, 
		QCString &replyType, QByteArray &replyData);

   /**
    * process DCOP message.  Only calls to "recreate" are supported at
    * this time.
    */
   bool process(const QCString &fun, const QByteArray &data, 
		QCString &replyType, QByteArray &replyData);

   virtual QCStringList functions();

public slots:

   /**
    * Recreate the database file
    */
   void recreate();

   /**
    * Collect all directories to watch
    */
   void build();

   /**
    * An application unregistered itself with DCOP
    */
   void slotApplicationRemoved(const QCString &appId);

   /**
    * A KDEDModule is about to get destroyed.
    */
   void slotKDEDModuleRemoved();

protected slots:

   /**
    * @internal Triggers rebuilding
    */
   void dirDeleted(const QString& path);
 
   /**
    * @internal Triggers rebuilding
    */
   void update (const QString& dir );

protected:

   /**
    * Scans dir for new files and new subdirectories.
    */
   void readDirectory(const QString& dir, KDirWatch *dirWatch );
   
protected:

   /**
    * Pointer to the dirwatch class which tells us, when some directories
    * changed.
    */
   KDirWatch* m_pDirWatch;
   /*
    * A dirwatch used for remote file systems
    */
   KDirWatch* m_pDirWatchNfs;

   bool b_checkUpdates;
   int m_PollInterval;
   int m_NFSPollInterval;

   /**
    * When a desktop file is updated, a timer is started (5 sec)
    * before rebuilding the binary - so that multiple updates result
    * in only one rebuilding.
    */
   QTimer* m_pTimer;
   
   QValueList<DCOPClientTransaction *> m_requests;
   QList<KDEDModule> m_modules;
};

class KUpdateD : public QObject
{
   Q_OBJECT
public:
   KUpdateD(int pollInterval, int NFSPollInterval);
   ~KUpdateD();
   
public slots:
   void runKonfUpdate();
   void slotNewUpdateFile();

private:
   /**
    * Pointer to the dirwatch class which tells us, when some directories
    * changed.
    */
   KDirWatch* m_pDirWatch;
   /*
    * A dirwatch used for remote file systems
    */
   KDirWatch* m_pDirWatchNfs;

   int m_PollInterval;
   int m_NFSPollInterval;

   /**
    * When a desktop file is updated, a timer is started (5 sec)
    * before rebuilding the binary - so that multiple updates result
    * in only one rebuilding.
    */
   QTimer* m_pTimer;
};

class KHostnameD : public QObject
{
   Q_OBJECT
public:
   KHostnameD(int pollInterval);
   ~KHostnameD();
   
public slots:
   void checkHostname();

private:
   /**
    * Timer for interval hostname checking.
    */
   QTimer m_Timer;
   QCString m_hostname;
};

#endif
</pre>
<HR>
	<table>
	<tr><td><small>Generated by: qateam on updates.mandrakesoft.com on Fri Jan  3 12:35:23 2003, using kdoc 2.0a53.</small></td></tr>
	</table>
</BODY>
</HTML>