• Skip to content
  • Skip to link menu
  • KDE API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • KTp
message-processor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Lasath Fernando <kde@lasath.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 
20 #ifndef MESSAGE_PROCESSOR_H
21 #define MESSAGE_PROCESSOR_H
22 
23 #include <QObject>
24 #include <QList>
25 #include <KPluginInfo>
26 
27 #include <KTp/message.h>
28 #include <KTp/outgoing-message.h>
29 
30 #include <KTp/ktp-export.h>
31 #include <KTp/abstract-message-filter.h>
32 #include <TelepathyLoggerQt4/Types>
33 
34 namespace Tp
35 {
36 class ReceivedMessage;
37 class Message;
38 }
39 
40 
41 namespace KTp
42 {
43 
44 class AbstractMessageFilter;
45 
46 //each thing that displays message will have an instance of this
47 class KTP_EXPORT MessageProcessor : public QObject
48 {
49  Q_OBJECT
50 
51  public:
52  static MessageProcessor* instance();
53  ~MessageProcessor();
54 
55  //text-ui will call this somewhere when creating the template
56  QString header();
57 
58  //text-ui will call this somewhere in handleIncommingMessage just before displaying it
59  KTp::Message processIncomingMessage(const Tp::Message &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
60  KTp::Message processIncomingMessage(const Tp::ReceivedMessage &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
61  KTp::Message processIncomingMessage(const Tpl::TextEventPtr &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
62 
63  KTp::OutgoingMessage processOutgoingMessage(const QString &messageText, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
64 
65  protected:
66  KTp::Message processIncomingMessage(KTp::Message message, const KTp::MessageContext &context);
67  explicit MessageProcessor();
68 
69  private:
70  class Private;
71  Private * const d;
72 
73 };
74 
75 }
76 
77 #endif // MESSAGE_PROCESSOR_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal