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 connect(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_CONNECT'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function disconnect(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_DISCONNECT'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-29 22:40:02 +13:00
|
|
|
export function performUpgrade(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_UPGRADING'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 09:14:29 +13:00
|
|
|
export function getConnectionList(){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_INSTRUCT',
|
|
|
|
|
action: 'get_connections'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-12 09:07:47 +13:00
|
|
|
export function instruct( message_type, data = null ){
|
2016-10-27 16:58:11 +13:00
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_INSTRUCT',
|
2016-12-12 09:07:47 +13:00
|
|
|
message_type: message_type,
|
2016-10-28 09:14:29 +13:00
|
|
|
data: data
|
2016-10-27 16:58:11 +13:00
|
|
|
}
|
2016-12-05 10:20:01 +13:00
|
|
|
}
|
|
|
|
|
|
2016-12-20 16:58:20 +13:00
|
|
|
export function startRadio( uris ){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_START_RADIO',
|
|
|
|
|
uris: uris
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-20 19:54:19 +13:00
|
|
|
export function stopRadio(){
|
2016-12-20 16:58:20 +13:00
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_STOP_RADIO'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-05 10:20:01 +13:00
|
|
|
export function debug( call, data = null ){
|
|
|
|
|
return {
|
|
|
|
|
type: 'PUSHER_DEBUG',
|
|
|
|
|
call: call,
|
|
|
|
|
data: data
|
|
|
|
|
}
|
2016-10-27 16:58:11 +13:00
|
|
|
}
|