observer_skel.cpp
00001 
00002 
00003 
00004 
00005 
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 static const int Observer_ftable_hiddens[2] = {
00020     0,
00021     0,
00022 };
00023 
00024 bool Observer::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00025 {
00026     if ( fun == Observer_ftable[0][1] ) { 
00027     int arg0;
00028     QDataStream arg( data, IO_ReadOnly );
00029     arg >> arg0;
00030     replyType = Observer_ftable[0][0]; 
00031     killJob(arg0 );
00032     } else if ( fun == Observer_ftable[1][1] ) { 
00033     int arg0;
00034     QDataStream arg( data, IO_ReadOnly );
00035     arg >> arg0;
00036     replyType = Observer_ftable[1][0]; 
00037     QDataStream _replyStream( replyData, IO_WriteOnly );
00038     _replyStream << metadata(arg0 );
00039     } else {
00040     return DCOPObject::process( fun, data, replyType, replyData );
00041     }
00042     return true;
00043 }
00044 
00045 QCStringList Observer::interfaces()
00046 {
00047     QCStringList ifaces = DCOPObject::interfaces();
00048     ifaces += "Observer";
00049     return ifaces;
00050 }
00051 
00052 QCStringList Observer::functions()
00053 {
00054     QCStringList funcs = DCOPObject::functions();
00055     for ( int i = 0; Observer_ftable[i][2]; i++ ) {
00056     if (Observer_ftable_hiddens[i])
00057         continue;
00058     QCString func = Observer_ftable[i][0];
00059     func += ' ';
00060     func += Observer_ftable[i][2];
00061     funcs << func;
00062     }
00063     return funcs;
00064 }
00065 
00066 
 
This file is part of the documentation for kio Library Version 3.2.0.