knotes

KNotesAppIface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton generated 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 = 29;
00016 static const char* const KNotesAppIface_ftable[24][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", "fgColor(QString)", "fgColor(QString noteId)" },
00025     { "QString", "bgColor(QString)", "bgColor(QString noteId)" },
00026     { "ASYNC", "setColor(QString,QString,QString)", "setColor(QString noteId,QString fgColor,QString bgColor)" },
00027     { "QString", "name(QString)", "name(QString noteId)" },
00028     { "QString", "text(QString)", "text(QString noteId)" },
00029     { "ASYNC", "showNote(QString)", "showNote(QString noteId)" },
00030     { "ASYNC", "hideNote(QString)", "hideNote(QString noteId)" },
00031     { "ASYNC", "showAllNotes()", "showAllNotes()" },
00032     { "ASYNC", "hideAllNotes()", "hideAllNotes()" },
00033     { "int", "width(QString)", "width(QString noteId)" },
00034     { "int", "height(QString)", "height(QString noteId)" },
00035     { "ASYNC", "move(QString,int,int)", "move(QString noteId,int x,int y)" },
00036     { "ASYNC", "resize(QString,int,int)", "resize(QString noteId,int width,int height)" },
00037     { "ASYNC", "sync(QString)", "sync(QString app)" },
00038     { "bool", "isNew(QString,QString)", "isNew(QString app,QString noteId)" },
00039     { "bool", "isModified(QString,QString)", "isModified(QString app,QString noteId)" },
00040     { 0, 0, 0 }
00041 };
00042 static const int KNotesAppIface_ftable_hiddens[23] = {
00043     0,
00044     0,
00045     0,
00046     0,
00047     0,
00048     0,
00049     0,
00050     0,
00051     0,
00052     0,
00053     0,
00054     0,
00055     0,
00056     0,
00057     0,
00058     0,
00059     0,
00060     0,
00061     0,
00062     0,
00063     0,
00064     0,
00065     0,
00066 };
00067 
00068 bool KNotesAppIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00069 {
00070     static QAsciiDict<int>* fdict = 0;
00071     if ( !fdict ) {
00072     fdict = new QAsciiDict<int>( KNotesAppIface_fhash, true, false );
00073     for ( int i = 0; KNotesAppIface_ftable[i][1]; i++ )
00074         fdict->insert( KNotesAppIface_ftable[i][1],  new int( i ) );
00075     }
00076     int* fp = fdict->find( fun );
00077     switch ( fp?*fp:-1) {
00078     case 0: { // QString newNote(QString,QString)
00079     QString arg0;
00080     QString arg1;
00081     QDataStream arg( data, IO_ReadOnly );
00082     if (arg.atEnd()) return false;
00083     arg >> arg0;
00084     if (arg.atEnd()) return false;
00085     arg >> arg1;
00086     replyType = KNotesAppIface_ftable[0][0]; 
00087     QDataStream _replyStream( replyData, IO_WriteOnly );
00088     _replyStream << newNote(arg0, arg1 );
00089     } break;
00090     case 1: { // QString newNoteFromClipboard(QString)
00091     QString arg0;
00092     QDataStream arg( data, IO_ReadOnly );
00093     if (arg.atEnd()) return false;
00094     arg >> arg0;
00095     replyType = KNotesAppIface_ftable[1][0]; 
00096     QDataStream _replyStream( replyData, IO_WriteOnly );
00097     _replyStream << newNoteFromClipboard(arg0 );
00098     } break;
00099     case 2: { // void killNote(QString)
00100     QString arg0;
00101     QDataStream arg( data, IO_ReadOnly );
00102     if (arg.atEnd()) return false;
00103     arg >> arg0;
00104     replyType = KNotesAppIface_ftable[2][0]; 
00105     killNote(arg0 );
00106     } break;
00107     case 3: { // void killNote(QString,bool)
00108     QString arg0;
00109     bool arg1;
00110     QDataStream arg( data, IO_ReadOnly );
00111     if (arg.atEnd()) return false;
00112     arg >> arg0;
00113     if (arg.atEnd()) return false;
00114     arg >> arg1;
00115     replyType = KNotesAppIface_ftable[3][0]; 
00116     killNote(arg0, arg1 );
00117     } break;
00118     case 4: { // QMap<QString,QString> notes()
00119     replyType = KNotesAppIface_ftable[4][0]; 
00120     QDataStream _replyStream( replyData, IO_WriteOnly );
00121     _replyStream << notes( );
00122     } break;
00123     case 5: { // void setName(QString,QString)
00124     QString arg0;
00125     QString arg1;
00126     QDataStream arg( data, IO_ReadOnly );
00127     if (arg.atEnd()) return false;
00128     arg >> arg0;
00129     if (arg.atEnd()) return false;
00130     arg >> arg1;
00131     replyType = KNotesAppIface_ftable[5][0]; 
00132     setName(arg0, arg1 );
00133     } break;
00134     case 6: { // void setText(QString,QString)
00135     QString arg0;
00136     QString arg1;
00137     QDataStream arg( data, IO_ReadOnly );
00138     if (arg.atEnd()) return false;
00139     arg >> arg0;
00140     if (arg.atEnd()) return false;
00141     arg >> arg1;
00142     replyType = KNotesAppIface_ftable[6][0]; 
00143     setText(arg0, arg1 );
00144     } break;
00145     case 7: { // QString fgColor(QString)
00146     QString arg0;
00147     QDataStream arg( data, IO_ReadOnly );
00148     if (arg.atEnd()) return false;
00149     arg >> arg0;
00150     replyType = KNotesAppIface_ftable[7][0]; 
00151     QDataStream _replyStream( replyData, IO_WriteOnly );
00152     _replyStream << fgColor(arg0 );
00153     } break;
00154     case 8: { // QString bgColor(QString)
00155     QString arg0;
00156     QDataStream arg( data, IO_ReadOnly );
00157     if (arg.atEnd()) return false;
00158     arg >> arg0;
00159     replyType = KNotesAppIface_ftable[8][0]; 
00160     QDataStream _replyStream( replyData, IO_WriteOnly );
00161     _replyStream << bgColor(arg0 );
00162     } break;
00163     case 9: { // void setColor(QString,QString,QString)
00164     QString arg0;
00165     QString arg1;
00166     QString arg2;
00167     QDataStream arg( data, IO_ReadOnly );
00168     if (arg.atEnd()) return false;
00169     arg >> arg0;
00170     if (arg.atEnd()) return false;
00171     arg >> arg1;
00172     if (arg.atEnd()) return false;
00173     arg >> arg2;
00174     replyType = KNotesAppIface_ftable[9][0]; 
00175     setColor(arg0, arg1, arg2 );
00176     } break;
00177     case 10: { // QString name(QString)
00178     QString arg0;
00179     QDataStream arg( data, IO_ReadOnly );
00180     if (arg.atEnd()) return false;
00181     arg >> arg0;
00182     replyType = KNotesAppIface_ftable[10][0]; 
00183     QDataStream _replyStream( replyData, IO_WriteOnly );
00184     _replyStream << name(arg0 );
00185     } break;
00186     case 11: { // QString text(QString)
00187     QString arg0;
00188     QDataStream arg( data, IO_ReadOnly );
00189     if (arg.atEnd()) return false;
00190     arg >> arg0;
00191     replyType = KNotesAppIface_ftable[11][0]; 
00192     QDataStream _replyStream( replyData, IO_WriteOnly );
00193     _replyStream << text(arg0 );
00194     } break;
00195     case 12: { // void showNote(QString)
00196     QString arg0;
00197     QDataStream arg( data, IO_ReadOnly );
00198     if (arg.atEnd()) return false;
00199     arg >> arg0;
00200     replyType = KNotesAppIface_ftable[12][0]; 
00201     showNote(arg0 );
00202     } break;
00203     case 13: { // void hideNote(QString)
00204     QString arg0;
00205     QDataStream arg( data, IO_ReadOnly );
00206     if (arg.atEnd()) return false;
00207     arg >> arg0;
00208     replyType = KNotesAppIface_ftable[13][0]; 
00209     hideNote(arg0 );
00210     } break;
00211     case 14: { // void showAllNotes()
00212     replyType = KNotesAppIface_ftable[14][0]; 
00213     showAllNotes( );
00214     } break;
00215     case 15: { // void hideAllNotes()
00216     replyType = KNotesAppIface_ftable[15][0]; 
00217     hideAllNotes( );
00218     } break;
00219     case 16: { // int width(QString)
00220     QString arg0;
00221     QDataStream arg( data, IO_ReadOnly );
00222     if (arg.atEnd()) return false;
00223     arg >> arg0;
00224     replyType = KNotesAppIface_ftable[16][0]; 
00225     QDataStream _replyStream( replyData, IO_WriteOnly );
00226     _replyStream << width(arg0 );
00227     } break;
00228     case 17: { // int height(QString)
00229     QString arg0;
00230     QDataStream arg( data, IO_ReadOnly );
00231     if (arg.atEnd()) return false;
00232     arg >> arg0;
00233     replyType = KNotesAppIface_ftable[17][0]; 
00234     QDataStream _replyStream( replyData, IO_WriteOnly );
00235     _replyStream << height(arg0 );
00236     } break;
00237     case 18: { // void move(QString,int,int)
00238     QString arg0;
00239     int arg1;
00240     int arg2;
00241     QDataStream arg( data, IO_ReadOnly );
00242     if (arg.atEnd()) return false;
00243     arg >> arg0;
00244     if (arg.atEnd()) return false;
00245     arg >> arg1;
00246     if (arg.atEnd()) return false;
00247     arg >> arg2;
00248     replyType = KNotesAppIface_ftable[18][0]; 
00249     move(arg0, arg1, arg2 );
00250     } break;
00251     case 19: { // void resize(QString,int,int)
00252     QString arg0;
00253     int arg1;
00254     int arg2;
00255     QDataStream arg( data, IO_ReadOnly );
00256     if (arg.atEnd()) return false;
00257     arg >> arg0;
00258     if (arg.atEnd()) return false;
00259     arg >> arg1;
00260     if (arg.atEnd()) return false;
00261     arg >> arg2;
00262     replyType = KNotesAppIface_ftable[19][0]; 
00263     resize(arg0, arg1, arg2 );
00264     } break;
00265     case 20: { // void sync(QString)
00266     QString arg0;
00267     QDataStream arg( data, IO_ReadOnly );
00268     if (arg.atEnd()) return false;
00269     arg >> arg0;
00270     replyType = KNotesAppIface_ftable[20][0]; 
00271     sync(arg0 );
00272     } break;
00273     case 21: { // bool isNew(QString,QString)
00274     QString arg0;
00275     QString arg1;
00276     QDataStream arg( data, IO_ReadOnly );
00277     if (arg.atEnd()) return false;
00278     arg >> arg0;
00279     if (arg.atEnd()) return false;
00280     arg >> arg1;
00281     replyType = KNotesAppIface_ftable[21][0]; 
00282     QDataStream _replyStream( replyData, IO_WriteOnly );
00283     _replyStream << isNew(arg0, arg1 );
00284     } break;
00285     case 22: { // bool isModified(QString,QString)
00286     QString arg0;
00287     QString arg1;
00288     QDataStream arg( data, IO_ReadOnly );
00289     if (arg.atEnd()) return false;
00290     arg >> arg0;
00291     if (arg.atEnd()) return false;
00292     arg >> arg1;
00293     replyType = KNotesAppIface_ftable[22][0]; 
00294     QDataStream _replyStream( replyData, IO_WriteOnly );
00295     _replyStream << isModified(arg0, arg1 );
00296     } break;
00297     default: 
00298     return DCOPObject::process( fun, data, replyType, replyData );
00299     }
00300     return true;
00301 }
00302 
00303 QCStringList KNotesAppIface::interfaces()
00304 {
00305     QCStringList ifaces = DCOPObject::interfaces();
00306     ifaces += "KNotesAppIface";
00307     return ifaces;
00308 }
00309 
00310 QCStringList KNotesAppIface::functions()
00311 {
00312     QCStringList funcs = DCOPObject::functions();
00313     for ( int i = 0; KNotesAppIface_ftable[i][2]; i++ ) {
00314     if (KNotesAppIface_ftable_hiddens[i])
00315         continue;
00316     QCString func = KNotesAppIface_ftable[i][0];
00317     func += ' ';
00318     func += KNotesAppIface_ftable[i][2];
00319     funcs << func;
00320     }
00321     return funcs;
00322 }
00323 
00324 
KDE Home | KDE Accessibility Home | Description of Access Keys