mcopdcopobject.h

00001 /*
00002    Copyright (c) 2001 Nikolas Zimmermann <wildfox@kde.org>
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef MCOPDCOPOBJECT_H
00021 #define MCOPDCOPOBJECT_H
00022 
00023 #include <dcopobject.h>
00024 
00025 #include <qvaluelist.h>
00026 #include <qcstring.h>
00027 
00028 typedef QValueList<QCString> QCStringList;
00029 
00030 class MCOPDCOPObjectPrivate;
00031 
00032 class MCOPEntryInfo
00033 {
00034 public:
00035     MCOPEntryInfo()
00036     { }
00037     
00038     ~MCOPEntryInfo()
00039     { }
00040 
00041     QCString functionType()
00042     { return m_functionType; }
00043     
00044     QCString functionName()
00045     { return m_functionName; }
00046 
00047     QCString signature()
00048     { return m_signature; }
00049     
00050     QCStringList signatureList()
00051     { return m_signatureList; }
00052     
00053     void setFunctionType(QCString s)
00054     { m_functionType = s; }
00055 
00056     void setFunctionName(QCString s)
00057     { m_functionName = s; }
00058 
00059     void setSignature(QCString s)
00060     { m_signature = s; }
00061 
00062     void setSignatureList(QCStringList s)
00063     { m_signatureList = s; }
00064 
00065 private:
00066     QCString m_functionType, m_functionName, m_signature;
00067     QCStringList m_signatureList;
00068 };
00069 
00070 class MCOPDCOPObject : public DCOPObject
00071 {
00072 public:
00073     MCOPDCOPObject(QCString name);
00074     ~MCOPDCOPObject();
00075 
00076     virtual bool processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData);
00077     virtual QCStringList functionsDynamic();
00078 
00079     void addDynamicFunction(QCString value, MCOPEntryInfo *entry);
00080 
00081     Arts::Buffer *callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data);
00082     
00083 private:
00084     MCOPDCOPObjectPrivate *d;
00085 };
00086 
00087 
00088 #endif
00089 
KDE Home | KDE Accessibility Home | Description of Access Keys