kpilot Library API Documentation

plugin.h

00001 #ifndef _KPILOT_PLUGIN_H
00002 #define _KPILOT_PLUGIN_H
00003 /* plugin.h                             KPilot
00004 **
00005 ** Copyright (C) 2001 by Dan Pilone
00006 **
00007 ** This file defines the base class of all KPilot conduit plugins configuration
00008 ** dialogs. This is necessary so that we have a fixed API to talk to from
00009 ** inside KPilot.
00010 **
00011 ** The factories used by KPilot plugins are also documented here.
00012 */
00013  
00014 /*
00015 ** This program is free software; you can redistribute it and/or modify
00016 ** it under the terms of the GNU Lesser General Public License as published by
00017 ** the Free Software Foundation; either version 2.1 of the License, or
00018 ** (at your option) any later version.
00019 **
00020 ** This program is distributed in the hope that it will be useful,
00021 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00023 ** GNU Lesser General Public License for more details.
00024 **
00025 ** You should have received a copy of the GNU Lesser General Public License
00026 ** along with this program in a file called COPYING; if not, write to
00027 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00028 ** MA 02111-1307, USA.
00029 */
00030  
00031 /*
00032 ** Bug reports and questions can be sent to kde-pim@kde.org
00033 */
00034 
00035 #include <qstringlist.h>
00036 
00037 #include "uiDialog.h"
00038 #include "syncAction.h"
00039 
00040 class KConfig;
00041 class PilotDatabase;
00042 
00051 class ConduitConfig : public UIDialog
00052 {
00053 Q_OBJECT
00054 
00055 public:
00056         ConduitConfig(QWidget *parent=0L,
00057                 const char *name=0L,
00058                 const QStringList &args = QStringList());
00059         virtual ~ConduitConfig();
00060 
00061         void setConfig(KConfig *c) { fConfig=c; } ;
00062 
00063         virtual void readSettings() = 0 ;
00064         /* and commit changes, too! */
00065 
00066 protected:
00067         KConfig *fConfig;
00068 } ;
00069 
00080 class ConduitAction : public SyncAction
00081 {
00082 Q_OBJECT
00083 public:
00084         ConduitAction(KPilotDeviceLink *,
00085                 const char *name=0L,
00086                 const QStringList &args = QStringList());
00087         virtual ~ConduitAction();
00088 
00089         void setConfig(KConfig *c) { fConfig=c; } ;
00090 
00091 protected:
00092         bool isTest() const { return fTest; } ;
00093         bool isBackup() const { return fBackup; } ;
00094         bool isLocal() const { return fLocal; } ;
00095 
00096         KConfig *fConfig;
00097         PilotDatabase *fDatabase,*fLocalDatabase;
00098 
00104         bool openDatabases(const QString &dbName, bool*retrieved=0L);
00105 
00106 private:
00107         bool fTest;     // Do some kind of test run on the pilot
00108         bool fBackup;   // Do a backup of the database
00109         bool fLocal;    // Local test without a Pilot
00110 
00119         bool openDatabases_(const QString &dbName, bool*retrieved=0L);
00120 
00129         bool openDatabases_(const QString &dbName,const QString &localPath);
00130 } ;
00131 
00132 class PluginUtility
00133 {
00134 public:
00135         static int findHandle(const QStringList &);
00136         static bool isModal(const QStringList &a);
00137 
00146         static bool isRunning(const QCString &appName);
00147 } ;
00148 
00196 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001