Questions about how to achieve some webdav extensions

David Faure david at mandrakesoft.com
Wed Apr 10 17:39:54 BST 2002


On Wednesday 10 April 2002 11:54, Hamish Rodda wrote:
> I'm trying to work out how to implement certain fuctionality into the webdav 
> slave. I have looked through the different plugin options, but they don't seem 
> to do what's needed. Any advice appreciated...
> 
> 1) The ability to cache arbitrary data about each file and directory. I guess 
> this has to be done in the ioslave? The reasons for this are several (source 
> editing, locking, keeping track of server and resource capabilities).

The data for each file in each directory shown in a directory view, is cached
by KDirListerCache. That is, the KFileItems are cached.
Hmm. That won't contain the data you're talking about, I think. Unless you're extending
the UDS_* atoms. But OTOH you can't cache anything in the slave's memory,
slaves are thrown away and recreated all the time. The best way might be simply
a file (using either KSimpleConfig or QDomDocument).

> 2) The ability to add any fuction to any URL with a specific protocol. Eg, if 
> you right-click on a webdav URL, you get "Lock", "Unlock", "Execute on server" 
> etc. fuctions.

I suggest that you extend the service-menu mechanism to add support for
X-KDE-Protocol=webdav. See kdebase/libkonq/SERVICEMENUS
and kdebase/libkonq/konq_popupmenu.cc

> 3) The ability to add another page of options to the properties page, again 
> for any URL with a specific protocol. Also, can the new metainfo plugins work 
> in this way (not bound to the mimetype, but to the protocol)? If so, can new 
> key/value combos be added/deleted by the user arbitrarily?

No idea about metainfo, but for the properties dialog, there's already support
for protocol-specific pages. See kdelibs/kio/kfile/kpropertiesdialog.h,
KPropsDlgPlugin. It supports X-KDE-Protocol in the .desktop file.

> 4) I want to have advanced fuctionality (for webdav versioning support) in 
> konqeror, similar to the cervisia kpart; however I don't want to re-write 
> or cut & paste the file/iconview code - any way to accomplish this?

You probably don't want to limit this to the iconview either, but to also
get support for this in the listview. In which case this could be added to
KonqDirPart, the common base class (in libkonq) for both the iconview
and the listview.
However, the cervisia-part has a different approach, providing its own
part, I don't know how much it had to reimplement.... Quite a lot, probably?

-- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today





More information about the kfm-devel mailing list