예제 #1
0
	def keyRed(self):
		printl("", self, "S")

		client = plexgdm(debug=3)
		version = str(getVersion())
		gBoxType = getBoxInformation()
		clientBox = gBoxType[1]
		printl("clientBox: " + str(gBoxType), self, "D")
		client.clientDetails(clientBox, "DreamPlex Client", "3003", "DreamPlex", version)

		client.start_discovery()
		while not client.discovery_complete:
			print "Waiting for results"
			time.sleep(1)
		
		client.stop_discovery()
		serverList = client.getServerList()
		printl("serverList: " + str(serverList),self, "D")
		
		menu = []
		for server in serverList:
			printl("server: " + str(server), self, "D")
			menu.append((str(server.get("serverName")) + " (" + str(server.get("server")) + ":" + str(server.get("port")) + ")", server,))
			
		printl("menu: " + str(menu), self, "D")
		self.session.openWithCallback(self.useSelectedServerData, ChoiceBox, title=_("Select server"), list=menu)
		
		printl("", self, "C")
예제 #2
0
def initBoxInformation():
    '''
	'''
    printl("", "__init__::getBoxInformation", "S")

    boxInfo = getBoxInformation()
    printl("=== BOX INFORMATION ===", "__init__::getBoxInformation", "I")
    printl("Box: " + str(boxInfo), "__init__::getBoxInformation", "I")

    printl("", "__init__::getBoxInformation", "C")
예제 #3
0
def initBoxInformation():
	'''
	'''
	printl("", "__init__::getBoxInformation", "S")
	
	boxInfo = getBoxInformation()
	printl("=== BOX INFORMATION ===", "__init__::getBoxInformation", "I")
	printl("Box: " + str(boxInfo), "__init__::getBoxInformation", "I")
	
	printl("", "__init__::getBoxInformation", "C")
예제 #4
0
	def startDeamon(self):
		printl("", self, "S")
		t = Thread(target=runHttp)
		t.start()
		
		client = plexgdm(debug=3)
		version = str(getVersion())
		gBoxType = getBoxInformation()
		clientBox = "8000"
		printl("clientBox: " + str(gBoxType), self, "D")
		client.clientDetails(clientBox, "192.168.45.80", "8000", "DreamPlex", version)
		client.start_registration()
		
		if client.check_client_registration():
			print "Successfully registered"
		else:
			print "Unsuccessfully registered"