00001
00002
00003
00004
00005
00006
00007
00008
00009
#include "./kwallet.h"
00010
00011
#include <kdatastream.h>
00012
00013
namespace KWallet {
00014
00015
static const char*
const Wallet_ftable[6][3] = {
00016 {
"ASYNC",
"slotWalletClosed(int)",
"slotWalletClosed(int handle)" },
00017 {
"ASYNC",
"slotFolderUpdated(QString,QString)",
"slotFolderUpdated(QString wallet,QString folder)" },
00018 {
"ASYNC",
"slotFolderListUpdated(QString)",
"slotFolderListUpdated(QString wallet)" },
00019 {
"ASYNC",
"slotApplicationDisconnected(QString,QCString)",
"slotApplicationDisconnected(QString wallet,QCString application)" },
00020 {
"ASYNC",
"walletOpenResult(int)",
"walletOpenResult(int rc)" },
00021 { 0, 0, 0 }
00022 };
00023
static const int Wallet_ftable_hiddens[5] = {
00024 0,
00025 0,
00026 0,
00027 0,
00028 0,
00029 };
00030
00031
bool Wallet::process(
const QCString &fun,
const QByteArray &data,
QCString& replyType,
QByteArray &replyData)
00032 {
00033
if ( fun == Wallet_ftable[0][1] ) {
00034
int arg0;
00035
QDataStream arg( data, IO_ReadOnly );
00036
if (arg.atEnd())
return false;
00037 arg >> arg0;
00038 replyType = Wallet_ftable[0][0];
00039 slotWalletClosed(arg0 );
00040 }
else if ( fun == Wallet_ftable[1][1] ) {
00041
QString arg0;
00042
QString arg1;
00043
QDataStream arg( data, IO_ReadOnly );
00044
if (arg.atEnd())
return false;
00045 arg >> arg0;
00046
if (arg.atEnd())
return false;
00047 arg >> arg1;
00048 replyType = Wallet_ftable[1][0];
00049 slotFolderUpdated(arg0, arg1 );
00050 }
else if ( fun == Wallet_ftable[2][1] ) {
00051
QString arg0;
00052
QDataStream arg( data, IO_ReadOnly );
00053
if (arg.atEnd())
return false;
00054 arg >> arg0;
00055 replyType = Wallet_ftable[2][0];
00056 slotFolderListUpdated(arg0 );
00057 }
else if ( fun == Wallet_ftable[3][1] ) {
00058
QString arg0;
00059
QCString arg1;
00060
QDataStream arg( data, IO_ReadOnly );
00061
if (arg.atEnd())
return false;
00062 arg >> arg0;
00063
if (arg.atEnd())
return false;
00064 arg >> arg1;
00065 replyType = Wallet_ftable[3][0];
00066 slotApplicationDisconnected(arg0, arg1 );
00067 }
else if ( fun == Wallet_ftable[4][1] ) {
00068
int arg0;
00069
QDataStream arg( data, IO_ReadOnly );
00070
if (arg.atEnd())
return false;
00071 arg >> arg0;
00072 replyType = Wallet_ftable[4][0];
00073 walletOpenResult(arg0 );
00074 }
else {
00075
return DCOPObject::process( fun, data, replyType, replyData );
00076 }
00077
return true;
00078 }
00079
00080 QCStringList Wallet::interfaces()
00081 {
00082 QCStringList ifaces =
DCOPObject::interfaces();
00083 ifaces +=
"KWallet::Wallet";
00084
return ifaces;
00085 }
00086
00087 QCStringList Wallet::functions()
00088 {
00089 QCStringList funcs =
DCOPObject::functions();
00090
for (
int i = 0; Wallet_ftable[i][2]; i++ ) {
00091
if (Wallet_ftable_hiddens[i])
00092
continue;
00093
QCString func = Wallet_ftable[i][0];
00094 func +=
' ';
00095 func += Wallet_ftable[i][2];
00096 funcs << func;
00097 }
00098
return funcs;
00099 }
00100
00101 }
00102