playerdcopobject_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton generated by dcopidl2cpp from playerdcopobject.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./playerdcopobject.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 namespace KMediaPlayer {
00015 
00016 static const int PlayerDCOPObject_fhash = 17;
00017 static const char* const PlayerDCOPObject_ftable[14][3] = {
00018     { "bool", "openURL(KURL)", "openURL(KURL file)" },
00019     { "void", "pause()", "pause()" },
00020     { "void", "play()", "play()" },
00021     { "void", "stop()", "stop()" },
00022     { "void", "seek(unsigned long int)", "seek(unsigned long int msec)" },
00023     { "bool", "isSeekable()", "isSeekable()" },
00024     { "unsigned long int", "position()", "position()" },
00025     { "bool", "hasLength()", "hasLength()" },
00026     { "unsigned long int", "length()", "length()" },
00027     { "void", "setLooping(bool)", "setLooping(bool)" },
00028     { "bool", "isLooping()", "isLooping()" },
00029     { "int", "state()", "state()" },
00030     { "void", "setState(int)", "setState(int)" },
00031     { 0, 0, 0 }
00032 };
00033 static const int PlayerDCOPObject_ftable_hiddens[13] = {
00034     0,
00035     0,
00036     0,
00037     0,
00038     0,
00039     0,
00040     0,
00041     0,
00042     0,
00043     0,
00044     0,
00045     0,
00046     0,
00047 };
00048 
00049 bool PlayerDCOPObject::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00050 {
00051     static QAsciiDict<int>* fdict = 0;
00052     if ( !fdict ) {
00053     fdict = new QAsciiDict<int>( PlayerDCOPObject_fhash, true, false );
00054     for ( int i = 0; PlayerDCOPObject_ftable[i][1]; i++ )
00055         fdict->insert( PlayerDCOPObject_ftable[i][1],  new int( i ) );
00056     }
00057     int* fp = fdict->find( fun );
00058     switch ( fp?*fp:-1) {
00059     case 0: { // bool openURL(KURL)
00060     KURL arg0;
00061     QDataStream arg( data, IO_ReadOnly );
00062     if (arg.atEnd()) return false;
00063     arg >> arg0;
00064     replyType = PlayerDCOPObject_ftable[0][0]; 
00065     QDataStream _replyStream( replyData, IO_WriteOnly );
00066     _replyStream << openURL(arg0 );
00067     } break;
00068     case 1: { // void pause()
00069     replyType = PlayerDCOPObject_ftable[1][0]; 
00070     pause( );
00071     } break;
00072     case 2: { // void play()
00073     replyType = PlayerDCOPObject_ftable[2][0]; 
00074     play( );
00075     } break;
00076     case 3: { // void stop()
00077     replyType = PlayerDCOPObject_ftable[3][0]; 
00078     stop( );
00079     } break;
00080     case 4: { // void seek(unsigned long int)
00081     unsigned long int arg0;
00082     QDataStream arg( data, IO_ReadOnly );
00083     if (arg.atEnd()) return false;
00084     arg >> arg0;
00085     replyType = PlayerDCOPObject_ftable[4][0]; 
00086     seek(arg0 );
00087     } break;
00088     case 5: { // bool isSeekable()
00089     replyType = PlayerDCOPObject_ftable[5][0]; 
00090     QDataStream _replyStream( replyData, IO_WriteOnly );
00091     _replyStream << isSeekable( );
00092     } break;
00093     case 6: { // unsigned long int position()
00094     replyType = PlayerDCOPObject_ftable[6][0]; 
00095     QDataStream _replyStream( replyData, IO_WriteOnly );
00096     _replyStream << position( );
00097     } break;
00098     case 7: { // bool hasLength()
00099     replyType = PlayerDCOPObject_ftable[7][0]; 
00100     QDataStream _replyStream( replyData, IO_WriteOnly );
00101     _replyStream << hasLength( );
00102     } break;
00103     case 8: { // unsigned long int length()
00104     replyType = PlayerDCOPObject_ftable[8][0]; 
00105     QDataStream _replyStream( replyData, IO_WriteOnly );
00106     _replyStream << length( );
00107     } break;
00108     case 9: { // void setLooping(bool)
00109     bool arg0;
00110     QDataStream arg( data, IO_ReadOnly );
00111     if (arg.atEnd()) return false;
00112     arg >> arg0;
00113     replyType = PlayerDCOPObject_ftable[9][0]; 
00114     setLooping(arg0 );
00115     } break;
00116     case 10: { // bool isLooping()
00117     replyType = PlayerDCOPObject_ftable[10][0]; 
00118     QDataStream _replyStream( replyData, IO_WriteOnly );
00119     _replyStream << isLooping( );
00120     } break;
00121     case 11: { // int state()
00122     replyType = PlayerDCOPObject_ftable[11][0]; 
00123     QDataStream _replyStream( replyData, IO_WriteOnly );
00124     _replyStream << state( );
00125     } break;
00126     case 12: { // void setState(int)
00127     int arg0;
00128     QDataStream arg( data, IO_ReadOnly );
00129     if (arg.atEnd()) return false;
00130     arg >> arg0;
00131     replyType = PlayerDCOPObject_ftable[12][0]; 
00132     setState(arg0 );
00133     } break;
00134     default: 
00135     return DCOPObject::process( fun, data, replyType, replyData );
00136     }
00137     return true;
00138 }
00139 
00140 QCStringList PlayerDCOPObject::interfaces()
00141 {
00142     QCStringList ifaces = DCOPObject::interfaces();
00143     ifaces += "KMediaPlayer::PlayerDCOPObject";
00144     return ifaces;
00145 }
00146 
00147 QCStringList PlayerDCOPObject::functions()
00148 {
00149     QCStringList funcs = DCOPObject::functions();
00150     for ( int i = 0; PlayerDCOPObject_ftable[i][2]; i++ ) {
00151     if (PlayerDCOPObject_ftable_hiddens[i])
00152         continue;
00153     QCString func = PlayerDCOPObject_ftable[i][0];
00154     func += ' ';
00155     func += PlayerDCOPObject_ftable[i][2];
00156     funcs << func;
00157     }
00158     return funcs;
00159 }
00160 
00161 } // namespace
00162 
KDE Home | KDE Accessibility Home | Description of Access Keys