encodingdcopinterface_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./encodingdcopinterface.h"
00010
00011 #include <kdatastream.h>
00012
00013 namespace KTextEditor {
00014
00015 static const char* const EncodingDCOPInterface_ftable[4][3] = {
00016 { "uint", "encodingInterfaceNumber()", "encodingInterfaceNumber()" },
00017 { "void", "setEncoding(QString)", "setEncoding(QString e)" },
00018 { "QString", "encoding()", "encoding()" },
00019 { 0, 0, 0 }
00020 };
00021 static const int EncodingDCOPInterface_ftable_hiddens[3] = {
00022 0,
00023 0,
00024 0,
00025 };
00026
00027 bool EncodingDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00028 {
00029 if ( fun == EncodingDCOPInterface_ftable[0][1] ) {
00030 replyType = EncodingDCOPInterface_ftable[0][0];
00031 QDataStream _replyStream( replyData, IO_WriteOnly );
00032 _replyStream << encodingInterfaceNumber( );
00033 } else if ( fun == EncodingDCOPInterface_ftable[1][1] ) {
00034 QString arg0;
00035 QDataStream arg( data, IO_ReadOnly );
00036 arg >> arg0;
00037 replyType = EncodingDCOPInterface_ftable[1][0];
00038 setEncoding(arg0 );
00039 } else if ( fun == EncodingDCOPInterface_ftable[2][1] ) {
00040 replyType = EncodingDCOPInterface_ftable[2][0];
00041 QDataStream _replyStream( replyData, IO_WriteOnly );
00042 _replyStream << encoding( );
00043 } else {
00044 return DCOPObject::process( fun, data, replyType, replyData );
00045 }
00046 return true;
00047 }
00048
00049 QCStringList EncodingDCOPInterface::interfaces()
00050 {
00051 QCStringList ifaces = DCOPObject::interfaces();
00052 ifaces += "KTextEditor::EncodingDCOPInterface";
00053 return ifaces;
00054 }
00055
00056 QCStringList EncodingDCOPInterface::functions()
00057 {
00058 QCStringList funcs = DCOPObject::functions();
00059 for ( int i = 0; EncodingDCOPInterface_ftable[i][2]; i++ ) {
00060 if (EncodingDCOPInterface_ftable_hiddens[i])
00061 continue;
00062 QCString func = EncodingDCOPInterface_ftable[i][0];
00063 func += ' ';
00064 func += EncodingDCOPInterface_ftable[i][2];
00065 funcs << func;
00066 }
00067 return funcs;
00068 }
00069
00070 }
00071
This file is part of the documentation for interfaces Library Version 3.2.3.