[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:21:03 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=9bd2f5f

The following commit has been merged in the master branch:
commit 9bd2f5fc65e5410cbf88d577fd8a596629ce1d82
Author: Lasath Fernando <kde at lasath.org>
Date:   Thu Jan 26 10:06:06 2012 +1100

    Implment KTp::Message
    
    Class to work around the fact that Tp::Message is not editable.
---
 .../telepathy-text-observer.h => lib/message.cpp   | 46 +++++++++++++---------
 .../telepathy-text-observer.h => lib/message.h     | 41 ++++++++++---------
 2 files changed, 50 insertions(+), 37 deletions(-)

diff --git a/plasmoid/declarative-plugin/telepathy-text-observer.h b/lib/message.cpp
similarity index 54%
copy from plasmoid/declarative-plugin/telepathy-text-observer.h
copy to lib/message.cpp
index 6658ee5..faaa7b6 100644
--- a/plasmoid/declarative-plugin/telepathy-text-observer.h
+++ b/lib/message.cpp
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
+    Copyright (C) 2012  Lasath Fernando <kde at lasath.org>
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -17,29 +17,37 @@
 */
 
 
-#ifndef TELEPATHY_TEXT_OBSERVER_H
-#define TELEPATHY_TEXT_OBSERVER_H
+#include "message.h"
 
-#include "ktpchat_export.h"
+using namespace KTp;
 
-#include <TelepathyQt/AbstractClient>
+Message::Message(Tp::Message &original)
+    : originalMessage(original),
+      content(originalMessage.text())
+{
+}
 
-class Conversation;
+QString Message::mainMessagePart() const
+{
+    return content.operator[](Message::MainMessage);
+}
 
-class KDE_TELEPATHY_CHAT_EXPORT TelepathyTextObserver : public QObject
+void Message::setMainMessagePart(const QString& message)
 {
-Q_OBJECT
+    content[Message::MainMessage] = message;
+}
 
-public:
-    TelepathyTextObserver();
-    ~TelepathyTextObserver();
+void Message::appendMessagePart(const QString& part)
+{
+    content << part;
+}
 
-Q_SIGNALS:
-    void newConversation(Conversation *con);
-private:
-    class ConversationClientObserver;
-    Tp::SharedPtr<ConversationClientObserver> observer;
-    Tp::ClientRegistrarPtr m_registrar;
-};
+QString Message::finalizedMessage() const
+{
+    content.join(QLatin1Literal("
"));
+}
 
-#endif // CONVERSATION_WATCHER_H
+QVariantMap& Message::miscData()
+{
+    return miscData;
+}
\ No newline at end of file
diff --git a/plasmoid/declarative-plugin/telepathy-text-observer.h b/lib/message.h
similarity index 55%
copy from plasmoid/declarative-plugin/telepathy-text-observer.h
copy to lib/message.h
index 6658ee5..dfeb643 100644
--- a/plasmoid/declarative-plugin/telepathy-text-observer.h
+++ b/lib/message.h
@@ -1,5 +1,6 @@
 /*
-    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
+    <one line to give the library's name and an idea of what it does.>
+    Copyright (C) 2012  Lasath Fernando <email>
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -17,29 +18,33 @@
 */
 
 
-#ifndef TELEPATHY_TEXT_OBSERVER_H
-#define TELEPATHY_TEXT_OBSERVER_H
+#ifndef KTP_MESSAGE_H
+#define KTP_MESSAGE_H
 
-#include "ktpchat_export.h"
+#include <TelepathyQt/Message>
 
-#include <TelepathyQt/AbstractClient>
+namespace KTp {
 
-class Conversation;
+class Message {
+    Message(Tp::Message& original);
 
-class KDE_TELEPATHY_CHAT_EXPORT TelepathyTextObserver : public QObject
-{
-Q_OBJECT
+    QString mainMessagePart() const;
+    void setMainMessagePart(const QString&);
+    void appendMessagePart(const QString&);
 
-public:
-    TelepathyTextObserver();
-    ~TelepathyTextObserver();
+    QString finalizedMessage() const;
 
-Q_SIGNALS:
-    void newConversation(Conversation *con);
+    QVariantMap& miscData();
 private:
-    class ConversationClientObserver;
-    Tp::SharedPtr<ConversationClientObserver> observer;
-    Tp::ClientRegistrarPtr m_registrar;
+    Tp::Message originalMessage;
+    QVariantMap miscData;
+    QStringList content;
+
+    enum MessageParts {
+        MainMessage = 0
+    };
 };
 
-#endif // CONVERSATION_WATCHER_H
+}
+
+#endif // KTP_MESSAGE_H

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list