Author: richard
Date: Fri Feb  6 03:46:11 2009
New Revision: 4061

URL: http://svn.slimdevices.com?rev=4061&root=Jive&view=rev
Log:
Bug: N/A
Description:
Cleanup device id code.


Modified:
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua
URL: 
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua?rev=4061&root=Jive&r1=4060&r2=4061&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua 
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua Fri 
Feb  6 03:46:11 2009
@@ -20,6 +20,7 @@
 local JIVE_VERSION   = jive.JIVE_VERSION
 
 -- can be overridden by hardware specific classes
+local DEVICE_ID      = 12
 local DEVICE_MODEL   = "squeezeplay"
 local DEVICE_NAME    = "SqueezePlay"
 
@@ -28,16 +29,11 @@
 oo.class(_M, Player)
 
 
-local device2id = {
-       ["controller"] = 9,
-       ["squeezeplay"] = 12,
-}
-
-
 -- class method to set the device type
 function setDeviceType(self, model, name)
         assert(device2id[model])
 
+        DEVICE_ID = 9
         DEVICE_MODEL = model
         DEVICE_NAME = name or model
 end
@@ -46,12 +42,9 @@
 function __init(self, jnt, playerId, uuid)
        local obj = oo.rawnew(self, Player(jnt, playerId))
 
-       local deviceid = device2id[DEVICE_MODEL]
-       assert(deviceid)
-
        obj.slimproto = SlimProto(jnt, {
                opcode = "HELO",
-               deviceID = deviceid,
+               deviceID = DEVICE_ID
                version = JIVE_VERSION,
                mac = obj.id,
                uuid = uuid,

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to