blockselectiondcopinterface_skel.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./blockselectiondcopinterface.h"
00010
00011 #include <kdatastream.h>
00012
00013 namespace KTextEditor {
00014
00015 static const char* const BlockSelectionDCOPInterface_ftable[5][3] = {
00016 { "uint", "blockSelectionInterfaceNumber()", "blockSelectionInterfaceNumber()" },
00017 { "bool", "blockSelectionMode()", "blockSelectionMode()" },
00018 { "bool", "setBlockSelectionMode(bool)", "setBlockSelectionMode(bool on)" },
00019 { "bool", "toggleBlockSelectionMode()", "toggleBlockSelectionMode()" },
00020 { 0, 0, 0 }
00021 };
00022 static const int BlockSelectionDCOPInterface_ftable_hiddens[4] = {
00023 0,
00024 0,
00025 0,
00026 0,
00027 };
00028
00029 bool BlockSelectionDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00030 {
00031 if ( fun == BlockSelectionDCOPInterface_ftable[0][1] ) {
00032 replyType = BlockSelectionDCOPInterface_ftable[0][0];
00033 QDataStream _replyStream( replyData, IO_WriteOnly );
00034 _replyStream << blockSelectionInterfaceNumber( );
00035 } else if ( fun == BlockSelectionDCOPInterface_ftable[1][1] ) {
00036 replyType = BlockSelectionDCOPInterface_ftable[1][0];
00037 QDataStream _replyStream( replyData, IO_WriteOnly );
00038 _replyStream << blockSelectionMode( );
00039 } else if ( fun == BlockSelectionDCOPInterface_ftable[2][1] ) {
00040 bool arg0;
00041 QDataStream arg( data, IO_ReadOnly );
00042 if (arg.atEnd()) return false;
00043 arg >> arg0;
00044 replyType = BlockSelectionDCOPInterface_ftable[2][0];
00045 QDataStream _replyStream( replyData, IO_WriteOnly );
00046 _replyStream << setBlockSelectionMode(arg0 );
00047 } else if ( fun == BlockSelectionDCOPInterface_ftable[3][1] ) {
00048 replyType = BlockSelectionDCOPInterface_ftable[3][0];
00049 QDataStream _replyStream( replyData, IO_WriteOnly );
00050 _replyStream << toggleBlockSelectionMode( );
00051 } else {
00052 return DCOPObject::process( fun, data, replyType, replyData );
00053 }
00054 return true;
00055 }
00056
00057 QCStringList BlockSelectionDCOPInterface::interfaces()
00058 {
00059 QCStringList ifaces = DCOPObject::interfaces();
00060 ifaces += "KTextEditor::BlockSelectionDCOPInterface";
00061 return ifaces;
00062 }
00063
00064 QCStringList BlockSelectionDCOPInterface::functions()
00065 {
00066 QCStringList funcs = DCOPObject::functions();
00067 for ( int i = 0; BlockSelectionDCOPInterface_ftable[i][2]; i++ ) {
00068 if (BlockSelectionDCOPInterface_ftable_hiddens[i])
00069 continue;
00070 QCString func = BlockSelectionDCOPInterface_ftable[i][0];
00071 func += ' ';
00072 func += BlockSelectionDCOPInterface_ftable[i][2];
00073 funcs << func;
00074 }
00075 return funcs;
00076 }
00077
00078 }
00079
|