kappdcopiface_skel.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./kappdcopiface.h"
00010
00011 #include <kdatastream.h>
00012
00013
00014 static const char* const KAppDCOPInterface_ftable[7][3] = {
00015 { "void", "disableSessionManagement()", "disableSessionManagement()" },
00016 { "QCString", "startupId()", "startupId()" },
00017 { "QCString", "caption()", "caption()" },
00018 { "void", "quit()", "quit()" },
00019 { "void", "reparseConfiguration()", "reparseConfiguration()" },
00020 { "void", "updateUserTimestamp(ulong)", "updateUserTimestamp(ulong time)" },
00021 { 0, 0, 0 }
00022 };
00023 static const int KAppDCOPInterface_ftable_hiddens[6] = {
00024 0,
00025 0,
00026 0,
00027 0,
00028 0,
00029 0,
00030 };
00031
00032 bool KAppDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00033 {
00034 if ( fun == KAppDCOPInterface_ftable[0][1] ) {
00035 replyType = KAppDCOPInterface_ftable[0][0];
00036 disableSessionManagement( );
00037 } else if ( fun == KAppDCOPInterface_ftable[1][1] ) {
00038 replyType = KAppDCOPInterface_ftable[1][0];
00039 QDataStream _replyStream( replyData, IO_WriteOnly );
00040 _replyStream << startupId( );
00041 } else if ( fun == KAppDCOPInterface_ftable[2][1] ) {
00042 replyType = KAppDCOPInterface_ftable[2][0];
00043 QDataStream _replyStream( replyData, IO_WriteOnly );
00044 _replyStream << caption( );
00045 } else if ( fun == KAppDCOPInterface_ftable[3][1] ) {
00046 replyType = KAppDCOPInterface_ftable[3][0];
00047 quit( );
00048 } else if ( fun == KAppDCOPInterface_ftable[4][1] ) {
00049 replyType = KAppDCOPInterface_ftable[4][0];
00050 reparseConfiguration( );
00051 } else if ( fun == KAppDCOPInterface_ftable[5][1] ) {
00052 ulong arg0;
00053 QDataStream arg( data, IO_ReadOnly );
00054 if (arg.atEnd()) return false;
00055 arg >> arg0;
00056 replyType = KAppDCOPInterface_ftable[5][0];
00057 updateUserTimestamp(arg0 );
00058 } else {
00059 return DCOPObject::process( fun, data, replyType, replyData );
00060 }
00061 return true;
00062 }
00063
00064 QCStringList KAppDCOPInterface::interfaces()
00065 {
00066 QCStringList ifaces = DCOPObject::interfaces();
00067 ifaces += "KAppDCOPInterface";
00068 return ifaces;
00069 }
00070
00071 QCStringList KAppDCOPInterface::functions()
00072 {
00073 QCStringList funcs = DCOPObject::functions();
00074 for ( int i = 0; KAppDCOPInterface_ftable[i][2]; i++ ) {
00075 if (KAppDCOPInterface_ftable_hiddens[i])
00076 continue;
00077 QCString func = KAppDCOPInterface_ftable[i][0];
00078 func += ' ';
00079 func += KAppDCOPInterface_ftable[i][2];
00080 funcs << func;
00081 }
00082 return funcs;
00083 }
00084
00085
|