Welcome to mirror list, hosted at ThFree Co, Russian Federation.

radio.js « js - github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 306bcb009e9fd330ae0e1edfd6a2552e9ade0258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
 * ownCloud - Mail
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @copyright Christoph Wurst 2016
 */

define(function(require) {
	'use strict';

	var Radio = require('backbone.radio');

	var accountChannel = Radio.channel('account');
	var folderChannel = Radio.channel('folder');
	var davChannel = Radio.channel('dav');
	var messageChannel = Radio.channel('message');
	var navigationChannel = Radio.channel('navigation');
	var notificationChannel = Radio.channel('notification');
	var stateChannel = Radio.channel('state');
	var uiChannel = Radio.channel('ui');

	var channels = {
		account: accountChannel,
		dav: davChannel,
		folder: folderChannel,
		message: messageChannel,
		navigation: navigationChannel,
		notification: notificationChannel,
		state: stateChannel,
		ui: uiChannel
	};

	// Log all events to the console
	for (var channelName in channels) {
		Radio.tuneIn(channelName);
	}

	return channels;
});