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 static const int PrintDCOPInterface_ftable_hiddens[3] = { 00022 0, 00023 0, 00024 0, 00025 }; 00026 00027 bool PrintDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData) 00028 { 00029 if ( fun == PrintDCOPInterface_ftable[0][1] ) { // uint printInterfaceNumber() 00030 replyType = PrintDCOPInterface_ftable[0][0]; 00031 QDataStream _replyStream( replyData, IO_WriteOnly ); 00032 _replyStream << printInterfaceNumber( ); 00033 } else if ( fun == PrintDCOPInterface_ftable[1][1] ) { // bool printDialog() 00034 replyType = PrintDCOPInterface_ftable[1][0]; 00035 QDataStream _replyStream( replyData, IO_WriteOnly ); 00036 _replyStream << printDialog( ); 00037 } else if ( fun == PrintDCOPInterface_ftable[2][1] ) { // bool print() 00038 replyType = PrintDCOPInterface_ftable[2][0]; 00039 QDataStream _replyStream( replyData, IO_WriteOnly ); 00040 _replyStream << print( ); 00041 } else { 00042 return DCOPObject::process( fun, data, replyType, replyData ); 00043 } 00044 return true; 00045 } 00046 00047 QCStringList PrintDCOPInterface::interfaces() 00048 { 00049 QCStringList ifaces = DCOPObject::interfaces(); 00050 ifaces += "KTextEditor::PrintDCOPInterface"; 00051 return ifaces; 00052 } 00053 00054 QCStringList PrintDCOPInterface::functions() 00055 { 00056 QCStringList funcs = DCOPObject::functions(); 00057 for ( int i = 0; PrintDCOPInterface_ftable[i][2]; i++ ) { 00058 if (PrintDCOPInterface_ftable_hiddens[i]) 00059 continue; 00060 QCString func = PrintDCOPInterface_ftable[i][0]; 00061 func += ' '; 00062 func += PrintDCOPInterface_ftable[i][2]; 00063 funcs << func; 00064 } 00065 return funcs; 00066 } 00067 00068 } // namespace 00069
KDE Logo
This file is part of the documentation for interfaces Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:15:30 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003