[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Extra DCOP features (request for comment/review/any attention from core guys what so ever)
From:       ian reinhart geiser <geiseri () yahoo ! com>
Date:       2001-10-26 15:04:28
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay since we are about a week from the freeze I figured it would be moronic 
to ask for a feature in KDElibs without a patch.

Basicly Simon and I have been going arround on the issue of API duplication 
in my DCOP interfaces.  We agree it is bad and it is there.  The problem was 
we lacked a good way to make current DCOP library functions fit well into my 
grand vision/delusion of how DCOP should work from the users point of view.

On IRC today we agreed that DCOPPropertiesProxy was a good way to go, but 
there where some limitations that did not allow the interface to be as strait 
forward to the user as it could be.  The issue is we could process the 
commands correctly with DCOPObject::processDynamic but we needed a separate 
function to list the properties.   This prompted me to add to the DCOPObject 
class.

For consistancy sake I am proposing the addition of 
DCOPObject::functionsDynamic() and DCOPObject::interfacesDynamic().  These 
would offer both consistancy and flexability to the DCOP object.  With the 
addition of this we will be able to completely eliminate API duplication for 
these interfaces.

I have tested this patch locallly and nothing breaks during the build process 
It does break BC so I would like to apply it yet today.  I have yet to test 
all of KDE with it, I have only seen that KDE libs builds with it and that 
KDE base has yet to show any errors during build.

Thanks
- -ian reinhart geiser
- -- 
========================================
Play Rogue, visit exotic locations, meet strange creatures and kill them.
========================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE72Xt8Py62TRm8dvgRAvm+AKDqOtFeSt3JH4EBT1cGeG3JHTZyZQCfa7Uq
rw31q/FFB8UIX6LjbNLiRU8=
=vL8Z
-----END PGP SIGNATURE-----

["dcop_features.patch" (text/x-diff)]

Index: dcopobject.cpp
===================================================================
RCS file: /home/kde/kdelibs/dcop/dcopobject.cpp,v
retrieving revision 1.27
diff -u -3 -p -u -r1.27 dcopobject.cpp
--- dcopobject.cpp	2001/09/12 14:13:18	1.27
+++ dcopobject.cpp	2001/10/26 14:59:39
@@ -159,17 +159,27 @@ bool DCOPObject::processDynamic( const Q
 {
     return FALSE;
 }
+QCStringList DCOPObject::interfacesDynamic()
+{
+    QCStringList result;
+    return result;
+}
 
-QCStringList DCOPObject::interfaces()
+QCStringList DCOPObject::functionsDynamic()
 {
     QCStringList result;
+    return result;
+}
+QCStringList DCOPObject::interfaces()
+{
+    QCStringList result = interfacesDynamic();
     result << "DCOPObject";
     return result;
 }
 
 QCStringList DCOPObject::functions()
 {
-    QCStringList result;
+    QCStringList result = functionsDynamic();
     result << "QCStringList interfaces()";
     result << "QCStringList functions()";
     return result;
Index: dcopobject.h
===================================================================
RCS file: /home/kde/kdelibs/dcop/dcopobject.h,v
retrieving revision 1.35
diff -u -3 -p -u -r1.35 dcopobject.h
--- dcopobject.h	2001/10/18 15:06:43	1.35
+++ dcopobject.h	2001/10/26 14:59:40
@@ -119,6 +119,31 @@ public:
   virtual bool processDynamic(const QCString &fun, const QByteArray &data,
 			      QCString& replyType, QByteArray &replyData);
 
+   /**
+   * This function is of interest when you used an IDL compiler
+   * to generate the implementation for @ref functions() but
+   * you still want to list some functions dynamically.
+   * Dynamically means that the methods may appear and vanish
+   * during runtime.
+   *
+   * @return @p A list of the additional functions, default is an empty list.
+   *
+   * @see functions(),
+   */
+  virtual QCStringList functionsDynamic();
+
+    /**
+   * This function is of interest when you used an IDL compiler
+   * to generate the implementation for @ref interfaces() but
+   * you still want to list some interfaces dynamically.
+   * Dynamically means that they may appear and vanish
+   * during runtime.
+   *
+   * @return @p A list of the aditional interfaces, default is an empty list.
+   *
+   * @see interfaces(),
+   */
+  virtual QCStringList interfacesDynamic();
 
   /**
    * Returns the names of the interfaces, specific ones last. The


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic