proxyscout_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./proxyscout.h"
00010
00011 #include <kdatastream.h>
00012
00013 namespace KPAC {
00014
00015 static const char* const ProxyScout_ftable[4][3] = {
00016 { "QString", "proxyForURL(KURL)", "proxyForURL(KURL url)" },
00017 { "ASYNC", "blackListProxy(QString)", "blackListProxy(QString proxy)" },
00018 { "ASYNC", "reset()", "reset()" },
00019 { 0, 0, 0 }
00020 };
00021 static const int ProxyScout_ftable_hiddens[3] = {
00022 0,
00023 0,
00024 0,
00025 };
00026
00027 bool ProxyScout::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00028 {
00029 if ( fun == ProxyScout_ftable[0][1] ) {
00030 KURL arg0;
00031 QDataStream arg( data, IO_ReadOnly );
00032 if (arg.atEnd()) return false;
00033 arg >> arg0;
00034 replyType = ProxyScout_ftable[0][0];
00035 QDataStream _replyStream( replyData, IO_WriteOnly );
00036 _replyStream << proxyForURL(arg0 );
00037 } else if ( fun == ProxyScout_ftable[1][1] ) {
00038 QString arg0;
00039 QDataStream arg( data, IO_ReadOnly );
00040 if (arg.atEnd()) return false;
00041 arg >> arg0;
00042 replyType = ProxyScout_ftable[1][0];
00043 blackListProxy(arg0 );
00044 } else if ( fun == ProxyScout_ftable[2][1] ) {
00045 replyType = ProxyScout_ftable[2][0];
00046 reset( );
00047 } else {
00048 return KDEDModule::process( fun, data, replyType, replyData );
00049 }
00050 return true;
00051 }
00052
00053 QCStringList ProxyScout::interfaces()
00054 {
00055 QCStringList ifaces = KDEDModule::interfaces();
00056 ifaces += "KPAC::ProxyScout";
00057 return ifaces;
00058 }
00059
00060 QCStringList ProxyScout::functions()
00061 {
00062 QCStringList funcs = KDEDModule::functions();
00063 for ( int i = 0; ProxyScout_ftable[i][2]; i++ ) {
00064 if (ProxyScout_ftable_hiddens[i])
00065 continue;
00066 QCString func = ProxyScout_ftable[i][0];
00067 func += ' ';
00068 func += ProxyScout_ftable[i][2];
00069 funcs << func;
00070 }
00071 return funcs;
00072 }
00073
00074 }
00075
This file is part of the documentation for kio Library Version 3.4.1.