mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +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/recover')
|
||||||
require('features/history')
|
require('features/history')
|
||||||
require('features/app')
|
require('features/app')
|
||||||
|
require('features/peer')
|
||||||
require('features/ui')
|
require('features/ui')
|
||||||
require('features/ui-partial-ribbons')
|
require('features/ui-partial-ribbons')
|
||||||
require('features/ui-single-image')
|
require('features/ui-single-image')
|
||||||
|
|||||||
@ -280,6 +280,9 @@ var IntrospectionActions = actions.Actions({
|
|||||||
|
|
||||||
.isUserCallable(<action-name>)
|
.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){
|
actions.doWithRootAction(function(action){
|
||||||
return action.__not_user_callable__ != true })],
|
return action.__not_user_callable__ != true })],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -22,7 +22,9 @@ var core = require('features/core')
|
|||||||
// Protocols:
|
// Protocols:
|
||||||
// - child_process
|
// - child_process
|
||||||
// - http
|
// - http
|
||||||
// - rpc/mq
|
// - rpc
|
||||||
|
// - mq
|
||||||
|
// - ...
|
||||||
var PeerActions = actions.Actions({
|
var PeerActions = actions.Actions({
|
||||||
|
|
||||||
// XXX need more control...
|
// XXX need more control...
|
||||||
@ -32,8 +34,18 @@ var PeerActions = actions.Actions({
|
|||||||
|
|
||||||
getPeerActions: ['- Peer/',
|
getPeerActions: ['- Peer/',
|
||||||
function(id){
|
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/',
|
peerCreate: ['- Peer/',
|
||||||
function(){
|
function(){
|
||||||
@ -48,12 +60,12 @@ var PeerActions = actions.Actions({
|
|||||||
peerConnected: ['- Peer/',
|
peerConnected: ['- Peer/',
|
||||||
core.notUserCallable(function(){
|
core.notUserCallable(function(){
|
||||||
// XXX
|
// XXX
|
||||||
}],
|
})],
|
||||||
// event...
|
// event...
|
||||||
peerDisconnected: ['- Peer/',
|
peerDisconnected: ['- Peer/',
|
||||||
core.notUserCallable(function(){
|
core.notUserCallable(function(){
|
||||||
// XXX
|
// XXX
|
||||||
}],
|
})],
|
||||||
|
|
||||||
peerList: ['- Peer/',
|
peerList: ['- Peer/',
|
||||||
function(){
|
function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user