interfaces Library API Documentation

documentdcopinfo_skel.cpp

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