Files
Iris/src/js/services/pusher/actions.js

78 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-10-27 16:58:11 +13:00
/**
* Actions and Action Creators
**/
2016-10-31 09:25:15 +13:00
export function setPort( port ){
2016-10-27 16:58:11 +13:00
return {
2016-10-31 09:25:15 +13:00
type: 'PUSHER_SET_PORT',
port: port
2016-10-27 16:58:11 +13:00
}
}
export function setUsername( username ){
return {
type: 'PUSHER_SET_USERNAME',
username: username
}
}
2016-10-27 16:58:11 +13:00
export function connect(){
return {
type: 'PUSHER_CONNECT'
}
}
export function disconnect(){
return {
type: 'PUSHER_DISCONNECT'
}
}
export function performUpgrade(){
return {
type: 'PUSHER_UPGRADING'
}
}
export function getConnections(){
return {
type: 'PUSHER_GET_CONNECTIONS'
}
}
export function instruct( data = null ){
2016-10-27 16:58:11 +13:00
return {
type: 'PUSHER_INSTRUCT',
data: data
2016-10-27 16:58:11 +13:00
}
}
export function sendAuthorization( recipient_connectionid, authorization, me ){
return {
type: 'PUSHER_SEND_AUTHORIZATION',
recipient_connectionid: recipient_connectionid,
authorization: authorization,
me: me
}
}
2016-12-20 16:58:20 +13:00
export function startRadio( uris ){
return {
type: 'START_RADIO',
2016-12-20 16:58:20 +13:00
uris: uris
}
}
2016-12-20 19:54:19 +13:00
export function stopRadio(){
2016-12-20 16:58:20 +13:00
return {
type: 'STOP_RADIO'
2016-12-20 16:58:20 +13:00
}
}
export function debug( data = null ){
return {
type: 'PUSHER_DEBUG',
data: data
}
2016-10-27 16:58:11 +13:00
}