kdemm Library API Documentation

mixeriface_skel.cpp

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton generated by dcopidl2cpp from mixeriface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "/usr/src/packages/BUILD/kdelibs-3.4.2/kdemm/mixeriface.h"
00010 
00011 #include <kdatastream.h>
00012 
00013 
00014 static const char* const MixerIface_ftable[6][3] = {
00015     { "QString", "channelName()", "channelName()" },
00016     { "QString", "channelType()", "channelType()" },
00017     { "bool", "hasVolumeControl()", "hasVolumeControl()" },
00018     { "float", "volume()", "volume()" },
00019     { "bool", "setVolume(float)", "setVolume(float volume)" },
00020     { 0, 0, 0 }
00021 };
00022 static const int MixerIface_ftable_hiddens[5] = {
00023     0,
00024     0,
00025     0,
00026     0,
00027     0,
00028 };
00029 
00030 bool MixerIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00031 {
00032     if ( fun == MixerIface_ftable[0][1] ) { // QString channelName()
00033     replyType = MixerIface_ftable[0][0]; 
00034     QDataStream _replyStream( replyData, IO_WriteOnly );
00035     _replyStream << channelName( );
00036     } else if ( fun == MixerIface_ftable[1][1] ) { // QString channelType()
00037     replyType = MixerIface_ftable[1][0]; 
00038     QDataStream _replyStream( replyData, IO_WriteOnly );
00039     _replyStream << channelType( );
00040     } else if ( fun == MixerIface_ftable[2][1] ) { // bool hasVolumeControl()
00041     replyType = MixerIface_ftable[2][0]; 
00042     QDataStream _replyStream( replyData, IO_WriteOnly );
00043     _replyStream << hasVolumeControl( );
00044     } else if ( fun == MixerIface_ftable[3][1] ) { // float volume()
00045     replyType = MixerIface_ftable[3][0]; 
00046     QDataStream _replyStream( replyData, IO_WriteOnly );
00047     _replyStream << volume( );
00048     } else if ( fun == MixerIface_ftable[4][1] ) { // bool setVolume(float)
00049     float arg0;
00050     QDataStream arg( data, IO_ReadOnly );
00051     if (arg.atEnd()) return false;
00052     arg >> arg0;
00053     replyType = MixerIface_ftable[4][0]; 
00054     QDataStream _replyStream( replyData, IO_WriteOnly );
00055     _replyStream << setVolume(arg0 );
00056     } else {
00057     return DCOPObject::process( fun, data, replyType, replyData );
00058     }
00059     return true;
00060 }
00061 
00062 QCStringList MixerIface::interfaces()
00063 {
00064     QCStringList ifaces = DCOPObject::interfaces();
00065     ifaces += "MixerIface";
00066     return ifaces;
00067 }
00068 
00069 QCStringList MixerIface::functions()
00070 {
00071     QCStringList funcs = DCOPObject::functions();
00072     for ( int i = 0; MixerIface_ftable[i][2]; i++ ) {
00073     if (MixerIface_ftable_hiddens[i])
00074         continue;
00075     QCString func = MixerIface_ftable[i][0];
00076     func += ' ';
00077     func += MixerIface_ftable[i][2];
00078     funcs << func;
00079     }
00080     return funcs;
00081 }
00082 
00083 
KDE Logo
This file is part of the documentation for kdemm Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 13 04:04:37 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003