interfaces Library API Documentation

selectiondcopinterface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from selectiondcopinterface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./selectiondcopinterface.h"
00010 
00011 #include <kdatastream.h>
00012 
00013 namespace KTextEditor {
00014 
00015 static const char* const SelectionDCOPInterface_ftable[7][3] = {
00016     { "bool", "setSelection(uint,uint,uint,uint)", "setSelection(uint startLine,uint startCol,uint endLine,uint endCol)" },
00017     { "bool", "clearSelection()", "clearSelection()" },
00018     { "bool", "hasSelection()", "hasSelection()" },
00019     { "QString", "selection()", "selection()" },
00020     { "bool", "removeSelectedText()", "removeSelectedText()" },
00021     { "bool", "selectAll()", "selectAll()" },
00022     { 0, 0, 0 }
00023 };
00024 
00025 bool SelectionDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00026 {
00027     if ( fun == SelectionDCOPInterface_ftable[0][1] ) { // bool setSelection(uint,uint,uint,uint)
00028     uint arg0;
00029     uint arg1;
00030     uint arg2;
00031     uint arg3;
00032     QDataStream arg( data, IO_ReadOnly );
00033     arg >> arg0;
00034     arg >> arg1;
00035     arg >> arg2;
00036     arg >> arg3;
00037     replyType = SelectionDCOPInterface_ftable[0][0]; 
00038     QDataStream _replyStream( replyData, IO_WriteOnly );
00039     _replyStream << setSelection(arg0, arg1, arg2, arg3 );
00040     } else if ( fun == SelectionDCOPInterface_ftable[1][1] ) { // bool clearSelection()
00041     replyType = SelectionDCOPInterface_ftable[1][0]; 
00042     QDataStream _replyStream( replyData, IO_WriteOnly );
00043     _replyStream << clearSelection( );
00044     } else if ( fun == SelectionDCOPInterface_ftable[2][1] ) { // bool hasSelection()
00045     replyType = SelectionDCOPInterface_ftable[2][0]; 
00046     QDataStream _replyStream( replyData, IO_WriteOnly );
00047     _replyStream << hasSelection( );
00048     } else if ( fun == SelectionDCOPInterface_ftable[3][1] ) { // QString selection()
00049     replyType = SelectionDCOPInterface_ftable[3][0]; 
00050     QDataStream _replyStream( replyData, IO_WriteOnly );
00051     _replyStream << selection( );
00052     } else if ( fun == SelectionDCOPInterface_ftable[4][1] ) { // bool removeSelectedText()
00053     replyType = SelectionDCOPInterface_ftable[4][0]; 
00054     QDataStream _replyStream( replyData, IO_WriteOnly );
00055     _replyStream << removeSelectedText( );
00056     } else if ( fun == SelectionDCOPInterface_ftable[5][1] ) { // bool selectAll()
00057     replyType = SelectionDCOPInterface_ftable[5][0]; 
00058     QDataStream _replyStream( replyData, IO_WriteOnly );
00059     _replyStream << selectAll( );
00060     } else {
00061     return DCOPObject::process( fun, data, replyType, replyData );
00062     }
00063     return TRUE;
00064 }
00065 
00066 QCStringList SelectionDCOPInterface::interfaces()
00067 {
00068     QCStringList ifaces = DCOPObject::interfaces();
00069     ifaces += "KTextEditor::SelectionDCOPInterface";
00070     return ifaces;
00071 }
00072 
00073 QCStringList SelectionDCOPInterface::functions()
00074 {
00075     QCStringList funcs = DCOPObject::functions();
00076     for ( int i = 0; SelectionDCOPInterface_ftable[i][2]; i++ ) {
00077     QCString func = SelectionDCOPInterface_ftable[i][0];
00078     func += ' ';
00079     func += SelectionDCOPInterface_ftable[i][2];
00080     funcs << func;
00081     }
00082     return funcs;
00083 }
00084 
00085 } // namespace
00086 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:16:14 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001