#@fileName #@brief - # #Revision Log: # v1.0.2 : Aug 4, 2016 INITIAL OF PROGRAMMER - REVISION DETAIL_1 <- THIS IS THE LATEST REVISION #Description: #YalgaarInitModule contents methods and variables and enum.. # #@bug Known Issues: # 1. ISSUE NAME - NONE # WORKAROUND - NONE #@details Notes: NONE #SLS MAKES NO REPRESENTATION, WARRANTY, OR CONDITION OF #ANY KIND, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE OR IN #ANY COMMUNICATION WITH YOU, INCLUDING, BUT NOT LIMITED TO, #ANY IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY #QUALITY, FITNESS FOR ANY PARTICULAR PURPOSE, #NONINFRINGEMENT, AND THEIR EQUIVALENTS. #SLS Propritery and Confidential #@copyright (C) 2016 SLS Corporation, All Rights Reserved. #~ require_relative 'YalgaarInitModule' #~ require_relative 'YalgaarInitModule' # Namespace module for Subscribe default variables... #!/usr/bin/env ruby module YalgaarSubcribe include YalgaarInit include YalgaarApis #yalgaarSubcribe(length); #@brief - #@param : #DESCRIPTION: def yalgaarSubcribe(*args) #~ puts @@isConnected if @@isConnected == true channel=args[0] @@lSubCallback=args[1] @@lPresenceCallback=args[2] @@lEroorCallback=args[3] if channel.is_a?(Array) #~ puts channel.size for ilterator in 0..channel.size-1 if channelValidation(channel[ilterator]) #~ puts channel[ilterator] topic=@@clientKey+'/'+channel[ilterator] @@client.subscribe(topic) else errmesg=showErrCode(YALGAAR_108) @@lEroorCallback.call(errmesg) #~ ErrorMsgCallback("Channel is not valid") end end else if channelValidation(channel) #~ puts channel topic=@@clientKey+'/'+channel @@client.subscribe(topic) else errmesg=showErrCode(YALGAAR_108) @@lEroorCallback.call(errmesg) end end return 0 else return YALGAAR_NO_SERVER_CONNECTION end end #yalgaarUnSubcribe(length); #@brief - #@param : #DESCRIPTION: def yalgaarUnSubcribe(channel) if channel.is_a?(Array) #~ puts channel.size for ilterator in 0..channel.size-1 if channelValidation(channel[ilterator]) #~ puts channel[ilterator] topic=@@clientKey+'/'+channel[ilterator] @@client.unsubscribe(topic) else errmesg=showErrCode(YALGAAR_108) @@lEroorCallback.call(errmesg) #~ ErrorMsgCallback("Channel is not valid") end end else if channelValidation(channel) #~ puts channel topic=@@clientKey+'/'+channel @@client.unsubscribe(topic) else errmesg=showErrCode(YALGAAR_108) @@lEroorCallback.call(errmesg) end end end end