// Compiled by ClojureScript 0.0-2138
goog.provide('lt.util.ipc');
goog.require('cljs.core');
lt.util.ipc.ipc = require("ipc");
/**
* Delegates to ipc.send which asynchronously sends args to the browser process's channel.
* @param {...*} var_args
*/
lt.util.ipc.send = (function() { 
var send__delegate = function (channel,args){return cljs.core.apply.call(null,lt.util.ipc.ipc.send,channel,cljs.core.clj__GT_js.call(null,args));
};
var send = function (channel,var_args){
var args = null;if (arguments.length > 1) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return send__delegate.call(this,channel,args);};
send.cljs$lang$maxFixedArity = 1;
send.cljs$lang$applyTo = (function (arglist__5650){
var channel = cljs.core.first(arglist__5650);
var args = cljs.core.rest(arglist__5650);
return send__delegate(channel,args);
});
send.cljs$core$IFn$_invoke$arity$variadic = send__delegate;
return send;
})()
;
/**
* Delegates to ipc.on which defines a callback to fire for the given channel.
*/
lt.util.ipc.on = (function on(channel,cb){return lt.util.ipc.ipc.on(channel,cb);
});
if(cljs.core.truth_((process.env["IPC_DEBUG"])))
{var old_send_5651 = lt.util.ipc.send;var old_on_5652 = lt.util.ipc.on;/**
* @param {...*} var_args
*/
lt.util.ipc.send = (function() { 
var send__delegate = function (args){cljs.core.prn.call(null,"RENDERER->",args);
return cljs.core.apply.call(null,old_send_5651,args);
};
var send = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return send__delegate.call(this,args);};
send.cljs$lang$maxFixedArity = 0;
send.cljs$lang$applyTo = (function (arglist__5653){
var args = cljs.core.seq(arglist__5653);
return send__delegate(args);
});
send.cljs$core$IFn$_invoke$arity$variadic = send__delegate;
return send;
})()
;
lt.util.ipc.on = (function on(channel,cb){return old_on_5652.call(null,channel,(function() { 
var G__5654__delegate = function (args){cljs.core.prn.call(null,"->RENDERER",channel,args);
return cljs.core.apply.call(null,cb,args);
};
var G__5654 = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return G__5654__delegate.call(this,args);};
G__5654.cljs$lang$maxFixedArity = 0;
G__5654.cljs$lang$applyTo = (function (arglist__5655){
var args = cljs.core.seq(arglist__5655);
return G__5654__delegate(args);
});
G__5654.cljs$core$IFn$_invoke$arity$variadic = G__5654__delegate;
return G__5654;
})()
);
});
} else
{}
