kalarmd Library API Documentation

adconfigdatabase.h

00001 /*
00002     Calendar and client access for KDE Alarm Daemon.
00003 
00004     This file is part of the KDE alarm daemon.
00005     Copyright (c) 2001 David Jarvie <software@astrojar.org.uk>
00006     Based on the original, (c) 1998, 1999 Preston Brown
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 
00027 #ifndef ADCONFIGDATABASE_H
00028 #define ADCONFIGDATABASE_H
00029 
00030 #include "adcalendarbase.h"
00031 #include "clientinfo.h"
00032 
00033 // Provides read-only access to the Alarm Daemon config data files
00034 class ADConfigDataBase
00035 {
00036   public:
00037     explicit ADConfigDataBase(bool daemon);
00038     virtual ~ADConfigDataBase() {}
00039 
00040     ClientInfo  getClientInfo(const QCString& appName);
00041     void        removeClientInfo( const QCString &appName );
00042     ClientList  clients() const { return mClients; }
00043     int         clientCount() const     { return mClients.count(); }
00044 
00045     CalendarList calendars() const { return mCalendars; }
00046     int calendarCount() const { return mCalendars.count(); }
00047 
00048   protected:
00049     QString           readConfigData(bool sessionStarting, bool& deletedClients,
00050                                      bool& deletedCalendars,
00051                                      ADCalendarBaseFactory *);
00052     virtual void      deleteConfigCalendar(const ADCalendarBase*);
00053     ADCalendarBase*   getCalendar(const QString& calendarURL);
00054     static QString    expandURL(const QString& urlString);
00055     const QString&    clientDataFile() const  { return mClientDataFile; }
00056     static const QDateTime& baseDateTime();
00057 
00058     static const QCString CLIENT_KEY;
00059     static const QString CLIENTS_KEY;
00060     static const QCString GUI_KEY;
00061     static const QString GUIS_KEY;
00062     static const QString CLIENT_CALENDAR_KEY;
00063     static const QString CLIENT_TITLE_KEY;
00064     static const QString CLIENT_DCOP_OBJECT_KEY;
00065     static const QString CLIENT_NOTIFICATION_KEY;
00066     static const QString CLIENT_DISP_CAL_KEY;
00067 
00068     ClientList        mClients;             // client application names and data
00069     CalendarList      mCalendars;           // the calendars being monitored
00070 
00071   private:
00072     bool              mIsAlarmDaemon;       // true if the instance is being used by the alarm daemon
00073 
00074     QString           mClientDataFile;      // path of file containing client data
00075 };
00076 
00077 #endif
KDE Logo
This file is part of the documentation for kalarmd Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:04 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003