kmail Library API Documentation

kmailIface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from kmailIface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./kmailIface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 
00015 static const int KMailIface_fhash = 29;
00016 static const char* const KMailIface_ftable[24][3] = {
00017     { "void", "checkMail()", "checkMail()" },
00018     { "QStringList", "accounts()", "accounts()" },
00019     { "void", "checkAccount(QString)", "checkAccount(QString account)" },
00020     { "void", "openReader()", "openReader()" },
00021     { "int", "openComposer(QString,QString,QString,QString,QString,int,KURL)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,int hidden,KURL messageFile)" },
00022     { "int", "openComposer(QString,QString,QString,QString,QString,int,KURL,KURL)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,int hidden,KURL messageFile,KURL attachURL)" },
00023     { "int", "openComposer(QString,QString,QString,QString,QString,int,KURL,KURL::List)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,int hidden,KURL messageFile,KURL::List attachURLs)" },
00024     { "int", "openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,int hidden,QString attachName,QCString attachCte,QCString attachData,QCString attachType,QCString attachSubType,QCString attachParamAttr,QString attachParamValue,QCString attachContDisp)" },
00025     { "int", "openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString,QCString)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,int hidden,QString attachName,QCString attachCte,QCString attachData,QCString attachType,QCString attachSubType,QCString attachParamAttr,QString attachParamValue,QCString attachContDisp,QCString attachCharset)" },
00026     { "DCOPRef", "openComposer(QString,QString,QString,QString,QString,bool)", "openComposer(QString to,QString cc,QString bcc,QString subject,QString body,bool hidden)" },
00027     { "int", "sendCertificate(QString,QByteArray)", "sendCertificate(QString to,QByteArray certData)" },
00028     { "void", "compactAllFolders()", "compactAllFolders()" },
00029     { "int", "dcopAddMessage(QString,QString)", "dcopAddMessage(QString foldername,QString messagefile)" },
00030     { "int", "dcopAddMessage(QString,KURL)", "dcopAddMessage(QString foldername,KURL messagefile)" },
00031     { "QStringList", "folderList()", "folderList()" },
00032     { "DCOPRef", "getFolder(QString)", "getFolder(QString vpath)" },
00033     { "void", "selectFolder(QString)", "selectFolder(QString folder)" },
00034     { "bool", "canQueryClose()", "canQueryClose()" },
00035     { "int", "timeOfLastMessageCountChange()", "timeOfLastMessageCountChange()" },
00036     { "DCOPRef", "newMessage()", "newMessage()" },
00037     { "bool", "showMail(Q_UINT32,QString)", "showMail(Q_UINT32 serialNumber,QString messageId)" },
00038     { "bool", "handleCommandLine(bool)", "handleCommandLine(bool)" },
00039     { "QString", "getFrom(Q_UINT32)", "getFrom(Q_UINT32 serialNumber)" },
00040     { 0, 0, 0 }
00041 };
00042 static const int KMailIface_ftable_hiddens[23] = {
00043     0,
00044     0,
00045     0,
00046     0,
00047     0,
00048     0,
00049     0,
00050     0,
00051     0,
00052     0,
00053     0,
00054     0,
00055     0,
00056     0,
00057     0,
00058     0,
00059     0,
00060     0,
00061     0,
00062     1,
00063     1,
00064     1,
00065     1,
00066 };
00067 
00068 bool KMailIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00069 {
00070     static QAsciiDict<int>* fdict = 0;
00071     if ( !fdict ) {
00072     fdict = new QAsciiDict<int>( KMailIface_fhash, true, false );
00073     for ( int i = 0; KMailIface_ftable[i][1]; i++ )
00074         fdict->insert( KMailIface_ftable[i][1],  new int( i ) );
00075     }
00076     int* fp = fdict->find( fun );
00077     switch ( fp?*fp:-1) {
00078     case 0: { // void checkMail()
00079     replyType = KMailIface_ftable[0][0]; 
00080     checkMail( );
00081     } break;
00082     case 1: { // QStringList accounts()
00083     replyType = KMailIface_ftable[1][0]; 
00084     QDataStream _replyStream( replyData, IO_WriteOnly );
00085     _replyStream << accounts( );
00086     } break;
00087     case 2: { // void checkAccount(QString)
00088     QString arg0;
00089     QDataStream arg( data, IO_ReadOnly );
00090     arg >> arg0;
00091     replyType = KMailIface_ftable[2][0]; 
00092     checkAccount(arg0 );
00093     } break;
00094     case 3: { // void openReader()
00095     replyType = KMailIface_ftable[3][0]; 
00096     openReader( );
00097     } break;
00098     case 4: { // int openComposer(QString,QString,QString,QString,QString,int,KURL)
00099     QString arg0;
00100     QString arg1;
00101     QString arg2;
00102     QString arg3;
00103     QString arg4;
00104     int arg5;
00105     KURL arg6;
00106     QDataStream arg( data, IO_ReadOnly );
00107     arg >> arg0;
00108     arg >> arg1;
00109     arg >> arg2;
00110     arg >> arg3;
00111     arg >> arg4;
00112     arg >> arg5;
00113     arg >> arg6;
00114     replyType = KMailIface_ftable[4][0]; 
00115     QDataStream _replyStream( replyData, IO_WriteOnly );
00116     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5, arg6 );
00117     } break;
00118     case 5: { // int openComposer(QString,QString,QString,QString,QString,int,KURL,KURL)
00119     QString arg0;
00120     QString arg1;
00121     QString arg2;
00122     QString arg3;
00123     QString arg4;
00124     int arg5;
00125     KURL arg6;
00126     KURL arg7;
00127     QDataStream arg( data, IO_ReadOnly );
00128     arg >> arg0;
00129     arg >> arg1;
00130     arg >> arg2;
00131     arg >> arg3;
00132     arg >> arg4;
00133     arg >> arg5;
00134     arg >> arg6;
00135     arg >> arg7;
00136     replyType = KMailIface_ftable[5][0]; 
00137     QDataStream _replyStream( replyData, IO_WriteOnly );
00138     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
00139     } break;
00140     case 6: { // int openComposer(QString,QString,QString,QString,QString,int,KURL,KURL::List)
00141     QString arg0;
00142     QString arg1;
00143     QString arg2;
00144     QString arg3;
00145     QString arg4;
00146     int arg5;
00147     KURL arg6;
00148     KURL::List arg7;
00149     QDataStream arg( data, IO_ReadOnly );
00150     arg >> arg0;
00151     arg >> arg1;
00152     arg >> arg2;
00153     arg >> arg3;
00154     arg >> arg4;
00155     arg >> arg5;
00156     arg >> arg6;
00157     arg >> arg7;
00158     replyType = KMailIface_ftable[6][0]; 
00159     QDataStream _replyStream( replyData, IO_WriteOnly );
00160     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
00161     } break;
00162     case 7: { // int openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString)
00163     QString arg0;
00164     QString arg1;
00165     QString arg2;
00166     QString arg3;
00167     QString arg4;
00168     int arg5;
00169     QString arg6;
00170     QCString arg7;
00171     QCString arg8;
00172     QCString arg9;
00173     QCString arg10;
00174     QCString arg11;
00175     QString arg12;
00176     QCString arg13;
00177     QDataStream arg( data, IO_ReadOnly );
00178     arg >> arg0;
00179     arg >> arg1;
00180     arg >> arg2;
00181     arg >> arg3;
00182     arg >> arg4;
00183     arg >> arg5;
00184     arg >> arg6;
00185     arg >> arg7;
00186     arg >> arg8;
00187     arg >> arg9;
00188     arg >> arg10;
00189     arg >> arg11;
00190     arg >> arg12;
00191     arg >> arg13;
00192     replyType = KMailIface_ftable[7][0]; 
00193     QDataStream _replyStream( replyData, IO_WriteOnly );
00194     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13 );
00195     } break;
00196     case 8: { // int openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString,QCString)
00197     QString arg0;
00198     QString arg1;
00199     QString arg2;
00200     QString arg3;
00201     QString arg4;
00202     int arg5;
00203     QString arg6;
00204     QCString arg7;
00205     QCString arg8;
00206     QCString arg9;
00207     QCString arg10;
00208     QCString arg11;
00209     QString arg12;
00210     QCString arg13;
00211     QCString arg14;
00212     QDataStream arg( data, IO_ReadOnly );
00213     arg >> arg0;
00214     arg >> arg1;
00215     arg >> arg2;
00216     arg >> arg3;
00217     arg >> arg4;
00218     arg >> arg5;
00219     arg >> arg6;
00220     arg >> arg7;
00221     arg >> arg8;
00222     arg >> arg9;
00223     arg >> arg10;
00224     arg >> arg11;
00225     arg >> arg12;
00226     arg >> arg13;
00227     arg >> arg14;
00228     replyType = KMailIface_ftable[8][0]; 
00229     QDataStream _replyStream( replyData, IO_WriteOnly );
00230     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14 );
00231     } break;
00232     case 9: { // DCOPRef openComposer(QString,QString,QString,QString,QString,bool)
00233     QString arg0;
00234     QString arg1;
00235     QString arg2;
00236     QString arg3;
00237     QString arg4;
00238     bool arg5;
00239     QDataStream arg( data, IO_ReadOnly );
00240     arg >> arg0;
00241     arg >> arg1;
00242     arg >> arg2;
00243     arg >> arg3;
00244     arg >> arg4;
00245     arg >> arg5;
00246     replyType = KMailIface_ftable[9][0]; 
00247     QDataStream _replyStream( replyData, IO_WriteOnly );
00248     _replyStream << openComposer(arg0, arg1, arg2, arg3, arg4, arg5 );
00249     } break;
00250     case 10: { // int sendCertificate(QString,QByteArray)
00251     QString arg0;
00252     QByteArray arg1;
00253     QDataStream arg( data, IO_ReadOnly );
00254     arg >> arg0;
00255     arg >> arg1;
00256     replyType = KMailIface_ftable[10][0]; 
00257     QDataStream _replyStream( replyData, IO_WriteOnly );
00258     _replyStream << sendCertificate(arg0, arg1 );
00259     } break;
00260     case 11: { // void compactAllFolders()
00261     replyType = KMailIface_ftable[11][0]; 
00262     compactAllFolders( );
00263     } break;
00264     case 12: { // int dcopAddMessage(QString,QString)
00265     QString arg0;
00266     QString arg1;
00267     QDataStream arg( data, IO_ReadOnly );
00268     arg >> arg0;
00269     arg >> arg1;
00270     replyType = KMailIface_ftable[12][0]; 
00271     QDataStream _replyStream( replyData, IO_WriteOnly );
00272     _replyStream << dcopAddMessage(arg0, arg1 );
00273     } break;
00274     case 13: { // int dcopAddMessage(QString,KURL)
00275     QString arg0;
00276     KURL arg1;
00277     QDataStream arg( data, IO_ReadOnly );
00278     arg >> arg0;
00279     arg >> arg1;
00280     replyType = KMailIface_ftable[13][0]; 
00281     QDataStream _replyStream( replyData, IO_WriteOnly );
00282     _replyStream << dcopAddMessage(arg0, arg1 );
00283     } break;
00284     case 14: { // QStringList folderList()
00285     replyType = KMailIface_ftable[14][0]; 
00286     QDataStream _replyStream( replyData, IO_WriteOnly );
00287     _replyStream << folderList( );
00288     } break;
00289     case 15: { // DCOPRef getFolder(QString)
00290     QString arg0;
00291     QDataStream arg( data, IO_ReadOnly );
00292     arg >> arg0;
00293     replyType = KMailIface_ftable[15][0]; 
00294     QDataStream _replyStream( replyData, IO_WriteOnly );
00295     _replyStream << getFolder(arg0 );
00296     } break;
00297     case 16: { // void selectFolder(QString)
00298     QString arg0;
00299     QDataStream arg( data, IO_ReadOnly );
00300     arg >> arg0;
00301     replyType = KMailIface_ftable[16][0]; 
00302     selectFolder(arg0 );
00303     } break;
00304     case 17: { // bool canQueryClose()
00305     replyType = KMailIface_ftable[17][0]; 
00306     QDataStream _replyStream( replyData, IO_WriteOnly );
00307     _replyStream << canQueryClose( );
00308     } break;
00309     case 18: { // int timeOfLastMessageCountChange()
00310     replyType = KMailIface_ftable[18][0]; 
00311     QDataStream _replyStream( replyData, IO_WriteOnly );
00312     _replyStream << timeOfLastMessageCountChange( );
00313     } break;
00314     case 19: { // DCOPRef newMessage()
00315     replyType = KMailIface_ftable[19][0]; 
00316     QDataStream _replyStream( replyData, IO_WriteOnly );
00317     _replyStream << newMessage( );
00318     } break;
00319     case 20: { // bool showMail(Q_UINT32,QString)
00320     Q_UINT32 arg0;
00321     QString arg1;
00322     QDataStream arg( data, IO_ReadOnly );
00323     arg >> arg0;
00324     arg >> arg1;
00325     replyType = KMailIface_ftable[20][0]; 
00326     QDataStream _replyStream( replyData, IO_WriteOnly );
00327     _replyStream << showMail(arg0, arg1 );
00328     } break;
00329     case 21: { // bool handleCommandLine(bool)
00330     bool arg0;
00331     QDataStream arg( data, IO_ReadOnly );
00332     arg >> arg0;
00333     replyType = KMailIface_ftable[21][0]; 
00334     QDataStream _replyStream( replyData, IO_WriteOnly );
00335     _replyStream << handleCommandLine(arg0 );
00336     } break;
00337     case 22: { // QString getFrom(Q_UINT32)
00338     Q_UINT32 arg0;
00339     QDataStream arg( data, IO_ReadOnly );
00340     arg >> arg0;
00341     replyType = KMailIface_ftable[22][0]; 
00342     QDataStream _replyStream( replyData, IO_WriteOnly );
00343     _replyStream << getFrom(arg0 );
00344     } break;
00345     default: 
00346     return DCOPObject::process( fun, data, replyType, replyData );
00347     }
00348     return true;
00349 }
00350 
00351 QCStringList KMailIface::interfaces()
00352 {
00353     QCStringList ifaces = DCOPObject::interfaces();
00354     ifaces += "KMailIface";
00355     return ifaces;
00356 }
00357 
00358 QCStringList KMailIface::functions()
00359 {
00360     QCStringList funcs = DCOPObject::functions();
00361     for ( int i = 0; KMailIface_ftable[i][2]; i++ ) {
00362     if (KMailIface_ftable_hiddens[i])
00363         continue;
00364     QCString func = KMailIface_ftable[i][0];
00365     func += ' ';
00366     func += KMailIface_ftable[i][2];
00367     funcs << func;
00368     }
00369     return funcs;
00370 }
00371 
00372 void KMailIface::unreadCountChanged()
00373 {
00374     QByteArray data;
00375     emitDCOPSignal( "unreadCountChanged()", data );
00376 }
00377 
00378 void KMailIface::unreadCountChanged( const QString& arg0, int arg1 )
00379 {
00380     QByteArray data;
00381     QDataStream arg( data, IO_WriteOnly );
00382     arg << arg0;
00383     arg << arg1;
00384     emitDCOPSignal( "unreadCountChanged(QString,int)", data );
00385 }
00386 
00387 
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:48:24 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003