[haiku-commits] Re: r38167 - in haiku/trunk: headers/private/app src/kits/app

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Aug 2010 09:34:05 +0200

clemens.zeidler@xxxxxxxxxxxxxx wrote:
> Log:
> Add PortLinkRef class which use a existing sender and receiver for
> communication. Suggestion for a better name?

I have a hard time seeing the need for this class.

+               case AS_TALK_TO_DESKTOP_LISTENER:
+               {
+                       port_id senderPort;
+                       link.Read<port_id>(&senderPort);
+                       BPrivate::LinkSender sender(senderPort);
+                       BPrivate::PortLinkRef listenerLink(&sender, &link);
+                       if (fDesktop->MessageForListener(fWindow, listenerLink))
+                               break;
+                       // unhandled message at least send an error if needed
+                       if (link.NeedsReply()) {
+                               sender.StartMessage(B_ERROR);
+                               sender.Flush();
+                       }
+                       break;
+               }

Why so complicated? Ie. why is the communication not using the standard 
window return path?

Bye,
   Axel.


Other related posts: