• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

kopeteprotocol.h

Go to the documentation of this file.
00001 /*
00002     kopeteprotocol.h - Kopete Protocol
00003 
00004     Copyright (c) 2002      by Duncan Mac-Vicar Prett <duncan@kde.org>
00005     Copyright (c) 2002-2003 by Martijn Klingens       <klingens@kde.org>
00006     Copyright (c) 2002-2005 by Olivier Goffart        <ogoffart@kde.org>
00007     Copyright (c) 2007      by Michaƫl Larouche       <larouche@kde.org>
00008 
00009     Kopete    (c) 2002-2004 by the Kopete developers  <kopete-devel@kde.org>
00010 
00011     *************************************************************************
00012     *                                                                       *
00013     * This library is free software; you can redistribute it and/or         *
00014     * modify it under the terms of the GNU Lesser General Public            *
00015     * License as published by the Free Software Foundation; either          *
00016     * version 2 of the License, or (at your option) any later version.      *
00017     *                                                                       *
00018     *************************************************************************
00019 */
00020 
00021 #ifndef KOPETEPROTOCOL_H
00022 #define KOPETEPROTOCOL_H
00023 
00024 #include <QtCore/QFlags>
00025 
00026 #include "kopeteplugin.h"
00027 #include "kopeteonlinestatus.h"
00028 
00029 class KopeteEditAccountWidget;
00030 class AddContactPage;
00031 class KJob;
00032 
00033 #include "kopete_export.h"
00034 
00035 namespace Kopete
00036 {
00037 
00038 class Contact;
00039 class MetaContact;
00040 class Account;
00041 
00042 /*namespace UI
00043 {
00044     class EditAccountWidget;
00045     class AddContactPage;
00046 }*/
00047 
00048 
00062 class KOPETE_EXPORT Protocol : public Plugin
00063 {
00064     Q_OBJECT
00065 
00066 public:
00067 
00071     virtual ~Protocol();
00072 
00085     virtual Account *createNewAccount( const QString &accountId ) = 0;
00086 
00092     virtual AddContactPage *createAddContactWidget( QWidget *parent, Account *account ) = 0;
00093 
00102     virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, QWidget *parent ) = 0;
00103 
00110     enum Capability
00111     {
00112         BaseFgColor = 0x1,     
00113         BaseBgColor = 0x2,     
00114         RichFgColor = 0x4,       
00115         RichBgColor = 0x8,       
00116 
00117         BaseFont = 0x10,        
00118         RichFont = 0x20,       
00119 
00121         BaseUFormatting = 0x40,
00122         BaseIFormatting = 0x80,
00123         BaseBFormatting = 0x100,
00124 
00126         RichUFormatting = 0x200,
00127         RichIFormatting = 0x400,
00128         RichBFormatting = 0x800,
00129 
00130         Alignment = 0x1000,     
00131 
00133         BaseFormatting = BaseIFormatting | BaseUFormatting | BaseBFormatting,
00134 
00136         RichFormatting = RichIFormatting | RichUFormatting | RichBFormatting,
00137 
00138         RichColor = RichBgColor | RichFgColor,
00139         BaseColor = BaseBgColor | BaseFgColor,
00140 
00141         //Shortcut for All of the above - full HTML
00142         FullRTF =  RichFormatting | Alignment | RichFont | RichFgColor | RichBgColor ,
00143 
00144 
00145         CanSendOffline = 0x10000 
00146     };
00147     Q_DECLARE_FLAGS(Capabilities, Capability)
00148 
00149     
00153     Capabilities capabilities() const;
00154 
00158     Kopete::OnlineStatus accountOfflineStatus() const;
00159 
00160 
00161 protected:
00169     Protocol( const KComponentData &instance, QObject *parent );
00170 
00177     void setCapabilities( Capabilities );
00178 
00179 public:
00180 
00199     virtual void aboutToUnload();
00200 
00201 private slots:
00206     void slotAccountOnlineStatusChanged( Kopete::Contact *self );
00207 
00213     void slotAccountDestroyed(  );
00214 
00215 
00216 public:
00217 
00230     virtual void deserialize( MetaContact *metaContact, const QMap<QString, QString> &serializedData );
00231 
00247     virtual Contact *deserializeContact( MetaContact *metaContact,
00248         const QMap<QString, QString> &serializedData,
00249         const QMap<QString, QString> &addressBookData );
00250 
00280     virtual KJob *createProtocolTask(const QString &taskType);
00281 
00287      virtual bool validatePassword( const QString & password ) const;
00288 
00289 public slots:
00297     void slotMetaContactAboutToSave( Kopete::MetaContact *metaContact );
00298 
00299 
00300 private:
00301     class Private;
00302     Private *d;
00303 };
00304 
00305 Q_DECLARE_OPERATORS_FOR_FLAGS(Protocol::Capabilities)
00306 
00307 } //END namespace kopete
00308 
00309 #endif
00310 

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal