kaddressbook

kaddressbookiface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton generated by dcopidl2cpp from kaddressbookiface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./kaddressbookiface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 
00015 static const int KAddressBookIface_fhash = 11;
00016 static const char* const KAddressBookIface_ftable[9][3] = {
00017     { "void", "addEmail(QString)", "addEmail(QString addr)" },
00018     { "void", "importVCard(QString)", "importVCard(QString vCardURL)" },
00019     { "ASYNC", "showContactEditor(QString)", "showContactEditor(QString uid)" },
00020     { "void", "newContact()", "newContact()" },
00021     { "QString", "getNameByPhone(QString)", "getNameByPhone(QString phone)" },
00022     { "void", "save()", "save()" },
00023     { "void", "exit()", "exit()" },
00024     { "bool", "handleCommandLine()", "handleCommandLine()" },
00025     { 0, 0, 0 }
00026 };
00027 static const int KAddressBookIface_ftable_hiddens[8] = {
00028     0,
00029     0,
00030     0,
00031     0,
00032     0,
00033     0,
00034     0,
00035     0,
00036 };
00037 
00038 bool KAddressBookIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00039 {
00040     static QAsciiDict<int>* fdict = 0;
00041     if ( !fdict ) {
00042     fdict = new QAsciiDict<int>( KAddressBookIface_fhash, true, false );
00043     for ( int i = 0; KAddressBookIface_ftable[i][1]; i++ )
00044         fdict->insert( KAddressBookIface_ftable[i][1],  new int( i ) );
00045     }
00046     int* fp = fdict->find( fun );
00047     switch ( fp?*fp:-1) {
00048     case 0: { // void addEmail(QString)
00049     QString arg0;
00050     QDataStream arg( data, IO_ReadOnly );
00051     if (arg.atEnd()) return false;
00052     arg >> arg0;
00053     replyType = KAddressBookIface_ftable[0][0]; 
00054     addEmail(arg0 );
00055     } break;
00056     case 1: { // void importVCard(QString)
00057     QString arg0;
00058     QDataStream arg( data, IO_ReadOnly );
00059     if (arg.atEnd()) return false;
00060     arg >> arg0;
00061     replyType = KAddressBookIface_ftable[1][0]; 
00062     importVCard(arg0 );
00063     } break;
00064     case 2: { // void showContactEditor(QString)
00065     QString arg0;
00066     QDataStream arg( data, IO_ReadOnly );
00067     if (arg.atEnd()) return false;
00068     arg >> arg0;
00069     replyType = KAddressBookIface_ftable[2][0]; 
00070     showContactEditor(arg0 );
00071     } break;
00072     case 3: { // void newContact()
00073     replyType = KAddressBookIface_ftable[3][0]; 
00074     newContact( );
00075     } break;
00076     case 4: { // QString getNameByPhone(QString)
00077     QString arg0;
00078     QDataStream arg( data, IO_ReadOnly );
00079     if (arg.atEnd()) return false;
00080     arg >> arg0;
00081     replyType = KAddressBookIface_ftable[4][0]; 
00082     QDataStream _replyStream( replyData, IO_WriteOnly );
00083     _replyStream << getNameByPhone(arg0 );
00084     } break;
00085     case 5: { // void save()
00086     replyType = KAddressBookIface_ftable[5][0]; 
00087     save( );
00088     } break;
00089     case 6: { // void exit()
00090     replyType = KAddressBookIface_ftable[6][0]; 
00091     exit( );
00092     } break;
00093     case 7: { // bool handleCommandLine()
00094     replyType = KAddressBookIface_ftable[7][0]; 
00095     QDataStream _replyStream( replyData, IO_WriteOnly );
00096     _replyStream << handleCommandLine( );
00097     } break;
00098     default: 
00099     return DCOPObject::process( fun, data, replyType, replyData );
00100     }
00101     return true;
00102 }
00103 
00104 QCStringList KAddressBookIface::interfaces()
00105 {
00106     QCStringList ifaces = DCOPObject::interfaces();
00107     ifaces += "KAddressBookIface";
00108     return ifaces;
00109 }
00110 
00111 QCStringList KAddressBookIface::functions()
00112 {
00113     QCStringList funcs = DCOPObject::functions();
00114     for ( int i = 0; KAddressBookIface_ftable[i][2]; i++ ) {
00115     if (KAddressBookIface_ftable_hiddens[i])
00116         continue;
00117     QCString func = KAddressBookIface_ftable[i][0];
00118     func += ' ';
00119     func += KAddressBookIface_ftable[i][2];
00120     funcs << func;
00121     }
00122     return funcs;
00123 }
00124 
00125 
KDE Home | KDE Accessibility Home | Description of Access Keys