SVN commit 950813 by toma: Fill in the doxygen page (per req. winterz), add an example and reindent. CCMAIL: winter@kde.org M +5 -2 Mainpage.dox M +3 -3 microblog_export.h M +14 -3 statusitem.h --- trunk/KDE/kdepimlibs/microblog/Mainpage.dox #950812:950813 @@ -3,11 +3,14 @@ * * @section purpose Purpose * - * Microblog provides... + * Microblog provides some helper functions for the Microblog Akonadi Resource. * * @section desc Description * - * Microblog is a library for ... + * Microblog is a library for using the Microblog Akonadi Resource. The Microblog + * Akonadi resource stores the payload in Akonadi as a StatusItem. Each application + * that wants to use this payload needs to use the StatusItem to get to the single + * representation of tweets and dents. * * @authors * The major authors of this library are:\n --- trunk/KDE/kdepimlibs/microblog/microblog_export.h #950812:950813 @@ -25,16 +25,16 @@ #ifndef MICROBLOG_EXPORT # if defined(MAKE_MICROBLOG_LIB) - /* We are building this library */ +/* We are building this library */ # define MICROBLOG_EXPORT KDE_EXPORT # else - /* We are using this library */ +/* We are using this library */ # define MICROBLOG_EXPORT KDE_IMPORT # endif #endif /** - @namespace Microblog + @namespace Microblog @brief Contains all the Microblog library global classes, objects, and functions. --- trunk/KDE/kdepimlibs/microblog/statusitem.h #950812:950813 @@ -26,7 +26,8 @@ #include #include -namespace Microblog { +namespace Microblog +{ /** * @class StatusItem @@ -34,11 +35,21 @@ * This class is a representation of one Dent or Tweet. It is filled with * xml which the REST API from ident.ca or Teitter and parses it and gives * back the values. Also include ares some convenience functions. + * + * For example to get from an Akonadi::Item to the date of a tweet: + * @code + * Akonadi::Item item = itemForIndex( index ); + * if ( item.hasPayload() ) { + * Microblog::StatusItem msg = item.payload(); + * return msg.date(); + * } + * @endcode + * * @since 4.3 */ class MICROBLOG_EXPORT StatusItem { - public: +public: /** Constructor */ StatusItem(); @@ -82,7 +93,7 @@ /** Gives the raw xml data of the tweet or dent */ QByteArray data() const; - private: +private: class Private; QSharedDataPointer d; };