knotes Library API Documentation

KNotesAppIface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from KNotesAppIface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./KNotesAppIface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 
00015 static const int KNotesAppIface_fhash = 17;
00016 static const char* const KNotesAppIface_ftable[17][3] = {
00017     { "QString", "newNote(QString,QString)", "newNote(QString name,QString text)" },
00018     { "QString", "newNoteFromClipboard(QString)", "newNoteFromClipboard(QString name)" },
00019     { "ASYNC", "killNote(QString)", "killNote(QString noteId)" },
00020     { "ASYNC", "killNote(QString,bool)", "killNote(QString noteId,bool force)" },
00021     { "QMap<QString,QString>", "notes()", "notes()" },
00022     { "ASYNC", "setName(QString,QString)", "setName(QString noteId,QString newName)" },
00023     { "ASYNC", "setText(QString,QString)", "setText(QString noteId,QString newText)" },
00024     { "QString", "name(QString)", "name(QString noteId)" },
00025     { "QString", "text(QString)", "text(QString noteId)" },
00026     { "ASYNC", "showNote(QString)", "showNote(QString noteId)" },
00027     { "ASYNC", "hideNote(QString)", "hideNote(QString noteId)" },
00028     { "ASYNC", "showAllNotes()", "showAllNotes()" },
00029     { "ASYNC", "hideAllNotes()", "hideAllNotes()" },
00030     { "ASYNC", "sync(QString)", "sync(QString app)" },
00031     { "bool", "isNew(QString,QString)", "isNew(QString app,QString noteId)" },
00032     { "bool", "isModified(QString,QString)", "isModified(QString app,QString noteId)" },
00033     { 0, 0, 0 }
00034 };
00035 static const int KNotesAppIface_ftable_hiddens[16] = {
00036     0,
00037     0,
00038     0,
00039     0,
00040     0,
00041     0,
00042     0,
00043     0,
00044     0,
00045     0,
00046     0,
00047     0,
00048     0,
00049     0,
00050     0,
00051     0,
00052 };
00053 
00054 bool KNotesAppIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00055 {
00056     static QAsciiDict<int>* fdict = 0;
00057     if ( !fdict ) {
00058     fdict = new QAsciiDict<int>( KNotesAppIface_fhash, true, false );
00059     for ( int i = 0; KNotesAppIface_ftable[i][1]; i++ )
00060         fdict->insert( KNotesAppIface_ftable[i][1],  new int( i ) );
00061     }
00062     int* fp = fdict->find( fun );
00063     switch ( fp?*fp:-1) {
00064     case 0: { // QString newNote(QString,QString)
00065     QString arg0;
00066     QString arg1;
00067     QDataStream arg( data, IO_ReadOnly );
00068     arg >> arg0;
00069     arg >> arg1;
00070     replyType = KNotesAppIface_ftable[0][0]; 
00071     QDataStream _replyStream( replyData, IO_WriteOnly );
00072     _replyStream << newNote(arg0, arg1 );
00073     } break;
00074     case 1: { // QString newNoteFromClipboard(QString)
00075     QString arg0;
00076     QDataStream arg( data, IO_ReadOnly );
00077     arg >> arg0;
00078     replyType = KNotesAppIface_ftable[1][0]; 
00079     QDataStream _replyStream( replyData, IO_WriteOnly );
00080     _replyStream << newNoteFromClipboard(arg0 );
00081     } break;
00082     case 2: { // void killNote(QString)
00083     QString arg0;
00084     QDataStream arg( data, IO_ReadOnly );
00085     arg >> arg0;
00086     replyType = KNotesAppIface_ftable[2][0]; 
00087     killNote(arg0 );
00088     } break;
00089     case 3: { // void killNote(QString,bool)
00090     QString arg0;
00091     bool arg1;
00092     QDataStream arg( data, IO_ReadOnly );
00093     arg >> arg0;
00094     arg >> arg1;
00095     replyType = KNotesAppIface_ftable[3][0]; 
00096     killNote(arg0, arg1 );
00097     } break;
00098     case 4: { // QMap<QString,QString> notes()
00099     replyType = KNotesAppIface_ftable[4][0]; 
00100     QDataStream _replyStream( replyData, IO_WriteOnly );
00101     _replyStream << notes( );
00102     } break;
00103     case 5: { // void setName(QString,QString)
00104     QString arg0;
00105     QString arg1;
00106     QDataStream arg( data, IO_ReadOnly );
00107     arg >> arg0;
00108     arg >> arg1;
00109     replyType = KNotesAppIface_ftable[5][0]; 
00110     setName(arg0, arg1 );
00111     } break;
00112     case 6: { // void setText(QString,QString)
00113     QString arg0;
00114     QString arg1;
00115     QDataStream arg( data, IO_ReadOnly );
00116     arg >> arg0;
00117     arg >> arg1;
00118     replyType = KNotesAppIface_ftable[6][0]; 
00119     setText(arg0, arg1 );
00120     } break;
00121     case 7: { // QString name(QString)
00122     QString arg0;
00123     QDataStream arg( data, IO_ReadOnly );
00124     arg >> arg0;
00125     replyType = KNotesAppIface_ftable[7][0]; 
00126     QDataStream _replyStream( replyData, IO_WriteOnly );
00127     _replyStream << name(arg0 );
00128     } break;
00129     case 8: { // QString text(QString)
00130     QString arg0;
00131     QDataStream arg( data, IO_ReadOnly );
00132     arg >> arg0;
00133     replyType = KNotesAppIface_ftable[8][0]; 
00134     QDataStream _replyStream( replyData, IO_WriteOnly );
00135     _replyStream << text(arg0 );
00136     } break;
00137     case 9: { // void showNote(QString)
00138     QString arg0;
00139     QDataStream arg( data, IO_ReadOnly );
00140     arg >> arg0;
00141     replyType = KNotesAppIface_ftable[9][0]; 
00142     showNote(arg0 );
00143     } break;
00144     case 10: { // void hideNote(QString)
00145     QString arg0;
00146     QDataStream arg( data, IO_ReadOnly );
00147     arg >> arg0;
00148     replyType = KNotesAppIface_ftable[10][0]; 
00149     hideNote(arg0 );
00150     } break;
00151     case 11: { // void showAllNotes()
00152     replyType = KNotesAppIface_ftable[11][0]; 
00153     showAllNotes( );
00154     } break;
00155     case 12: { // void hideAllNotes()
00156     replyType = KNotesAppIface_ftable[12][0]; 
00157     hideAllNotes( );
00158     } break;
00159     case 13: { // void sync(QString)
00160     QString arg0;
00161     QDataStream arg( data, IO_ReadOnly );
00162     arg >> arg0;
00163     replyType = KNotesAppIface_ftable[13][0]; 
00164     sync(arg0 );
00165     } break;
00166     case 14: { // bool isNew(QString,QString)
00167     QString arg0;
00168     QString arg1;
00169     QDataStream arg( data, IO_ReadOnly );
00170     arg >> arg0;
00171     arg >> arg1;
00172     replyType = KNotesAppIface_ftable[14][0]; 
00173     QDataStream _replyStream( replyData, IO_WriteOnly );
00174     _replyStream << isNew(arg0, arg1 );
00175     } break;
00176     case 15: { // bool isModified(QString,QString)
00177     QString arg0;
00178     QString arg1;
00179     QDataStream arg( data, IO_ReadOnly );
00180     arg >> arg0;
00181     arg >> arg1;
00182     replyType = KNotesAppIface_ftable[15][0]; 
00183     QDataStream _replyStream( replyData, IO_WriteOnly );
00184     _replyStream << isModified(arg0, arg1 );
00185     } break;
00186     default: 
00187     return DCOPObject::process( fun, data, replyType, replyData );
00188     }
00189     return true;
00190 }
00191 
00192 QCStringList KNotesAppIface::interfaces()
00193 {
00194     QCStringList ifaces = DCOPObject::interfaces();
00195     ifaces += "KNotesAppIface";
00196     return ifaces;
00197 }
00198 
00199 QCStringList KNotesAppIface::functions()
00200 {
00201     QCStringList funcs = DCOPObject::functions();
00202     for ( int i = 0; KNotesAppIface_ftable[i][2]; i++ ) {
00203     if (KNotesAppIface_ftable_hiddens[i])
00204         continue;
00205     QCString func = KNotesAppIface_ftable[i][0];
00206     func += ' ';
00207     func += KNotesAppIface_ftable[i][2];
00208     funcs << func;
00209     }
00210     return funcs;
00211 }
00212 
00213 
KDE Logo
This file is part of the documentation for knotes Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 22:40:48 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003