Beispiel #1
0

		#
		# account options
		#

		# Register an account
		elif opt == "--register":
			if not sflphone.checkAccountExists(arg):
				print "Account " + arg + ": no such account."

			elif arg  in sflphone.getAllRegisteredAccounts():
				print "Account " + arg + ": already registered."

			else:
				sflphone.setAccountRegistered(arg, True)
				print arg + ": Sent register request."

		# Unregister an account
		elif opt == "--unregister":
			if not sflphone.checkAccountExists(arg):
				print "Account " + arg + ": no such account."

			elif arg not in sflphone.getAllRegisteredAccounts():
				print "Account " + arg + ": is not registered."

			else:
				sflphone.setAccountRegistered(arg, False)
				print arg + ": Sent unregister request."

		# Enable an account