[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/krss
From: Dmitry Ivanov <vonami () gmail ! com>
Date: 2008-06-18 8:14:20
Message-ID: 1213776860.947415.3749.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 821699 by divanov:
D-Bus: add QStringList subscriptions( remoteId )
M +4 -0 libkrss/org.kde.krss.xml
M +14 -0 resource/rssresource.cpp
M +1 -0 resource/rssresource.h
--- trunk/playground/pim/krss/libkrss/org.kde.krss.xml #821698:821699
@@ -24,5 +24,9 @@
<arg name="remoteId" type="s" direction="in"/>
<arg name="subscriptionLabel" type="s" direction="in"/>
</method>
+ <method name="subscriptions">
+ <arg type="as" direction="out"/>
+ <arg name="remoteId" type="s" direction="in"/>
+ </method>
</interface>
</node>
--- trunk/playground/pim/krss/resource/rssresource.cpp #821698:821699
@@ -147,6 +147,20 @@
return false;
}
+QStringList RssResource::subscriptions( const QString &remoteId )
+{
+ if ( !m_collections.contains( remoteId ) ) {
+ kWarning() << "No such collection: remoteId:" << remoteId;
+ return QStringList();
+ }
+
+ if ( !m_collections[ remoteId ].hasAttribute( "SubscriptionLabels" ) ) {
+ return QStringList();
+ }
+
+ return m_collections[ remoteId \
].attribute<SubscriptionLabelsCollectionAttribute>()->subscriptionLabels(); +}
+
// to be removed
/*void RssResource::collectionAdded( const Akonadi::Collection &collection, const \
Akonadi::Collection &parent ) {
--- trunk/playground/pim/krss/resource/rssresource.h #821698:821699
@@ -48,6 +48,7 @@
bool removeFeed( const QString &remoteId );
bool subscribe( const QString &remoteId, const QString &subscriptionLabel );
bool unsubscribe( const QString &remoteId, const QString &subscriptionLabel \
); + QStringList subscriptions( const QString &remoteId );
protected Q_SLOTS:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic