summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Freddi <dario.freddi@collabora.com>2012-07-02 16:47:44 +0200
committerDario Freddi <dario.freddi@collabora.com>2012-07-02 16:47:44 +0200
commit5128eb6ba4a71b6e09109dead29941db3a557573 (patch)
tree8774e4007a6f0692481379d5ff98e2a12fed032c
parentc5907005aca35d33eaf36ad2dde6f94d657d9711 (diff)
DebugReceiver: Add missing documentation to public methods and signals
-rw-r--r--TelepathyQt/debug-receiver.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/TelepathyQt/debug-receiver.cpp b/TelepathyQt/debug-receiver.cpp
index d1b0f68b..9a5cce2e 100644
--- a/TelepathyQt/debug-receiver.cpp
+++ b/TelepathyQt/debug-receiver.cpp
@@ -111,12 +111,42 @@ DebugReceiver::~DebugReceiver()
delete mPriv;
}
+/**
+ * Retrieves buffered debug messages.
+ *
+ * This method returns a list of buffered debug messages. Depending on the service side
+ * implementation, this may not be the entire list of all messages received during the
+ * service's lifetime. Use monitoring instead for getting all the messages being streamed
+ * in realtime.
+ *
+ * \return A pending operation returning a list of buffered debug messages when finished.
+ *
+ * \sa setMonitoringEnabled
+ */
PendingDebugMessageList *DebugReceiver::fetchMessages()
{
return new PendingDebugMessageList(mPriv->baseInterface->GetMessages(),
DebugReceiverPtr(this));
}
+/**
+ * Enables or disables the emission of newDebugMessage.
+ *
+ * This function either enables or disables the emission of newDebugMessage. If monitoring is
+ * enabled, everytime a message will be received, newDebugMessage will be emitted carrying the
+ * new message.
+ *
+ * Monitoring should be disabled when not needed, as it generates a high amount of traffic on
+ * the bus. It is always disabled by default.
+ *
+ * This method requires FeatureCore to be enabled.
+ *
+ * \param enabled Whether to enable or disable monitoring.
+ *
+ * \return A pending operation returning whether the operation succeeded or not.
+ *
+ * \sa newDebugMessage
+ */
PendingOperation *DebugReceiver::setMonitoringEnabled(bool enabled)
{
if (!isReady()) {
@@ -154,4 +184,15 @@ void DebugReceiver::onNewDebugMessage(double time, const QString &domain,
emit newDebugMessage(msg);
}
+/**
+ * \fn void DebugReceiver::newDebugMessage(const Tp::DebugMessage &msg)
+ *
+ * Emitted whenever a new debug message is available. This will be emitted only if
+ * monitoring has been previously enabled.
+ *
+ * \param msg The new debug message.
+ *
+ * \sa setMonitoringEnabled
+ */
+
} // Tp