mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	notes + minor stuff...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									75f146c6e1
								
							
						
					
					
						commit
						fa7befd9ed
					
				| @ -34,6 +34,11 @@ var PeerActions = actions.Actions({ | |||||||
| 	//
 | 	//
 | ||||||
| 	// XXX <spec> format???
 | 	// XXX <spec> format???
 | ||||||
| 	//		...should flow from the protocol definition and architecture...
 | 	//		...should flow from the protocol definition and architecture...
 | ||||||
|  | 	// XXX Q: should peer adapter be a feature that defines/extnds a set 
 | ||||||
|  | 	// 		of actions???
 | ||||||
|  | 	// 		...e.g. base peerCreate(..) defines the protocol but does 
 | ||||||
|  | 	// 		nothing, while each implementation checks if the url is 
 | ||||||
|  | 	// 		compatible and handles it accordingly...
 | ||||||
| 	__peers: null, | 	__peers: null, | ||||||
| 
 | 
 | ||||||
| 	// XXX need more control...
 | 	// XXX need more control...
 | ||||||
| @ -77,9 +82,7 @@ var PeerActions = actions.Actions({ | |||||||
| 		})], | 		})], | ||||||
| 
 | 
 | ||||||
| 	peerList: ['- Peer/', | 	peerList: ['- Peer/', | ||||||
| 		function(){ | 		function(){ return Object.keys(this.__peers || {}) }], | ||||||
| 			// XXX
 |  | ||||||
| 		}], |  | ||||||
| 	peerSpec: ['- Peer/', | 	peerSpec: ['- Peer/', | ||||||
| 		function(id){ | 		function(id){ | ||||||
| 			// XXX
 | 			// XXX
 | ||||||
| @ -102,7 +105,20 @@ var PeerActions = actions.Actions({ | |||||||
| 	// XXX also proxy descriptors???
 | 	// XXX also proxy descriptors???
 | ||||||
| 	peerMixin: ['- Peer/', | 	peerMixin: ['- Peer/', | ||||||
| 		function(id, actions){ | 		function(id, actions){ | ||||||
|  | 			var that = this | ||||||
|  | 			var spec = this.peerSpec(id) | ||||||
| 			// XXX
 | 			// XXX
 | ||||||
|  | 			actions = actions || Object.keys(spec.actions) | ||||||
|  | 			actions.forEach(function(action){ | ||||||
|  | 				if(that[action]){ | ||||||
|  | 					return | ||||||
|  | 				} | ||||||
|  | 
 | ||||||
|  | 				// XXX
 | ||||||
|  | 				var action_spec = [] | ||||||
|  | 
 | ||||||
|  | 				that[action] = actions.Action(action, action_spec) | ||||||
|  | 			}) | ||||||
| 		}], | 		}], | ||||||
| 	// XXX should this be .peerMixout(..)
 | 	// XXX should this be .peerMixout(..)
 | ||||||
| 	peerMixout: ['- Peer/', | 	peerMixout: ['- Peer/', | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user