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 arg >> arg0;
00033 replyType = ProxyScout_ftable[0][0];
00034 QDataStream _replyStream( replyData, IO_WriteOnly );
00035 _replyStream << proxyForURL(arg0 );
00036 } else if ( fun == ProxyScout_ftable[1][1] ) {
00037 QString arg0;
00038 QDataStream arg( data, IO_ReadOnly );
00039 arg >> arg0;
00040 replyType = ProxyScout_ftable[1][0];
00041 blackListProxy(arg0 );
00042 } else if ( fun == ProxyScout_ftable[2][1] ) {
00043 replyType = ProxyScout_ftable[2][0];
00044 reset( );
00045 } else {
00046 return KDEDModule::process( fun, data, replyType, replyData );
00047 }
00048 return true;
00049 }
00050
00051 QCStringList ProxyScout::interfaces()
00052 {
00053 QCStringList ifaces = KDEDModule::interfaces();
00054 ifaces += "KPAC::ProxyScout";
00055 return ifaces;
00056 }
00057
00058 QCStringList ProxyScout::functions()
00059 {
00060 QCStringList funcs = KDEDModule::functions();
00061 for ( int i = 0; ProxyScout_ftable[i][2]; i++ ) {
00062 if (ProxyScout_ftable_hiddens[i])
00063 continue;
00064 QCString func = ProxyScout_ftable[i][0];
00065 func += ' ';
00066 func += ProxyScout_ftable[i][2];
00067 funcs << func;
00068 }
00069 return funcs;
00070 }
00071
00072 }
00073
This file is part of the documentation for kio Library Version 3.3.90.