interfaces Library API Documentation

printdcopinterface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from printdcopinterface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./printdcopinterface.h"
00010 
00011 #include <kdatastream.h>
00012 
00013 namespace KTextEditor {
00014 
00015 static const char* const PrintDCOPInterface_ftable[4][3] = {
00016     { "uint", "printInterfaceNumber()", "printInterfaceNumber()" },
00017     { "bool", "printDialog()", "printDialog()" },
00018     { "bool", "print()", "print()" },
00019     { 0, 0, 0 }
00020 };
00021 
00022 bool PrintDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00023 {
00024     if ( fun == PrintDCOPInterface_ftable[0][1] ) { // uint printInterfaceNumber()
00025     replyType = PrintDCOPInterface_ftable[0][0]; 
00026     QDataStream _replyStream( replyData, IO_WriteOnly );
00027     _replyStream << printInterfaceNumber( );
00028     } else if ( fun == PrintDCOPInterface_ftable[1][1] ) { // bool printDialog()
00029     replyType = PrintDCOPInterface_ftable[1][0]; 
00030     QDataStream _replyStream( replyData, IO_WriteOnly );
00031     _replyStream << printDialog( );
00032     } else if ( fun == PrintDCOPInterface_ftable[2][1] ) { // bool print()
00033     replyType = PrintDCOPInterface_ftable[2][0]; 
00034     QDataStream _replyStream( replyData, IO_WriteOnly );
00035     _replyStream << print( );
00036     } else {
00037     return DCOPObject::process( fun, data, replyType, replyData );
00038     }
00039     return TRUE;
00040 }
00041 
00042 QCStringList PrintDCOPInterface::interfaces()
00043 {
00044     QCStringList ifaces = DCOPObject::interfaces();
00045     ifaces += "KTextEditor::PrintDCOPInterface";
00046     return ifaces;
00047 }
00048 
00049 QCStringList PrintDCOPInterface::functions()
00050 {
00051     QCStringList funcs = DCOPObject::functions();
00052     for ( int i = 0; PrintDCOPInterface_ftable[i][2]; i++ ) {
00053     QCString func = PrintDCOPInterface_ftable[i][0];
00054     func += ' ';
00055     func += PrintDCOPInterface_ftable[i][2];
00056     funcs << func;
00057     }
00058     return funcs;
00059 }
00060 
00061 } // namespace
00062 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:15 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001