[PATCH] Request for adding internal meta-data support to KIO...

David Faure faure at kde.org
Thu May 6 09:31:30 BST 2010


> #3. When internal metadata is received, update ALL ioslaves, not only the 
> idles ones, that match the criteria specified through the keyword.

I guess there's no other solution, but this sounds a bit like a race. A running slave might
or might not get this new metadata in time for whatever it's currently doing.
Then again, we're talking about authentication, so obviously we can't send auth data before
it's typed in by the user :-) OK, ignore this.

[...] 
     ProtoQueue *pq = m_protocols.value(jobPriv->m_protocol);
     pq->removeJob(job);
     if (slave) {
+        // Reconfigure the slave that sent the original internal meta-data and
+        // all other idle slaves that are currently servi

Unfinished sentence?

+        if (jobPriv->m_internalMetaData.count()) {

We generally use !isEmpty() rather than count(), when the count isn't needed.

+            kDebug(7006) << "Updating ioslaves with new internal metadata information";
+            m_protocols.value(slave->protocol())->updateSlaveConfigFor(slave->host());

Can this value() call ever return 0?

[...]
Index: kio/DESIGN.metadata
===================================================================
--- kio/DESIGN.metadata (revision 1122431)
+++ kio/DESIGN.metadata (working copy)
@@ -5,7 +5,22 @@
 the behavior of a slave and is usally protocol dependent. MetaData consists
 of two strings: a "key" and a "value".
 
+Any meta data whose "key" starts with the keywords {internal~currenthost} and
+"{internal~allhosts}" will be treated as internal metadata and will not be made
+available to client applications. Instead all such meta-data will be stored and
+will appropriately be sent back to all ioslaves along with the other regular
+metadata values.
 
+Use "{internal~currenthost}" to make the internal metadata available to all
+ioslaves of the same protocol and host as the ioslave that generated it. If
+you do not want to restrict the availability of the internal metadata to only
+the current host, then use {internal~allhosts}. In either case the internal
+metadata follows the rules of the regular metadata and therefore cannot be sent
+from one protocol such as "http" to a completely different one like "ftp".
+
+Please note that when internal meta-data values are sent back to ioslaves, the
+keyword used to mark them internal will be stripped from the key name.
+
 The following keys are currently in use:
 
 Key             Value(s)        Description




More information about the kde-core-devel mailing list