mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
working on the peer api...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4b32f370ba
commit
07d3ca21ef
@ -17,6 +17,7 @@ require('features/location')
|
||||
require('features/recover')
|
||||
require('features/history')
|
||||
require('features/app')
|
||||
require('features/peer')
|
||||
require('features/ui')
|
||||
require('features/ui-partial-ribbons')
|
||||
require('features/ui-single-image')
|
||||
|
||||
@ -280,6 +280,9 @@ var IntrospectionActions = actions.Actions({
|
||||
|
||||
.isUserCallable(<action-name>)
|
||||
`,
|
||||
// XXX should this check only the root action or the whole set???
|
||||
//function(action){
|
||||
// return this.getActionAttr(action, '__not_user_callable__') != true }],
|
||||
actions.doWithRootAction(function(action){
|
||||
return action.__not_user_callable__ != true })],
|
||||
})
|
||||
|
||||
@ -22,7 +22,9 @@ var core = require('features/core')
|
||||
// Protocols:
|
||||
// - child_process
|
||||
// - http
|
||||
// - rpc/mq
|
||||
// - rpc
|
||||
// - mq
|
||||
// - ...
|
||||
var PeerActions = actions.Actions({
|
||||
|
||||
// XXX need more control...
|
||||
@ -32,8 +34,18 @@ var PeerActions = actions.Actions({
|
||||
|
||||
getPeerActions: ['- Peer/',
|
||||
function(id){
|
||||
// XXX
|
||||
var that = this
|
||||
return this.actions.filter(id ?
|
||||
function(action){
|
||||
return that.getActionAttr(action, '__peer__') == id }
|
||||
// get all peer actions...
|
||||
: function(action){
|
||||
return that.getActionAttr(action, '__peer__') })
|
||||
}],
|
||||
// XXX should this also check props???
|
||||
isPeerAction: ['- Peer/',
|
||||
function(name){
|
||||
return !!this.getActionAttr(name, '__peer__') }],
|
||||
|
||||
peerCreate: ['- Peer/',
|
||||
function(){
|
||||
@ -48,12 +60,12 @@ var PeerActions = actions.Actions({
|
||||
peerConnected: ['- Peer/',
|
||||
core.notUserCallable(function(){
|
||||
// XXX
|
||||
}],
|
||||
})],
|
||||
// event...
|
||||
peerDisconnected: ['- Peer/',
|
||||
core.notUserCallable(function(){
|
||||
// XXX
|
||||
}],
|
||||
})],
|
||||
|
||||
peerList: ['- Peer/',
|
||||
function(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user