You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.1 KiB
88 lines
2.1 KiB
15 years ago
|
/*
|
||
13 years ago
|
This file is part of tdepim.
|
||
15 years ago
|
|
||
|
Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
|
||
|
|
||
|
This program is free software; you can redistribute it and/or modify
|
||
|
it under the terms of the GNU General Public License as published by
|
||
|
the Free Software Foundation; either version 2 of the License, or
|
||
|
(at your option) any later version.
|
||
|
|
||
|
This program 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 General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with this program; if not, write to the Free Software
|
||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
#ifndef KABC_RESOURCEGROUPWARE_H
|
||
|
#define KABC_RESOURCEGROUPWARE_H
|
||
|
|
||
|
#include <kabcresourcecached.h>
|
||
|
|
||
13 years ago
|
#include <libtdepim/progressmanager.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdeio/job.h>
|
||
15 years ago
|
|
||
12 years ago
|
class TDEConfig;
|
||
15 years ago
|
|
||
|
namespace KABC {
|
||
|
|
||
|
class GroupwarePrefs;
|
||
|
|
||
|
class ResourceGroupware : public ResourceCached
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
12 years ago
|
ResourceGroupware( const TDEConfig * );
|
||
15 years ago
|
ResourceGroupware( const KURL &url,
|
||
15 years ago
|
const TQString &user, const TQString &password );
|
||
15 years ago
|
~ResourceGroupware();
|
||
|
|
||
12 years ago
|
void readConfig( const TDEConfig * );
|
||
|
void writeConfig( TDEConfig * );
|
||
15 years ago
|
|
||
|
void readAddressBooks();
|
||
|
void writeAddressBooks();
|
||
|
|
||
|
void retrieveAddressBooks();
|
||
|
|
||
|
GroupwarePrefs *prefs() const { return mPrefs; }
|
||
|
|
||
|
bool doOpen();
|
||
|
void doClose();
|
||
|
|
||
|
Ticket *requestSaveTicket();
|
||
|
void releaseSaveTicket( Ticket* );
|
||
|
|
||
|
bool load();
|
||
|
bool asyncLoad();
|
||
|
bool save( Ticket * );
|
||
|
bool asyncSave( Ticket * );
|
||
|
|
||
|
protected:
|
||
|
void init();
|
||
|
|
||
|
private slots:
|
||
12 years ago
|
void slotJobResult( TDEIO::Job * );
|
||
|
void slotJobData( TDEIO::Job *, const TQByteArray & );
|
||
|
void slotJobPercent( TDEIO::Job *job, unsigned long percent );
|
||
15 years ago
|
|
||
|
void cancelLoad();
|
||
|
|
||
|
private:
|
||
|
GroupwarePrefs *mPrefs;
|
||
|
|
||
12 years ago
|
TDEIO::TransferJob *mDownloadJob;
|
||
15 years ago
|
KPIM::ProgressItem *mProgress;
|
||
15 years ago
|
TQString mJobData;
|
||
15 years ago
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|