kio Library API Documentation

observer_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from observer.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./observer.h"
00010 
00011 #include <kdatastream.h>
00012 
00013 
00014 static const char* const Observer_ftable[3][3] = {
00015     { "void", "killJob(int)", "killJob(int progressId)" },
00016     { "KIO::MetaData", "metadata(int)", "metadata(int progressId)" },
00017     { 0, 0, 0 }
00018 };
00019 
00020 bool Observer::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00021 {
00022     if ( fun == Observer_ftable[0][1] ) { // void killJob(int)
00023     int arg0;
00024     QDataStream arg( data, IO_ReadOnly );
00025     arg >> arg0;
00026     replyType = Observer_ftable[0][0]; 
00027     killJob(arg0 );
00028     } else if ( fun == Observer_ftable[1][1] ) { // KIO::MetaData metadata(int)
00029     int arg0;
00030     QDataStream arg( data, IO_ReadOnly );
00031     arg >> arg0;
00032     replyType = Observer_ftable[1][0]; 
00033     QDataStream _replyStream( replyData, IO_WriteOnly );
00034     _replyStream << metadata(arg0 );
00035     } else {
00036     return DCOPObject::process( fun, data, replyType, replyData );
00037     }
00038     return TRUE;
00039 }
00040 
00041 QCStringList Observer::interfaces()
00042 {
00043     QCStringList ifaces = DCOPObject::interfaces();
00044     ifaces += "Observer";
00045     return ifaces;
00046 }
00047 
00048 QCStringList Observer::functions()
00049 {
00050     QCStringList funcs = DCOPObject::functions();
00051     for ( int i = 0; Observer_ftable[i][2]; i++ ) {
00052     QCString func = Observer_ftable[i][0];
00053     func += ' ';
00054     func += Observer_ftable[i][2];
00055     funcs << func;
00056     }
00057     return funcs;
00058 }
00059 
00060 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:15:33 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001