module YalgaarChannelList

Namespace module for YalgaarChannelList default variables…

Public Instance Methods

yalgaarGetChannelList(uid,lamda1,lamda2) click to toggle source

~ include YalgaarApis yalgaarGetChannelList(message); @brief - <To yalgaarGetChannelList as given length>

@param <Length> : <length for how long uuid generating> DESCRIPTION:<To yalgaarGetChannelList as given length>

# File lib/mqttbridge/YalgaarChannellist.rb, line 35
def yalgaarGetChannelList(uid,lamda1,lamda2)
        if @@isConnected==true
                if uidValidation(uid)
                        topic=@@clientKey+'/'+uid+'/'+uid+'$'+'0'+'$'+'channels'
                        #~ puts topic
                        @@client.subscribe(topic) 
                        @@lChannelList=lamda1
                else
                        errmesg=showErrCode(YALGAAR_108)
                        lamda2.call(errmesg)        
                end  
        else
                return YALGAAR_NO_SERVER_CONNECTION           
        end   
end
yalgaarGetUserList(channel,lamda1,lamda2) click to toggle source

yalgaarGetUserList(message); @brief - <To yalgaarGetUserList as given length>

@param <Length> : <length for how long uuid generating> DESCRIPTION:<To yalgaarGetUserList as given length>

# File lib/mqttbridge/YalgaarChannellist.rb, line 54
def yalgaarGetUserList(channel,lamda1,lamda2)
        if @@isConnected==true
                 if channelValidation(channel)
                        topic=@@clientKey+'/'+@@uuid+'/'+channel+'$'+'0'+'$'+'users'
                        #~ puts topic
                        @@client.subscribe(topic) 
                        @@lUserList=lamda1
                 else        
                        errmesg=showErrCode(YALGAAR_108)
                        lamda2.call(errmesg)
                 end
        else
                return YALGAAR_NO_SERVER_CONNECTION   
        end           
end