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