Changeset View
Changeset View
Standalone View
Standalone View
plugins/sms/conversationsdbusinterface.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
49 | explicit ConversationsDbusInterface(KdeConnectPlugin* plugin); | 49 | explicit ConversationsDbusInterface(KdeConnectPlugin* plugin); | ||
50 | ~ConversationsDbusInterface() override; | 50 | ~ConversationsDbusInterface() override; | ||
51 | 51 | | |||
52 | void addMessage(const ConversationMessage &message); | 52 | void addMessage(const ConversationMessage &message); | ||
53 | void removeMessage(const QString& internalId); | 53 | void removeMessage(const QString& internalId); | ||
54 | 54 | | |||
55 | public Q_SLOTS: | 55 | public Q_SLOTS: | ||
56 | /** | 56 | /** | ||
57 | * Return a list of the threadID for all valid conversations | 57 | * Return a list of the first message in every conversation | ||
58 | * | ||||
59 | * Note that the return value is a list of QVariants, which in turn have a value of | ||||
60 | * QVariantMap created from each message | ||||
58 | */ | 61 | */ | ||
59 | QStringList activeConversations(); | 62 | QVariantList activeConversations(); | ||
60 | 63 | | |||
61 | void requestConversation(const QString &conversationID, int start, int end); | 64 | void requestConversation(const QString &conversationID, int start, int end); | ||
62 | 65 | | |||
63 | /** | 66 | /** | ||
64 | * Send a new message to this conversation | 67 | * Send a new message to this conversation | ||
65 | */ | 68 | */ | ||
66 | void replyToConversation(const QString& conversationID, const QString& message); | 69 | void replyToConversation(const QString& conversationID, const QString& message); | ||
67 | 70 | | |||
68 | /** | 71 | /** | ||
69 | * Send the request to the Telephony plugin to update the list of conversation threads | 72 | * Send the request to the Telephony plugin to update the list of conversation threads | ||
70 | */ | 73 | */ | ||
71 | void requestAllConversationThreads(); | 74 | void requestAllConversationThreads(); | ||
72 | 75 | | |||
73 | Q_SIGNALS: | 76 | Q_SIGNALS: | ||
74 | Q_SCRIPTABLE void conversationCreated(const QString& threadID); | 77 | Q_SCRIPTABLE void conversationCreated(const QVariantMap& msg); | ||
75 | Q_SCRIPTABLE void conversationRemoved(const QString& threadID); | 78 | Q_SCRIPTABLE void conversationRemoved(const QString& threadID); | ||
76 | Q_SCRIPTABLE void conversationUpdated(const QVariantMap& msg) const; | 79 | Q_SCRIPTABLE void conversationUpdated(const QVariantMap& msg) const; | ||
77 | Q_SCRIPTABLE void conversationMessageReceived(const QVariantMap& msg, int pos) const; | 80 | Q_SCRIPTABLE void conversationMessageReceived(const QVariantMap& msg, int pos) const; | ||
78 | 81 | | |||
79 | private /*methods*/: | 82 | private /*methods*/: | ||
80 | QString newId(); //Generates successive identifitiers to use as public ids | 83 | QString newId(); //Generates successive identifitiers to use as public ids | ||
81 | 84 | | |||
82 | private /*attributes*/: | 85 | private /*attributes*/: | ||
Show All 22 Lines |