From 3fb1bce368aa62930426183b2be1ec10f6018988 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 22 Feb 2017 05:07:07 +0300 Subject: [PATCH] more tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/peer.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/ui (gen4)/features/peer.js b/ui (gen4)/features/peer.js index 5c2bdaa4..aeb6c514 100755 --- a/ui (gen4)/features/peer.js +++ b/ui (gen4)/features/peer.js @@ -62,23 +62,17 @@ var PeerActions = actions.Actions({ return !!this.getActionAttr(name, '__peer__') }], // - // The overloading action should connect on the pre-stage... + // NOTE: it is the responsibility of the overloading action to trigger + // the appropriate events... // // XXX should this be sync or async??? // XXX this should create or connect to a peer depending on protocol... // XXX the events should get called on the peer too -- who is // responsible for this??? peerConnect: ['- Peer/', - function(id, options){ - id in this.__peers - && this.peerConnected(id) - return id - }], + function(id, options){ return id }], peerDisconnect: ['- Peer/', - function(id){ - !(id in this.__peers) - && this.peerDisconnected(id) - }], + function(id){ }], // event... peerConnected: ['- Peer/', @@ -154,6 +148,16 @@ module.Peer = core.ImageGridFeatures.Feature({ //--------------------------------------------------------------------- var ChildProcessPeerActions = actions.Actions({ + + peerConnect: ['- Peer/', + function(id, options){ + // XXX + }], + peerDisconnect: ['- Peer/', + function(id){ + // XXX + }], + })