kdirnotify_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./kdirnotify.h"
00010
00011 #include <kdatastream.h>
00012
00013
00014 static const char* const KDirNotify_ftable[5][3] = {
00015 { "ASYNC", "FilesAdded(KURL)", "FilesAdded(KURL directory)" },
00016 { "ASYNC", "FilesRemoved(KURL::List)", "FilesRemoved(KURL::List fileList)" },
00017 { "ASYNC", "FilesChanged(KURL::List)", "FilesChanged(KURL::List fileList)" },
00018 { "ASYNC", "FileRenamed(KURL,KURL)", "FileRenamed(KURL src,KURL dst)" },
00019 { 0, 0, 0 }
00020 };
00021
00022 bool KDirNotify::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00023 {
00024 if ( fun == KDirNotify_ftable[0][1] ) {
00025 KURL arg0;
00026 QDataStream arg( data, IO_ReadOnly );
00027 arg >> arg0;
00028 replyType = KDirNotify_ftable[0][0];
00029 FilesAdded(arg0 );
00030 } else if ( fun == KDirNotify_ftable[1][1] ) {
00031 KURL::List arg0;
00032 QDataStream arg( data, IO_ReadOnly );
00033 arg >> arg0;
00034 replyType = KDirNotify_ftable[1][0];
00035 FilesRemoved(arg0 );
00036 } else if ( fun == KDirNotify_ftable[2][1] ) {
00037 KURL::List arg0;
00038 QDataStream arg( data, IO_ReadOnly );
00039 arg >> arg0;
00040 replyType = KDirNotify_ftable[2][0];
00041 FilesChanged(arg0 );
00042 } else if ( fun == KDirNotify_ftable[3][1] ) {
00043 KURL arg0;
00044 KURL arg1;
00045 QDataStream arg( data, IO_ReadOnly );
00046 arg >> arg0;
00047 arg >> arg1;
00048 replyType = KDirNotify_ftable[3][0];
00049 FileRenamed(arg0, arg1 );
00050 } else {
00051 return DCOPObject::process( fun, data, replyType, replyData );
00052 }
00053 return TRUE;
00054 }
00055
00056 QCStringList KDirNotify::interfaces()
00057 {
00058 QCStringList ifaces = DCOPObject::interfaces();
00059 ifaces += "KDirNotify";
00060 return ifaces;
00061 }
00062
00063 QCStringList KDirNotify::functions()
00064 {
00065 QCStringList funcs = DCOPObject::functions();
00066 for ( int i = 0; KDirNotify_ftable[i][2]; i++ ) {
00067 QCString func = KDirNotify_ftable[i][0];
00068 func += ' ';
00069 func += KDirNotify_ftable[i][2];
00070 funcs << func;
00071 }
00072 return funcs;
00073 }
00074
00075
This file is part of the documentation for kdelibs Version 3.1.4.