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 if (arg.atEnd()) return false;
00034 arg >> arg0;
00035 replyType = MailComposerIface_ftable[0][0];
00036 send(arg0 );
00037 } else if ( fun == MailComposerIface_ftable[1][1] ) {
00038 KURL arg0;
00039 QString arg1;
00040 QDataStream arg( data, IO_ReadOnly );
00041 if (arg.atEnd()) return false;
00042 arg >> arg0;
00043 if (arg.atEnd()) return false;
00044 arg >> arg1;
00045 replyType = MailComposerIface_ftable[1][0];
00046 addAttachment(arg0, arg1 );
00047 } else if ( fun == MailComposerIface_ftable[2][1] ) {
00048 QString arg0;
00049 QDataStream arg( data, IO_ReadOnly );
00050 if (arg.atEnd()) return false;
00051 arg >> arg0;
00052 replyType = MailComposerIface_ftable[2][0];
00053 setBody(arg0 );
00054 } else if ( fun == MailComposerIface_ftable[3][1] ) {
00055 QString arg0;
00056 QCString arg1;
00057 QByteArray arg2;
00058 QCString arg3;
00059 QCString arg4;
00060 QCString arg5;
00061 QString arg6;
00062 QCString arg7;
00063 QDataStream arg( data, IO_ReadOnly );
00064 if (arg.atEnd()) return false;
00065 arg >> arg0;
00066 if (arg.atEnd()) return false;
00067 arg >> arg1;
00068 if (arg.atEnd()) return false;
00069 arg >> arg2;
00070 if (arg.atEnd()) return false;
00071 arg >> arg3;
00072 if (arg.atEnd()) return false;
00073 arg >> arg4;
00074 if (arg.atEnd()) return false;
00075 arg >> arg5;
00076 if (arg.atEnd()) return false;
00077 arg >> arg6;
00078 if (arg.atEnd()) return false;
00079 arg >> arg7;
00080 replyType = MailComposerIface_ftable[3][0];
00081 addAttachment(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
00082 } else {
00083 return DCOPObject::process( fun, data, replyType, replyData );
00084 }
00085 return true;
00086 }
00087
00088 QCStringList MailComposerIface::interfaces()
00089 {
00090 QCStringList ifaces = DCOPObject::interfaces();
00091 ifaces += "MailComposerIface";
00092 return ifaces;
00093 }
00094
00095 QCStringList MailComposerIface::functions()
00096 {
00097 QCStringList funcs = DCOPObject::functions();
00098 for ( int i = 0; MailComposerIface_ftable[i][2]; i++ ) {
00099 if (MailComposerIface_ftable_hiddens[i])
00100 continue;
00101 QCString func = MailComposerIface_ftable[i][0];
00102 func += ' ';
00103 func += MailComposerIface_ftable[i][2];
00104 funcs << func;
00105 }
00106 return funcs;
00107 }
00108
00109