Logo Search packages:      
Sourcecode: kadu version File versions

Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

XMPP::CoreProtocol Class Reference

Inheritance diagram for XMPP::CoreProtocol:
Inheritance graph
[legend]
Collaboration diagram for XMPP::CoreProtocol:
Collaboration graph
[legend]

List of all members.

Classes

class  DBItem

Public Types

enum  { TypeElement, TypeStanza, TypeDirect, TypePing }
enum  { NPassword = NCustom, EDBVerify = ECustom, ErrPlain = ErrCustom }
enum  BindCond { BindBadRequest, BindNotAllowed, BindConflict }
enum  Error {
  ErrProtocol = XmlProtocol::ErrCustom, ErrStream, ErrStartTLS, ErrCompress,
  ErrAuth, ErrBind, ErrCustom = XmlProtocol::ErrCustom+10
}
enum  Event {
  EFeatures = XmlProtocol::ECustom, ESASLSuccess, EStanzaReady, EStanzaSent,
  EReady, ECustom = XmlProtocol::ECustom+10
}
enum  Need {
  NSASLMechs = XmlProtocol::NCustom, NStartTLS, NCompress, NSASLFirst,
  NSASLNext, NSASLLayer, NCustom = XmlProtocol::NCustom+10
}
enum  Notify { NSend = 0x01, NRecv = 0x02 }
enum  SASLCond {
  Aborted, IncorrectEncoding, InvalidAuthzid, InvalidMech,
  MechTooWeak, NotAuthorized, TemporaryAuthFailure
}
enum  StreamCond {
  BadFormat, BadNamespacePrefix, Conflict, ConnectionTimeout,
  HostGone, HostUnknown, ImproperAddressing, InternalServerError,
  InvalidFrom, InvalidId, InvalidNamespace, InvalidXml,
  StreamNotAuthorized, PolicyViolation, RemoteConnectionFailed, ResourceConstraint,
  RestrictedXml, SeeOtherHost, SystemShutdown, UndefinedCondition,
  UnsupportedEncoding, UnsupportedStanzaType, UnsupportedVersion, XmlNotWellFormed
}

Public Member Functions

void addIncomingData (const QByteArray &)
QString elementToString (const QDomElement &e, bool clip=false)
bool isIncoming () const
bool isReady () const
const Jidjid () const
void outgoingDataWritten (int)
bool processStep ()
QDomElement recvStanza ()
void reset ()
QString saslMech () const
QByteArray saslStep () const
void sendDirect (const QString &s)
void sendStanza (const QDomElement &e)
void sendWhitespace ()
void setAllowBind (bool b)
void setAllowPlain (bool b)
void setAllowTLS (bool b)
void setDialbackKey (const QString &s)
void setFrom (const QString &s)
void setIncomingAsExternal ()
void setLang (const QString &s)
void setPassword (const QString &s)
void setSASLAuthed ()
void setSASLFirst (const QString &mech, const QByteArray &step)
void setSASLMechList (const QStringList &list)
void setSASLNext (const QByteArray &step)
void shutdown ()
void shutdownWithError (int cond, const QString &otherHost="")
void startClientIn (const QString &id)
void startClientOut (const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth, bool doCompression)
void startDialbackOut (const QString &to, const QString &from)
void startDialbackVerifyOut (const QString &to, const QString &from, const QString &id, const QString &key)
void startServerIn (const QString &id)
void startServerOut (const QString &to)
QByteArray takeOutgoingData ()
QString xmlEncoding () const

Public Attributes

QDomDocument doc
QDomElement errAppSpec
int errCond
int errorCode
QString errText
int event
StreamFeatures features
QString from
QString host
QStringList hosts
QString id
QString lang
int need
int notify
bool old
QString otherHost
QByteArray spare
QString to
QList< TransferItemtransferItemList
QString user
Version version

Protected Member Functions

bool close ()
void delayError (int code)
void delayErrorAndClose (int cond, const QString &text="", const QDomElement &appSpec=QDomElement())
QDomElement docElement ()
bool doStep (const QDomElement &e)
bool error (int code)
bool errorAndClose (int cond, const QString &text="", const QDomElement &appSpec=QDomElement())
bool handleCloseFinished ()
void handleDocOpen (const Parser::Event &pe)
bool handleError ()
void itemWritten (int id, int size)
QByteArray resetStream ()
void send (const QDomElement &e, bool clip=false)
void sendStreamError (const QString &text)
void sendStreamError (int cond, const QString &text="", const QDomElement &appSpec=QDomElement())
void setReady (bool b)
void startAccept ()
void startConnect ()
int writeElement (const QDomElement &e, int id, bool external, bool clip=false)
int writeString (const QString &s, int id, bool external)

Static Protected Member Functions

static QString saslCondToString (int)
static QString streamCondToString (int)
static int stringToSASLCond (const QString &s)
static int stringToStreamCond (const QString &s)

Protected Attributes

bool sasl_authed
QString sasl_mech
QStringList sasl_mechlist
QByteArray sasl_step
QDomElement stanzaToRecv

Private Types

enum  Step {
  Start, Done, SendFeatures, GetRequest,
  HandleTLS, GetSASLResponse, IncHandleSASLSuccess, GetFeatures,
  HandleFeatures, GetTLSProceed, GetCompressProceed, GetSASLFirst,
  GetSASLChallenge, GetSASLNext, HandleSASLSuccess, GetBindResponse,
  HandleAuthGet, GetAuthGetResponse, HandleAuthSet, GetAuthSetResponse
}

Private Member Functions

QString defaultNamespace ()
bool dialbackStep (const QDomElement &e)
bool doStep2 (const QDomElement &e)
void elementRecv (const QDomElement &e)
void elementSend (const QDomElement &e)
QStringList extraNamespaces ()
bool grabPendingItem (const Jid &to, const Jid &from, int type, DBItem *item)
void handleStreamOpen (const Parser::Event &pe)
void init ()
bool isValidStanza (const QDomElement &e) const
bool loginComplete ()
bool normalStep (const QDomElement &e)
bool stepAdvancesParser () const
bool stepRequiresElement () const
void stringRecv (const QString &s)
void stringSend (const QString &s)

Static Private Member Functions

static int getOldErrorCode (const QDomElement &e)

Private Attributes

bool allowPlain
bool compress_started
QList< DBItemdbpending
QList< DBItemdbrequests
QList< DBItemdbvalidated
bool dialback
QString dialback_id
QString dialback_key
bool dialback_verify
bool digest
bool doAuth
bool doBinding
bool doCompress
bool doTLS
Jid jid_
bool oldOnly
QString password
bool sasl_started
QString self_from
bool server
int step
bool tls_started

Detailed Description

Definition at line 248 of file protocol.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index