00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./mailcomposerIface.h"
00010
00011 #include <kdatastream.h>
00012
00013
00014 static const char* const MailComposerIface_ftable[5][3] = {
00015 { "void", "send(int)", "send(int how)" },
00016 { "void", "addAttachment(KURL,QString)", "addAttachment(KURL url,QString comment)" },
00017 { "void", "setBody(QString)", "setBody(QString body)" },
00018 { "void", "addAttachment(QString,QCString,QByteArray,QCString,QCString,QCString,QString,QCString)", "addAttachment(QString name,QCString cte,QByteArray data,QCString type,QCString subType,QCString paramAttr,QString paramValue,QCString contDisp)" },
00019 { 0, 0, 0 }
00020 };
00021 static const int MailComposerIface_ftable_hiddens[4] = {
00022 0,
00023 0,
00024 0,
00025 0,
00026 };
00027
00028 bool MailComposerIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00029 {
00030 if ( fun == MailComposerIface_ftable[0][1] ) {
00031 int arg0;
00032 QDataStream arg( data, IO_ReadOnly );
00033 arg >> arg0;
00034 replyType = MailComposerIface_ftable[0][0];
00035 send(arg0 );
00036 } else if ( fun == MailComposerIface_ftable[1][1] ) {
00037 KURL arg0;
00038 QString arg1;
00039 QDataStream arg( data, IO_ReadOnly );
00040 arg >> arg0;
00041 arg >> arg1;
00042 replyType = MailComposerIface_ftable[1][0];
00043 addAttachment(arg0, arg1 );
00044 } else if ( fun == MailComposerIface_ftable[2][1] ) {
00045 QString arg0;
00046 QDataStream arg( data, IO_ReadOnly );
00047 arg >> arg0;
00048 replyType = MailComposerIface_ftable[2][0];
00049 setBody(arg0 );
00050 } else if ( fun == MailComposerIface_ftable[3][1] ) {
00051 QString arg0;
00052 QCString arg1;
00053 QByteArray arg2;
00054 QCString arg3;
00055 QCString arg4;
00056 QCString arg5;
00057 QString arg6;
00058 QCString arg7;
00059 QDataStream arg( data, IO_ReadOnly );
00060 arg >> arg0;
00061 arg >> arg1;
00062 arg >> arg2;
00063 arg >> arg3;
00064 arg >> arg4;
00065 arg >> arg5;
00066 arg >> arg6;
00067 arg >> arg7;
00068 replyType = MailComposerIface_ftable[3][0];
00069 addAttachment(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
00070 } else {
00071 return DCOPObject::process( fun, data, replyType, replyData );
00072 }
00073 return true;
00074 }
00075
00076 QCStringList MailComposerIface::interfaces()
00077 {
00078 QCStringList ifaces = DCOPObject::interfaces();
00079 ifaces += "MailComposerIface";
00080 return ifaces;
00081 }
00082
00083 QCStringList MailComposerIface::functions()
00084 {
00085 QCStringList funcs = DCOPObject::functions();
00086 for ( int i = 0; MailComposerIface_ftable[i][2]; i++ ) {
00087 if (MailComposerIface_ftable_hiddens[i])
00088 continue;
00089 QCString func = MailComposerIface_ftable[i][0];
00090 func += ' ';
00091 func += MailComposerIface_ftable[i][2];
00092 funcs << func;
00093 }
00094 return funcs;
00095 }
00096
00097