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

Nepomuk-Core

  • KTp
outgoing-message.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 David Edmundson <kde@davidedmundson.co.uk>
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 #include "outgoing-message.h"
21 
22 #include <KDebug>
23 #include <QSharedData>
24 
25 #include <TelepathyQt/ContactManager>
26 #include <TelepathyQt/Connection>
27 
28 #include <TelepathyLoggerQt4/Entity>
29 
30 using namespace KTp;
31 
32 class OutgoingMessage::Private : public QSharedData {
33 
34  public:
35  Private() {
36  messageType = Tp::ChannelTextMessageTypeNormal;
37  }
38  QString text;
39  Tp::ChannelTextMessageType messageType;
40 };
41 
42 OutgoingMessage::OutgoingMessage(const OutgoingMessage &other):
43  d(other.d)
44 {
45 }
46 
47 OutgoingMessage& OutgoingMessage::operator=(const OutgoingMessage &other) {
48  d = other.d;
49  return *this;
50 }
51 
52 OutgoingMessage::OutgoingMessage(const QString &messageText) :
53  d(new Private)
54 {
55  setText(messageText);
56 }
57 
58 OutgoingMessage::~OutgoingMessage()
59 {
60 }
61 
62 QString OutgoingMessage::text() const
63 {
64  return d->text;
65 }
66 
67 void OutgoingMessage::setText(const QString &text)
68 {
69  d->text = text;
70 }
71 
72 Tp::ChannelTextMessageType OutgoingMessage::type() const
73 {
74  return d->messageType;
75 }
76 
77 void OutgoingMessage::setType(Tp::ChannelTextMessageType type)
78 {
79  d->messageType = type;
80 }
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