00001
00002
00003
00004
00005
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
static const int DocumentInfoDCOPInterface_ftable_hiddens[4] = {
00023 0,
00024 0,
00025 0,
00026 0,
00027 };
00028
00029
bool DocumentInfoDCOPInterface::process(
const QCString &fun,
const QByteArray &data,
QCString& replyType,
QByteArray &replyData)
00030 {
00031
if ( fun == DocumentInfoDCOPInterface_ftable[0][1] ) {
00032 replyType = DocumentInfoDCOPInterface_ftable[0][0];
00033
QDataStream _replyStream( replyData, IO_WriteOnly );
00034 _replyStream << mimeType( );
00035 }
else if ( fun == DocumentInfoDCOPInterface_ftable[1][1] ) {
00036 replyType = DocumentInfoDCOPInterface_ftable[1][0];
00037
QDataStream _replyStream( replyData, IO_WriteOnly );
00038 _replyStream << fileSize( );
00039 }
else if ( fun == DocumentInfoDCOPInterface_ftable[2][1] ) {
00040 replyType = DocumentInfoDCOPInterface_ftable[2][0];
00041
QDataStream _replyStream( replyData, IO_WriteOnly );
00042 _replyStream << niceFileSize( );
00043 }
else if ( fun == DocumentInfoDCOPInterface_ftable[3][1] ) {
00044 replyType = DocumentInfoDCOPInterface_ftable[3][0];
00045
QDataStream _replyStream( replyData, IO_WriteOnly );
00046 _replyStream << documentInfoInterfaceNumber( );
00047 }
else {
00048
return DCOPObject::process( fun, data, replyType, replyData );
00049 }
00050
return true;
00051 }
00052
00053 QCStringList
DocumentInfoDCOPInterface::interfaces()
00054 {
00055 QCStringList ifaces =
DCOPObject::interfaces();
00056 ifaces +=
"KTextEditor::DocumentInfoDCOPInterface";
00057
return ifaces;
00058 }
00059
00060 QCStringList
DocumentInfoDCOPInterface::functions()
00061 {
00062 QCStringList funcs =
DCOPObject::functions();
00063
for (
int i = 0; DocumentInfoDCOPInterface_ftable[i][2]; i++ ) {
00064
if (DocumentInfoDCOPInterface_ftable_hiddens[i])
00065
continue;
00066
QCString func = DocumentInfoDCOPInterface_ftable[i][0];
00067 func +=
' ';
00068 func += DocumentInfoDCOPInterface_ftable[i][2];
00069 funcs << func;
00070 }
00071
return funcs;
00072 }
00073
00074 }
00075