[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Activities and desktop events - Results from the meeting
From: Sebastian_Trüg <trueg () kde ! org>
Date: 2010-07-21 10:03:15
Message-ID: 4C46C5E3.8020808 () kde ! org
[Download RAW message or body]
*Caution: I am cross-posting - please use "reply-all"*
So yesterday we had a small meeting on activities and the saving of
desktop events. Let me give a very rough overview of the topic:
- The current activity manager links a resource directly to the current
activity when the resource is reported via a DBus call which needs to
be made by the application.
- There also is a Nepomuk service which also has a DBus interface to
report opening and closing of files but it does not link to
activities but creates desktop events, saving a timestamp and the
type of the event.
- We have the NUAO (Nepomuk User Action) ontology which provides the
necessary entities to describe file open/save events. This is what
the nepomuk service uses.
- The scope of the meeting was: how to merge the two services.
Present (and actively discussing) at the meeting were (in no particular
order):
- Ivan Cucic
- Chani
- Marco Martin
- Evgeny (Phreedom) Egorochkin
- and myself
These are the decisions that were taken:
- The current activity manager's DBus interface will be extended to
include methods to start a new readonly resource access event, to
report saving of the resource, and to close the event (parameters are
always: resource URI, application/service ID, and window ID).
- The activity manager will not link resources directly to activities
but rather create NUAO event resources and relate those to the
current activity.
- We will have a nice API for app developers to use (draft of
ResourceAccess is attached.) This class can be implemented in a
synchronous or asynchronous manner without changing the API since the
calling application does not care about when the data has actually we
written.
- The NUAO ontology will be modified slightly to include the save
timestamps attached to an event.
- We will add restricted support for non-KDE apps like OpenOffice or
Acroread or whatever through KRun (and hopefully even Konsole - I
would love that) using a dedicated DBus method which creates events
of lower priority in the service (meaning they are overwritten by a
call from the application itself). A good place to start is all
places where KRecentFiles is updated.
Hoping that I did not forget anything important I now open the floor to
the "who does what" discussion. :)
In playground[1] you can find the code for my Nepomuk service which also
contains the code for creating the NUAO events. In there is a rather
hacky attampt to "merge" events from places like KRun and the apps
themselves. IMHO there is room for improvement there.
Cheers,
Sebastian
[1]
http://websvn.kde.org/trunk/playground/base/nepomuk-kde/datamaintenanceservice/datamaintenanceservice.cpp?view=markup
["resourceaccess.h" (text/x-c)]
/**
* The ResourceAccess represents an open or modification event
* during its lifetime. A new event is created when the object
* is instanciated and ends when the object is deleted via close().
*
* Typical usage is to create a ResourceAccess for each opened document,
* call saveModification() whenever the user saves the document and call
* close() as soon as the user closes the document.
*
* This will automatically save the statistical data in Nepomuk and update
* the relation to the current activity to be consumed by several parts of
* the KDE desktop.
*/
class ResourceAccess
{
public:
/**
* Save a modification timestamp. Call this whenever the user saves the document.
* This will convert the event into a modification event and add the timestamp.
*/
void saveModification();
/**
* Close the event, store the end timestamp and delete the ResourceAccess
* instance.
*/
void close();
/**
* Create a new ResourceAccess event for the resource at \p url which is
* opened in \p widget.
*/
static ResourceAccess* createAccess( const KUrl& url, QWidget* widget );
/**
* Create a new ResourceAccess event for the resource \p res which is
* opened in \p widget.
*/
static ResourceAccess* createAccess( const Nepomuk::Resource& res, QWidget* widget );
private:
/**
* Destructor
*/
~ResourceAccess();
class Private;
Private* const d;
};
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic