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

kopete/protocols/messenger/libpapillon

networkmessage.h

Go to the documentation of this file.
00001 /*
00002    networkmessage.h - Represent a network message between the Messenger server.
00003 
00004    Copyright (c) 2006-2007 by Michaƫl Larouche <larouche@kde.org>
00005 
00006    *************************************************************************
00007    *                                                                       *
00008    * This library is free software; you can redistribute it and/or         *
00009    * modify it under the terms of the GNU Lesser General Public            *
00010    * License as published by the Free Software Foundation; either          *
00011    * version 2 of the License, or (at your option) any later version.      *
00012    *                                                                       *
00013    *************************************************************************
00014 */
00015 #ifndef PAPILLONNETWORKMESSAGE_H
00016 #define PAPILLONNETWORKMESSAGE_H
00017 
00018 // Qt includes
00019 #include <QtCore/QFlags>
00020 
00021 // Papillon includes
00022 #include <Papillon/Macros>
00023 
00024 class QStringList;
00025 class QByteArray;
00026 
00027 namespace Papillon 
00028 {
00029 
00039 class PAPILLON_EXPORT NetworkMessage
00040 {
00041 public:
00046     enum NetworkMessageTypeValues
00047     {
00048         NormalMessage, 
00049         TransactionMessage, 
00050         PayloadMessage 
00051     };
00052     Q_DECLARE_FLAGS(NetworkMessageType, NetworkMessageTypeValues)
00053     
00054     
00061     NetworkMessage(const NetworkMessageType &type = NormalMessage);
00062     ~NetworkMessage();
00063 
00067     NetworkMessageType type() const;
00068 
00072     QString command() const;
00077     void setCommand(const QString &command);
00078     
00082     QString transactionId() const;
00088      void setTransactionId(const QString &transactionId);
00089 
00093     QStringList arguments() const;
00098     void setArguments(const QStringList &arguments);
00105     void setArguments(const QString &argumentString);
00106 
00110     int payloadLength() const;
00114     QByteArray payloadData() const;
00121     void setPayloadData(const QByteArray &data);
00122     
00130     QString toString() const;
00131 
00136     QByteArray toRawCommand() const;
00137 
00138 private:
00139     class Private;
00140     Private *d;
00141 };
00142 
00143 Q_DECLARE_OPERATORS_FOR_FLAGS(NetworkMessage::NetworkMessageType)
00144 
00145 }
00146 
00147 #endif

kopete/protocols/messenger/libpapillon

Skip menu "kopete/protocols/messenger/libpapillon"
  • 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