kioslave - stat function (newbie)
Brad Hards
bhards at bigpond.net.au
Wed Oct 9 09:20:17 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm trying to write an rsync kioslave. Despite the power of KDE, its going to
be a long process for me. I basically have to figure out each section using
simple examples, then add it to my code. I've read the kioslave tutorial from
c'T, and it helped a lot, but I'm still struggling.
I've got the kioslave execing out to the rsync binary, returning results, and
a simple parsing happening.
I'm stuck on stat().
Here is the test function I'm trying to get working. I assumed I'd get a
single line entry.
void RsyncProtocol::stat(const KURL& url )
{
UDSEntry entry;
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
atom.m_str = QString("dummy entry");
entry.append( atom );
atom.m_uds = KIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append( atom );
atom.m_uds = KIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
atom.m_uds = KIO::UDS_SIZE;
atom.m_long = 4096;
entry.append(atom);
statEntry( entry );
finished();
return;
}
However all I'm getting is the "Name" and "Size" headers. No entries at all.
My rsync.protocol looks like:
[Protocol]
exec=kio_rsync
protocol=rsync
input=none
output=filesystem
listing=Access,Size,Date,Name,Type
reading=true
so I was expecting a few more labels too.
Can anyone point out the flaw, or suggest another reference I should read?
Brad
- --
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9o+bmW6pHgIdAuOMRAiJHAKCZwH3VqUU4X00F2kJfXszsVrSPxgCfbJ9c
jG2rX7/jgw8RS7ry6UbCUgo=
=Z6MN
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list