| 
									
										
										
										
											2018-04-13 15:45:48 +02:00
										 |  |  | import * as plugins from './smartuniverse.plugins'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-29 14:17:26 +02:00
										 |  |  | import { Objectmap } from 'lik'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-13 15:45:48 +02:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2018-04-29 14:17:26 +02:00
										 |  |  |  * enables messages to stay within a certain scope. | 
					
						
							| 
									
										
										
										
											2018-04-13 15:45:48 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | export class UniverseChannel { | 
					
						
							| 
									
										
										
										
											2018-04-29 14:17:26 +02:00
										 |  |  |   /** | 
					
						
							|  |  |  |    * stores the channels that are available within the universe | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static channelStore = new Objectmap(); | 
					
						
							| 
									
										
										
										
											2018-05-07 18:50:07 +02:00
										 |  |  |    | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * the credentials for the channel | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   private credentials: { | 
					
						
							|  |  |  |     user: string; | 
					
						
							|  |  |  |     password: string; | 
					
						
							|  |  |  |   }; | 
					
						
							| 
									
										
										
										
											2018-04-29 14:17:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * creates new channels | 
					
						
							|  |  |  |    * @param channelArg the name of the topic | 
					
						
							|  |  |  |    * @param secretArg the secret thats used for a certain topic. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static createChannel = (channelArg: string, secretArg: string) => { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-13 15:45:48 +02:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * authenticates a client on the server side | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   async authenticateClient() {} | 
					
						
							|  |  |  | } |