def updateReserve(vehCD, isReserved):
    try:
        reserve.set_reserved(vehCD, isReserved)
        vehinfo.updateReserve(vehCD, isReserved)
        as_xfw_cmd(XVM_COMMAND.AS_UPDATE_RESERVE, vehinfo.getVehicleInfoDataArray())
        app = getLobbyApp()
        hangar = app.containerManager.getView(ViewTypes.LOBBY_SUB,
            criteria={POP_UP_CRITERIA.VIEW_ALIAS: VIEW_ALIAS.LOBBY_HANGAR})
        log(str(hangar))
        if hangar.tankCarousel is not None:
            hangar.tankCarousel.updateVehicles()
    except Exception as ex:
        err(traceback.format_exc())
def updateReserve(vehCD, isReserved):
    try:
        reserve.set_reserved(vehCD, isReserved)
        as_xfw_cmd(XVM_COMMAND.AS_UPDATE_RESERVE, vehinfo.getVehicleInfoDataArray())
        app = getLobbyApp()
        hangar = app.containerManager.getView(ViewTypes.LOBBY_SUB,
            criteria={POP_UP_CRITERIA.VIEW_ALIAS: VIEW_ALIAS.LOBBY_HANGAR})
        #log(str(hangar))
        if hangar:
            tankCarousel = hangar.getComponent(hangar._Hangar__currentCarouselAlias)
            if tankCarousel is not None:
                tankCarousel.updateVehicles()
    except Exception as ex:
        err(traceback.format_exc())
 def respondConfig(self):
     #debug('vm:respondConfig')
     #s = time.clock()
     try:
         if self.initialized:
             if self.active:
                 self.call(XVM_COMMAND.AS_SET_CONFIG, config.config_data,
                           config.lang_data,
                           vehinfo.getVehicleInfoDataArray(),
                           config.networkServicesSettings.__dict__,
                           IS_DEVELOPMENT)
             else:
                 self.call(XVM_COMMAND.AS_SET_CONFIG,
                           {'markers': {
                               'enabled': False
                           }}, {'locale': {}}, None, None, IS_DEVELOPMENT)
             self.recreateMarkers()
     except Exception, ex:
         err(traceback.format_exc())
 def respondConfig(self):
     #debug('vm:respondConfig')
     #s = time.clock()
     try:
         if self.initialized:
             if self.active:
                 self.call(
                     XVM_COMMAND.AS_SET_CONFIG,
                     config.config_data,
                     config.lang_data,
                     vehinfo.getVehicleInfoDataArray(),
                     config.networkServicesSettings.__dict__,
                     IS_DEVELOPMENT)
             else:
                 self.call(
                     XVM_COMMAND.AS_SET_CONFIG,
                     {'markers':{'enabled':False}},
                     {'locale':{}},
                     None,
                     None,
                     IS_DEVELOPMENT)
             self.recreateMarkers()
     except Exception, ex:
         err(traceback.format_exc())