encodingdcopinterface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton generated by dcopidl2cpp from encodingdcopinterface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
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] ) { // uint encodingInterfaceNumber()
00030     replyType = EncodingDCOPInterface_ftable[0][0]; 
00031     QDataStream _replyStream( replyData, IO_WriteOnly );
00032     _replyStream << encodingInterfaceNumber( );
00033     } else if ( fun == EncodingDCOPInterface_ftable[1][1] ) { // void setEncoding(QString)
00034     QString arg0;
00035     QDataStream arg( data, IO_ReadOnly );
00036     if (arg.atEnd()) return false;
00037     arg >> arg0;
00038     replyType = EncodingDCOPInterface_ftable[1][0]; 
00039     setEncoding(arg0 );
00040     } else if ( fun == EncodingDCOPInterface_ftable[2][1] ) { // QString encoding()
00041     replyType = EncodingDCOPInterface_ftable[2][0]; 
00042     QDataStream _replyStream( replyData, IO_WriteOnly );
00043     _replyStream << encoding( );
00044     } else {
00045     return DCOPObject::process( fun, data, replyType, replyData );
00046     }
00047     return true;
00048 }
00049 
00050 QCStringList EncodingDCOPInterface::interfaces()
00051 {
00052     QCStringList ifaces = DCOPObject::interfaces();
00053     ifaces += "KTextEditor::EncodingDCOPInterface";
00054     return ifaces;
00055 }
00056 
00057 QCStringList EncodingDCOPInterface::functions()
00058 {
00059     QCStringList funcs = DCOPObject::functions();
00060     for ( int i = 0; EncodingDCOPInterface_ftable[i][2]; i++ ) {
00061     if (EncodingDCOPInterface_ftable_hiddens[i])
00062         continue;
00063     QCString func = EncodingDCOPInterface_ftable[i][0];
00064     func += ' ';
00065     func += EncodingDCOPInterface_ftable[i][2];
00066     funcs << func;
00067     }
00068     return funcs;
00069 }
00070 
00071 } // namespace
00072 
KDE Home | KDE Accessibility Home | Description of Access Keys