blob: 273f711a97cb0e1f618793c914946e920ee68de1 [file] [log] [blame]
Simon Hunt1e4a0012015-01-21 11:36:08 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 ONOS GUI -- Remote -- Web Socket Service
19 */
20(function () {
21 'use strict';
22
23 angular.module('onosRemote')
24 .factory('WebSocketService', ['$location', 'UrlFnService',
25 function ($loc, ufs) {
26
27 // creates a web socket for the given path, returning a "handle"
28 function createWebSocket(path) {
29 return {
30 path: ufs.wsUrl(path)
31 // TODO: complete implementation...
32 };
33 }
34
35 return {
36 createWebSocket: createWebSocket
37 };
38 }]);
39
40}());