kpilot

kpilotlocallink.h

Go to the documentation of this file.
00001 #ifndef _KPILOT_KPILOTLOCALLINK_H
00002 #define _KPILOT_KPILOTLOCALLINK_H
00003 /*
00004 **
00005 ** Copyright (C) 1998-2001 by Dan Pilone
00006 ** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00007 ** Copyright (C) 2006 Adriaan de Groot <groot@kde.org>
00008 **
00009 */
00010 
00011 /*
00012 ** This program is free software; you can redistribute it and/or modify
00013 ** it under the terms of the GNU Lesser General Public License as published by
00014 ** the Free Software Foundation; either version 2.1 of the License, or
00015 ** (at your option) any later version.
00016 **
00017 ** This program is distributed in the hope that it will be useful,
00018 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 ** GNU Lesser General Public License for more details.
00021 **
00022 ** You should have received a copy of the GNU Lesser General Public License
00023 ** along with this program in a file called COPYING; if not, write to
00024 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00025 ** MA 02110-1301, USA.
00026 */
00027 
00028 /*
00029 ** Bug reports and questions can be sent to kde-pim@kde.org
00030 */
00031 
00032 #include "kpilotlink.h"
00033 
00043 class KDE_EXPORT KPilotLocalLink : public KPilotLink
00044 {
00045 Q_OBJECT
00046 public:
00047     KPilotLocalLink( QObject *parent=0L, const char *name=0L );
00048     virtual ~KPilotLocalLink();
00049 
00050     virtual QString statusString() const;
00051     virtual bool isConnected() const;
00052     virtual void reset( const QString & );
00053     virtual void close();
00054     virtual void reset();
00055     virtual bool tickle();
00056     virtual const KPilotCard *getCardInfo(int card);
00057     virtual void endSync( EndOfSyncFlags f );
00058     virtual int openConduit();
00059     virtual int getNextDatabase(int index,struct DBInfo *);
00060     virtual int findDatabase(const char *name, struct DBInfo*,
00061         int index=0, unsigned long type=0, unsigned long creator=0);
00062     virtual bool retrieveDatabase(const QString &path, struct DBInfo *db);
00063     virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM);
00064     virtual PilotDatabase *database( const QString &name );
00065 
00066 public slots:
00067     void ready();
00068 
00069 protected:
00070     virtual bool installFile(const QString &, const bool deleteFile);
00071     virtual void addSyncLogEntryImpl( const QString &s );
00072     virtual int pilotSocket() const
00073     {
00074         return -1;
00075     }
00076 
00077 protected:
00078     bool fReady;
00079     QString fPath;
00080 
00081     class Private;
00082     Private *d;
00083 
00090     unsigned int findAvailableDatabases( Private &, const QString &path );
00091 } ;
00092 
00093 
00094 #endif
00095