Plasma/ShareLikeConnect: Difference between revisions
Created page with "= Share Like Connect = == Story == A very useful feature in many applications is sharing their content with a Web service. Many of them implement this feature, but with a diff..." |
|||
Line 11: | Line 11: | ||
=== DBus === | === DBus === | ||
Share Like Connect knows what resource the user wants to share thanks to a DBus interface, registered on the bus name | |||
org.kde.kactivitymanagerd | |||
on the object | |||
SLC/org.kde.ActivityManager.SLC | |||
with the methods focussedResourceURI, focussedResourceMimeType, focussedResourceTitle to set the current focused uri, its mime type and its user-readable name. The resource that will be shared is always the currently focused one. | |||
==== Exposing your application to SLC with KActivities ==== | ==== Exposing your application to SLC with KActivities ==== | ||
You don't have to use directly DBus, use instead the KActivities::ResourceInstance class coming from the '''kactivities''' library ([http://api.kde.org/4.x-api/kdelibs-apidocs/kactivities/html/classKActivities_1_1ResourceInstance.html API doc]). | |||
=== Plasma Applet === | === Plasma Applet === |
Revision as of 18:51, 7 January 2013
Story
A very useful feature in many applications is sharing their content with a Web service. Many of them implement this feature, but with a different implementation, a different set of services and a different user interface. A similar problem is connecting Application content to the activities, assigning tags or rating files.
Solution: a common user interface that lives right in the workspace, that is shared between all applications that want to share something on the web or connect items to activities.
Architecture
The Share Like Connect framework is composed of many parts:
DBus
Share Like Connect knows what resource the user wants to share thanks to a DBus interface, registered on the bus name
org.kde.kactivitymanagerd
on the object
SLC/org.kde.ActivityManager.SLC
with the methods focussedResourceURI, focussedResourceMimeType, focussedResourceTitle to set the current focused uri, its mime type and its user-readable name. The resource that will be shared is always the currently focused one.
Exposing your application to SLC with KActivities
You don't have to use directly DBus, use instead the KActivities::ResourceInstance class coming from the kactivities library (API doc).