added -setIwcHandler

This commit is contained in:
Kevin Jahns 2014-08-19 16:10:23 +02:00
parent bb18c8d0f4
commit 9a1b0b7ced

View File

@ -4,8 +4,10 @@
# @param {String} initial_user_id Optional. You can set you own user_id (since the ids of duiclient are not always unique) # @param {String} initial_user_id Optional. You can set you own user_id (since the ids of duiclient are not always unique)
# #
createIwcConnector = (callback, options)-> createIwcConnector = (callback, options)->
userIwcHandler = null
if options? if options?
{iwcHandler: userIwcHandler} = options {iwcHandler: userIwcHandler} = options
iwcHandler = {} iwcHandler = {}
duiClient = new DUIClient() duiClient = new DUIClient()
#@duiClient = new iwc.Client() #@duiClient = new iwc.Client()
@ -110,6 +112,8 @@ createIwcConnector = (callback, options)->
@duiClient.sendIntent(intent) @duiClient.sendIntent(intent)
setIwcHandler: (f)->
userIwcHandler = f
init = ()-> init = ()->