00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef kapabilities_h
00022
#define kapabilities_h
00023
00024
#include <qmemarray.h>
00025
#include <qstring.h>
00026
#include <qstringlist.h>
00027
#include <qvaluelist.h>
00028
#include <qhostaddress.h>
00029
#include <qpair.h>
00030
#include <qmap.h>
00031
#include <qvariant.h>
00032
#include <qglobal.h>
00033
00040
namespace KSync {
00041
class Kapabilities {
00042
public:
00046 Kapabilities();
00050 Kapabilities(
const Kapabilities & );
00054 ~Kapabilities();
00055
00059
bool supportsMetaSyncing() const;
00060
void setSupportMetaSyncing(
bool meta );
00064
void setMetaSyncingEnabled(
bool enable);
00065
bool isMetaSyncingEnabled() const;
00066
00071
bool supportsPushSync() const;
00072
00077
void setSupportsPushSync(
bool push);
00078
00084
bool needsConnection() const;
00085
00090
void setNeedsConnection(
bool connection );
00091
00092
bool supportsListDir() const;
00093
void setSupportsListDir(
bool );
00094
00099
QMemArray<
int> ports()const;
00100
00105
void setPorts(const
QMemArray<
int>& );
00106
00111
int currentPort() const;
00112
00117
void setCurrentPort(
int );
00118
00122
bool needsNetworkConnection()const;
00123
void setNeedsNetworkConnection(
bool );
00129
bool needsIPs()const;
00133
bool needsSrcIP()const;
00138
bool needsDestIP()const;
00142
void setNeedsIPs(
bool ip);
00146
void setNeedsSrcIP(
bool srcIp );
00150
void setNeedsDestIP(
bool srcIp );
00151
00157
void setSrcIP( const
QString & );
00158
00163 QString srcIP()const;
00164
00169
void setDestIP(const QString &);
00170
00174 QString destIP()const;
00175
00180
bool canAutoHandle() const;
00181
00188
void setAutoHandle(
bool);
00189
00190
00195
QStringList ipProposals() const;
00196
void setIpProposals( const
QStringList& );
00197
00198
00203
bool needAuthentication()const;
00204
00209
void setNeedAuthentication(
bool need);
00210
00215
void setUser(const QString &);
00216
00221 QString user() const;
00222
00227
void setPassword(const QString & );
00228
00233 QString password() const;
00234
00239
QValueList<
QPair<QString, QString> > userProposals() const;
00240
00246
void setUserProposals(
QValueList<
QPair<QString, QString> > );
00247
00251 Kapabilities &operator=(const Kapabilities & );
00260 QStringList models()const;
00264
void setModels( const QStringList & );
00268 QString currentModel()const;
00269
void setCurrentModel( const QString & );
00270
void setConnectionMode( const QStringList & );
00271
bool needsModelName()const;
00272
void setNeedsModelName(
bool );
00273 QString modelName()const;
00274
void setModelName( const QString& );
00275
00276 QStringList connectionModes()const;
00277 QString currentConnectionMode()const;
00278
void setCurrentConnectionMode(const QString &);
00282
void setExtraOption( const QString &, const QString & );
00283
QMap<QString, QString> extras()const {
return m_extras; };
00284
00285
private:
00286
class KapabilitiesPrivate;
00287 KapabilitiesPrivate *d;
00288
bool m_needsNet:1;
00289
bool m_push:1;
00290
bool m_needConnection:1;
00291
bool m_listdir:1;
00292
bool m_needsIp:1;
00293
bool m_needsSrcIp:1;
00294
bool m_needsDestIp:1;
00295
bool m_needsAuthent:1;
00296
bool m_supMeta:1;
00297
bool m_meta:1;
00298
bool m_needsName;
00299
QString m_src;
00300
QString m_dest;
00301
QStringList m_propsIPs;
00302
QValueList< QPair<QString, QString> > m_propAuth;
00303
bool m_canHandle;
00304
QMemArray<int> m_ports;
00305
int m_current;
00306
QString m_user;
00307
QString m_pass;
00308
QMap<QString,QString> m_extras;
00309
QString m_currModell;
00310
QStringList m_models;
00311
QString m_currMode;
00312
QStringList m_modes;
00313
QString m_name;
00314 };
00315 }
00316
#endif
00317
00318